diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-12 22:15:00 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-17 15:55:39 +0000 |
| commit | 09354286955a6a7eb05e0e336ce7fc9cc43cb5f3 (patch) | |
| tree | 4375bba04f2e5f275d1047f46dd27bf1f74d809d /render.c | |
| parent | Merge branch 'reflow-performance' (diff) | |
term: remove get_font_scale()
get_font_scale() was used to get the new scaling factor when loading
fonts. This was then compared to the last seen font scaling factor. If
there was no difference, the fonts were not reloaded.
The problem was, the initial term->scale was set differently. This
sometimes led to term->scale=2, while get_font_scale() return 1. That
meant, fonts were initially scaled by 2 (when dpi-aware=no). Later,
when mapped on an output (and thus term->scale being set to 1), the
fonts weren’t reloaded with the correct scaling factor since the
cached term->font_scale value was already 1.
Since term->scale always reflects the *new* scaling factor when
term_font_dpi_changed() is called, use that directly, and remove
get_font_scale().
Also rename the following functions:
* font_should_size_by_dpi() -> font_size_by_dpi_for_scale()
* font_size_by_dpi() -> font_sized_by_dpi()
* font_size_by_scale() -> font_sized_by_scale()
Diffstat (limited to 'render.c')
0 files changed, 0 insertions, 0 deletions
