Skip to content

Commit

Permalink
Round the rasterizing density of the font to make it sharper.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arignir committed Oct 17, 2024
1 parent c0343a7 commit 2aa1cf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/app/sdl/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ app_sdl_video_update_scale(
cfg = ImFontConfig_ImFontConfig();
cfg->SizePixels = round(13.f * app->ui.scale);
cfg->GlyphOffset.y = round(13.f * app->ui.scale);
cfg->RasterizerDensity = app->ui.scale * 2.f;
cfg->RasterizerDensity = round(app->ui.scale * 2.f);
app->ui.fonts.normal = ImFontAtlas_AddFontDefault(app->ui.ioptr->Fonts, cfg);

cfg = ImFontConfig_ImFontConfig();
cfg->SizePixels = round(13.f * app->ui.scale * 3.);
cfg->GlyphOffset.y = round(13.f * app->ui.scale * 3.);
cfg->RasterizerDensity = app->ui.scale * 2.f;
cfg->RasterizerDensity = round(app->ui.scale * 2.f);
app->ui.fonts.big = ImFontAtlas_AddFontDefault(app->ui.ioptr->Fonts, cfg);

ImFontAtlas_Build(app->ui.ioptr->Fonts);
Expand Down

0 comments on commit 2aa1cf5

Please sign in to comment.