diff options
author | Greg A. Woods <woods@robohack.ca> | 2022-01-27 23:55:08 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-04-05 23:57:37 +0000 |
commit | d92f14a70546d9fac579d7750b4ac0280743123a (patch) | |
tree | 90fcb3bcc7a4aae7a63157ea0f5007b10dbceb23 /app-defaults | |
parent | 148a592bf5b10c5f536cb515536351d73952fc6f (diff) |
include actual screen resolution in the resX & resY menus
When given the "-scaled" option fetch the actual screen resolution and
add that to the list of available resolutions for the resX and resY
menus.
I.e. If the pattern contains '*' for the resX and resY fields (i.e.
instead of '0') then we wil end up with the menu containing "0, 100,
NNN", which makes for a really good demonstration of how scaling of
fonts without knowing the true screen resolution can lead to very wonky
results. Even if the values in the pattern are '0' you still get the
true DPI as an option in the menus.
When you specify a size for a scalable font, you should use points,
never pixels. Points are a physical unit of measurement. There are
always 72 points per inch. Never more or less. So to scale fonts
properly on a screen the scaler needs to know the resolution of the
display in pixels per inch in order to render text at a measurable
physical point size. In the current X11 world it is still up to the
user to correctly specify the actual screen resolution when requesting a
scalable font to render text with, and this is now possible to
demonstrate with this change to Xfontsel.
So with the actual correct resolution selected from the resX and resY
menus (and if the resolution figures are accurate and if the display
hasn't been scaled by the hardware or, e.g. XrandR) then choosing any
avaliable point size will show the sample text with a height on the
screen physically matching the chosen point size. To that end the
default pixelSizeList resource has been changed to just "0", as it
should never be changed, and instead the default "pointSizeList"
resource has been extended with a list of reasonable real-world
sample (deci)point sizes.
[also touch up the help text and call exit() to exit main()]
Signed-off-by: Greg A. Woods <woods@robohack.ca>
Diffstat (limited to 'app-defaults')
-rw-r--r-- | app-defaults/XFontSel | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app-defaults/XFontSel b/app-defaults/XFontSel index 371eab1..4faa810 100644 --- a/app-defaults/XFontSel +++ b/app-defaults/XFontSel @@ -36,8 +36,8 @@ *appDefaultsVersion: 1 -*pixelSizeList: 7, 30, 40, 50, 60 -*pointSizeList: 250, 300, 350, 400 +*pixelSizeList: 0 +*pointSizeList: 80, 90, 100, 110, 120, 140, 160, 170, 180, 200, 250, 300, 350, 400 XFontSel.cursor: left_ptr *allowShellResize: true |