Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.8.0
-
None
-
iMX6.
Custom Embedded Linux.
Description
I'm writing software for an embedded system, that has only the DejaVu TTF font files in it's font directory. Setting "Sans" as font family with QApplication::setFont(QFont("Sans")) selects the only serif font file in the directory called DejaVuMathTexGyre.ttf. By setting font to "DejaVu Sans" the problem can be resolved for the UI-Strings, but this doesn't effect the virtual keyboard for example which uses "Sans" font family.
Removing the DejaVuMathTexGyre.ttf file causes the call to setFont(QFont("Sans")) to work then for both strings and keyboard.
The following code:
bool isSansSerif = (QFont("Sans").styleHint() & QFont::SansSerif); bool isSerif = (QFont("Sans").styleHint() & QFont::Serif); if(isSansSerif) { qDebug()<<"Sans"; } if(isSerif) { qDebug()<<"Serif"; }
Outputs: "Serif" on Embedded linux as well as on x86_64 Linux.