PDA

View Full Version : Cross platform font issue.



manmohan
26th February 2013, 12:12
Presently we are developing a cross platform application using Qt and the requirements are to maintain font sizes same on mac and windows. In windows the font looks good but on mac the fonts are very small.

How to manage cross platform fonts sizes?

Fonts used are ttfs.

Thanks & regards,
Mohan.

sonulohani
27th February 2013, 11:21
Use the Qt macros like shown below


#ifdef Q_OS_WIN32
//windows font size
#elif Q_OS_MAC
//mac font size
#endif

manmohan
16th April 2013, 07:43
How about the fonts that will be used through style sheets in qt designer.

BalaQT
16th April 2013, 08:38
How about the fonts that will be used through style sheets in qt designer.
The font given in stylesheet, need to be available in ur target.


Qt uses FreeType 2 font engine to produce font output
http://qt-project.org/doc/qt-5.0/qtdoc/qt-embedded-fonts.html

hope it helps
Bala