mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: only scale using DPI if *all* monitors have a scaling factor or one
With dpi-aware=auto (the default), scale fonts using DPI *only* if *all* available monitors have a scaling factor of one. The idea is this: if a user, with multiple monitors, have enabled scaling on *at least* one monitor, he/she has most likely done so to match the size of his/hers other monitors. For example, if the user has one monitor with a scaling factor of one, and another one with a scaling factor of two, he/she expects things to be twice as large on the second monitor. If we (foot) scale using DPI on the first monitor, and using the scaling factor on the second monitor, foot will *not* look twice as big on the second monitor (this was the old behavior of dpi-aware=auto). Part of #714
This commit is contained in:
parent
2934a4e96c
commit
fb77637eb9
7 changed files with 59 additions and 27 deletions
|
|
@ -2837,8 +2837,8 @@ box_drawing(const struct terminal *term, wchar_t wc)
|
|||
abort();
|
||||
}
|
||||
|
||||
double dpi = term_font_sized_by_dpi(term, term->scale) ? term->font_dpi : 96.;
|
||||
double scale = term_font_sized_by_scale(term, term->scale) ? term->scale : 1.;
|
||||
double dpi = term->font_is_sized_by_dpi ? term->font_dpi : 96.;
|
||||
double scale = term->font_is_sized_by_dpi ? 1. : term->scale;
|
||||
double cell_size = sqrt(pow(term->cell_width, 2) + pow(term->cell_height, 2));
|
||||
|
||||
int base_thickness =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue