From 49c26802a6513a14187d4c2e22f74676056de099 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 18 Feb 2025 20:26:17 -0500 Subject: pke: font rendering correct glyph transform --- src/font.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/font.hpp') diff --git a/src/font.hpp b/src/font.hpp index 5fd0f61..73ffd1d 100644 --- a/src/font.hpp +++ b/src/font.hpp @@ -24,12 +24,12 @@ struct FontGlyphChar { double advance; glm::vec2 sprite_region_min; glm::vec2 sprite_region_max; - glm::dvec4 baseline_bounding_box; + glm::dvec4 plane_bounds; uint32_t unicode; - bool is_whitespace; // TODO + bool is_whitespace; }; struct FontRenderSettings { - float char_scale; // TODO + float char_scale; float line_height_scale; float char_spacing_scale; glm::ivec2 surface_area_size; // TODO @@ -97,7 +97,7 @@ 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); +FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetHandle fontTextureHandle, AssetHandle glyphsHandle, FontTypeMSDFSettings *msdf_settings, FontTypeSpacing *spacing); void FontType_Unload(FontTypeIndex idx); FontRender FontType_AddStringRender(FontTypeIndex idx_ft, pk_str str, FontRenderSettings *settings); void FontType_RemoveStringRender(FontRender fr); -- cgit v1.2.3