New font scaling dpi heuristics (which i don't grok)

py3.10_support
Tyler Goodlet 2021-12-02 08:08:10 -05:00
parent 61331fee67
commit c1cf4c7876
1 changed files with 8 additions and 7 deletions

View File

@ -123,16 +123,17 @@ class DpiAwareFont:
# dpi is likely somewhat scaled down so use slightly larger font size # dpi is likely somewhat scaled down so use slightly larger font size
if scale >= 1.1 and self._font_size: if scale >= 1.1 and self._font_size:
# no idea why
if 1.2 <= scale: if 1.2 <= scale:
inches *= (1 / scale) * 1.0616 mult = 1.0375
if scale < 1.4 or scale >= 1.5: if scale >= 2:
# TODO: this denominator should probably be determined from mult = 1.375
# TODO: this multiplier should probably be determined from
# relative aspect ratios or something? # relative aspect ratios or something?
inches = inches * (1 + 6/16) inches *= mult
dpi = mx_dpi
log.info(f'USING MAX DPI {dpi}')
# TODO: we might want to fiddle with incrementing font size by # TODO: we might want to fiddle with incrementing font size by
# +1 for the edge cases above. it seems doing it via scaling is # +1 for the edge cases above. it seems doing it via scaling is