diff options
Diffstat (limited to 'src/font.cpp')
| -rw-r--r-- | src/font.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/font.cpp b/src/font.cpp index bd4d530..2c91aa6 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -245,6 +245,7 @@ void FontType_Inner_CalcTransforms(const FontType *ft, FontRender *fr, FontInsta } void FontType_Init() { + FontTypeIndex fti; ftd.h_ft = FontTypeIndex{0}; ftd.n_ft = FontTypeIndex{5}; ftd.arr_ft = pk_new<FontType>(5); @@ -267,7 +268,8 @@ void FontType_Init() { spacing.descender_y = -0.125; spacing.line_height = 1.125; spacing.underline_y = 0.0625; - FontType_RegisterFont(cstring_to_pk_cstr("fnt_mquin_7y"), ah_img, ah_glyphs, &msdf_s, &spacing); + fti = FontType_RegisterFont(cstring_to_pk_cstr("fnt_mquin_7y"), ah_img, ah_glyphs, &msdf_s, &spacing); + ftd.arr_ft[static_cast<FontTypeIndex_T>(fti)].entity_flags |= ENTITY_FLAG_DO_NOT_SERIALIZE; } void FontType_Teardown() { |
