From ea7c4d554fc6735f9442797527834ae95c51267b Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 22 May 2025 11:41:18 -0400 Subject: ecs: actually don't serialize built-in fonts --- src/font.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/font.cpp') 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(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(fti)].entity_flags |= ENTITY_FLAG_DO_NOT_SERIALIZE; } void FontType_Teardown() { -- cgit v1.2.3