mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
term: use the monitors diagonal DPI value, instead of it's vertical PPI value
This commit is contained in:
parent
b08db1ef97
commit
6e909d5cd3
1 changed files with 3 additions and 3 deletions
|
|
@ -587,14 +587,14 @@ get_font_dpi(const struct terminal *term)
|
||||||
double dpi = 0.0;
|
double dpi = 0.0;
|
||||||
assert(term->window != NULL);
|
assert(term->window != NULL);
|
||||||
tll_foreach(term->window->on_outputs, it) {
|
tll_foreach(term->window->on_outputs, it) {
|
||||||
if (it->item->ppi.scaled.y > dpi)
|
if (it->item->dpi > dpi)
|
||||||
dpi = it->item->ppi.scaled.y * term->scale;
|
dpi = it->item->dpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're not mapped, use DPI from first monitor. Hopefully this is where we'll get mapped later... */
|
/* If we're not mapped, use DPI from first monitor. Hopefully this is where we'll get mapped later... */
|
||||||
if (dpi == 0.) {
|
if (dpi == 0.) {
|
||||||
tll_foreach(term->wl->monitors, it) {
|
tll_foreach(term->wl->monitors, it) {
|
||||||
dpi = it->item.ppi.scaled.y * term->scale;
|
dpi = it->item.dpi;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue