Skip to content

Conversation

@nbuwe
Copy link
Contributor

@nbuwe nbuwe commented Mar 2, 2025

Specify just the "ptSz" in the constructed XLFD name (point size in units of 0.1pt). Do not specify the "pxlsz" (pixel size) component - it depends on the target resolution. Specifying pixel size N and point size N*10 implicitly hardcodes 75dpi (well, 72, but...) and when you have only 100dpi fonts the results are poor.

I haven't tested the case where you have both 75dpi and 100dpi but arguably if you make both variants available in your font path "just in case", the onus is on you to order them appropriately based on your screen resolution.

Specify just the "ptSz" in the constructed XLFD name (point size in
units of 0.1pt).  Do _not_ specify the "pxlsz" (pixel size) component
- it depends on the target resolution.  Specifying pixel size N and
point size N*10 implicitly hardcodes 75dpi (well, 72, but...) and when
you have only 100dpi fonts the results are poor.

I haven't tested the case where you have both 75dpi and 100dpi but
arguably if you make both variants available in your font path "just
in case", the onus is on you to order them appropriately based on your
screen resolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant