I have a QT application where font family and size is set in QML
On windows and linux it works fine. However, on OS X text appears too small. This is something that someone else wrote. It uses Segoe UI font. As I understand in QT 4.7 I can ass开发者_JAVA技巧ign fallback fonts with a coma. However the defined point sizes still seem to be too small.
Is there something I can do to fix this issue without changing the way how this looks on other platforms?
If you use font.pointSize
to set the size of the font then the resulting pixel size depends on the device or more generally, the dpi of the screen (as far as the system is aware of it).
This means that if you really meant the font to have the same pixel size, whatever the dpi of the screen, then you should be using font.pixelSize
to set the size of your fonts instead.
精彩评论