diff options
Diffstat (limited to 'src/font.hpp')
| -rw-r--r-- | src/font.hpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/font.hpp b/src/font.hpp index 9be881c..5fd0f61 100644 --- a/src/font.hpp +++ b/src/font.hpp @@ -26,17 +26,20 @@ struct FontGlyphChar { glm::vec2 sprite_region_max; glm::dvec4 baseline_bounding_box; uint32_t unicode; - bool is_whitespace; + bool is_whitespace; // TODO }; struct FontRenderSettings { - float char_scale; + float char_scale; // TODO float line_height_scale; float char_spacing_scale; - glm::ivec2 surface_area_size; - FONT_RENDER_SURFACE_AREA_TYPE_FLAGS surface_area_type_flags; + glm::ivec2 surface_area_size; // TODO + glm::ivec2 surface_area_pos; + FONT_RENDER_SURFACE_AREA_TYPE_FLAGS surface_area_type_flags; // TODO }; struct FontRender { - uint32_t len; + uint32_t *glyph_indices; + uint32_t n_glyphs; + uint32_t buffer_start_index; FontTypeIndex index_ft; FontRenderIndex index_fr; FontRenderSettings settings; @@ -55,6 +58,7 @@ struct FontTypeSpacing { double underline_thickness; }; struct FontType : public Entity_Base { + uint64_t last_graphics_resize_index; pk_cstr title; AssetHandle fontTextureAssetHandle; AssetHandle glyphDetailsAssetHandle; @@ -89,13 +93,13 @@ struct FontType : public Entity_Base { void FontType_Init(); void FontType_Teardown(); -void FontType_Tick(); +void FontType_Tick(double delta); void FontType_Serialize(std::ofstream &stream, FontType *ft); void FontType_Deserialize(std::ifstream &stream); FontType* FontType_GetFonts(FontTypeIndex &count); FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetHandle fontTextureHandle, AssetHandle glyphsHandle, FontTypeSpacing *spacing); void FontType_Unload(FontTypeIndex idx); -FontRender FontType_AddStringRender(FontTypeIndex idx_ft, pk_cstr cstr); +FontRender FontType_AddStringRender(FontTypeIndex idx_ft, pk_str str, FontRenderSettings *settings); void FontType_RemoveStringRender(FontRender fr); #endif /* PKE_FONT_TYPE_HPP */ |
