Actually thinking about this a bit more I think I have the solution to the font size madness:
- We do not want fixed physical sizes, as explained above
- We do not want fixed pixel sizes either - what happens if you have two monitors of the same size and different resolution? You want greater detail, not smaller fonts.
- What we want is the physical font size to be a *fixed fraction of the screen size*. That makes small screens have smaller fonts, large screens have larger fonts, and same-size screens of different resolutions (or even the same screen at different resolutions) have the same font sizes.
Doing the maths for my monitor, and assuming that the font sizes I like are optimal, FACTOR_X = 1/96 and FACTOR_Y = 1/77.
NB, if I am not mistaken, the font size refers to the vertical size of the characters. However there is no problem in defining it using the horizontal screen size - in fact I would recommend that option to deal with wide-screen aspect ratios consistently.
NB2, it would be a good idea to lower-limit the default font size in pixels, to make sure it can be rendered. Think mobile-phone sized displays.
Actually thinking about this a bit more I think I have the solution to the font size madness:
- We do not want fixed physical sizes, as explained above
- We do not want fixed pixel sizes either - what happens if you have two monitors of the same size and different resolution? You want greater detail, not smaller fonts.
- What we want is the physical font size to be a *fixed fraction of the screen size*. That makes small screens have smaller fonts, large screens have larger fonts, and same-size screens of different resolutions (or even the same screen at different resolutions) have the same font sizes.
I.e., we want:
FONT_SIZE_IN_PT = FACTOR_X * (RESOLUTION_X / DPI_X) / 72
or if we want to use the vertical screen size for reference
FONT_SIZE_IN_PT = FACTOR_Y * (RESOLUTION_Y / DPI_Y) / 72
Doing the maths for my monitor, and assuming that the font sizes I like are optimal, FACTOR_X = 1/96 and FACTOR_Y = 1/77.
NB, if I am not mistaken, the font size refers to the vertical size of the characters. However there is no problem in defining it using the horizontal screen size - in fact I would recommend that option to deal with wide-screen aspect ratios consistently.
NB2, it would be a good idea to lower-limit the default font size in pixels, to make sure it can be rendered. Think mobile-phone sized displays.