Juce Font size doesn't match the system


#1

In the Juce Demo when I select a font and size (for example, 12 point Lucida Console), the resulting output is quite different from what I get if I specify the same font and size in another application (for example, LibreOffice Writer or the Fonts control panel applet). This image shows the difference. The top is Visual Studio, the bottom is Juce. Both are Lucida Console 12:

[attachment=0]JuceFontHeightBug.png[/attachment]


#2

The Juce Font system has never sized its fonts based on point height. It has always sized its fonts based on “the height in pixels (can be fractional)” as a float.


#3

Is there a simple formula for conversion?


#4

font size in pixels = font size in points * dpi / 72


#5

Whats the proper value for DPI to match what Windows displays then?


#6

"Most Windows systems are shipped with the display DPI set to 96 PPI."


#7

Having just been playing around with a high-DPI android phone, I can see that display DPI is something I’ll need to address pretty soon. It has been pretty easy up until now to just think in terms of pixels, but those days are coming to an end!


#8

At long last. Finally font hinting can die!

Microsoft mentioned a 291 dpi 10.1" 2560x1440 display when talking about Windows 8. Want.


#9

One thing that would be useful is a display DPI/PPI query function.