introduce manual clearing path in font cache layer; use to prevent permanent accumulation of font glyphs even after font resizes etc.

This commit is contained in:
Ryan Fleury committed 2024-12-04 13:34:00 -08:00
1 parent 94c4000603
commit 09cf0fb348
4 files changed
+34 -15

No files matched your search

@@ -479,7 +479,7 @@ fp_raster(Arena *arena, FP_Handle font_handle, F32 size, FP_RasterFlags flags, S
Vec2F32 draw_p = {0, (F32)atlas_dim.y};
if(font.face != 0)
{
F32 descent = floor_f32((96.f/72.f)*size * font_metrics.descent / design_units_per_em);
F32 descent = round_f32((96.f/72.f)*size * font_metrics.descent / design_units_per_em);
draw_p.y -= descent;
}
DWRITE_GLYPH_RUN glyph_run = {0};