summaryrefslogtreecommitdiff
path: root/src/font.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-05-22 11:41:18 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-05-22 14:23:20 -0400
commitea7c4d554fc6735f9442797527834ae95c51267b (patch)
tree99636c2fb747d6b72cd1ce2faa7c3a8d2d483afc /src/font.cpp
parent98857393fca248d7de2d93509bc29f9254e7fb77 (diff)
ecs: actually don't serialize built-in fonts
Diffstat (limited to 'src/font.cpp')
-rw-r--r--src/font.cpp4
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() {