summaryrefslogtreecommitdiff
path: root/src/font.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-02-18 20:26:17 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-02-18 20:26:17 -0500
commit49c26802a6513a14187d4c2e22f74676056de099 (patch)
treeed5aaa83d38874643543a2b8730a88584691ef72 /src/font.hpp
parentfae5df7328306078421cfdda65279f7e90f7658f (diff)
pke: font rendering correct glyph transform
Diffstat (limited to 'src/font.hpp')
-rw-r--r--src/font.hpp8
1 files changed, 4 insertions, 4 deletions
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);