From: Yuri D'E. <wa...@th...> - 2018-03-16 14:59:07
|
On Fri, Mar 16 2018, Araki Ken wrote: > Does an attached patch fix this problem ? Mmhh.. The text is now somewhat scaled, but it still doesn't match the correct size. > + dpi_for_fc = dpi; Looking at the xft version, who initially sets dpi_for_fc? > + if (dpi_for_fc == 0.0) { > + double widthpix = DisplayWidth(font->display, DefaultScreen(font->display)); > + double widthmm = DisplayWidthMM(font->display, DefaultScreen(font->display)); > + dpi_for_fc = (widthpix * 254) / (widthmm * 10); > + } This is never going to work correctly on a multi-monitor setup, as in my case :/ Xft uses the Xft.dpi X resource for text rendering. If this isn't set, it falls back for the primary display DPI setting in xrandr. But fetching the resource manually seems somewhat wrong. I would have expected fontconfig to have some helper function for this. |