[Solved] Arm Linux Qt5.3.2 checklist to support simplified chinese?
-
When I debug my app under Ubuntu it displays Chinese characters OK. However under Arm/Linux it displays empty boxes. I conditionally load a simplified Chinese ttf or DejaVu Serif, depending on a setting.
- I have a set of ttf's for DejaVu but a single file for SimpChinese.ttf (really DFSong1B-GB).
- I have none nothing for the locale, etc.
- If I knew what else to try I'd be better off :)
(SimpChinese.ttf (really DFSong1B-GB) was not loading proper unicode mapping...)
-
Hi,
Might be a silly question but did you check that the font is loaded successfully ?
-
@SGaist - I am just starting to implement and debug it. All I know is that I set FontFamily to the name (absent ttf file extension) and the font ttf file is in the same directory that does launch. It occurs to me that "DFSong1B-GB" is probably the font family despite my renaming the file.
-
Are you using QFontDatabase ?
-
I am simply using QFont to load a font. The problem was that the font I installed on the device did not support Unicode, I guess. I put unifont on the device and it works.
I am now down to legibility issues at the 10-12 pixel size allocations in the device. That is sufficient for Latin ASCII but not enough for Hanzi. I am looking for a better font face and balancing light/bold/etc. for readability.
QFont fontBold; switch (HMI_settings.u16TextLang) { default: fontBold.setFamily((FontName)); //(QStringLiteral) break; case Lang_SimpChinese: break; } printf ("%s\n", FontName.toLatin1().constData()); fontBold.setPixelSize(12*HMI_SCALE); fontBold.setBold(true); fontBold.setItalic(false); fontBold.setWeight(75); fontBold.setStyleStrategy(QFont::PreferAntialias);