Font loading and font fallback in ICS+

444 views
Skip to first unread message

lasconic

unread,
Nov 13, 2012, 10:29:12 AM11/13/12
to andro...@googlegroups.com
Hi,
Not sure if it belongs to this group or to the developer mailing list, please let me know if I should post elsewhere.
The "QAndroidPlatformFontDatabase" implementation in the current beta lists the font in /system/fonts and add them to the database. The fallbackForFamily seems to assume Droid Sans is always present. I think it's also the default font for label or QML text. On two devices running ICS (including a nexus 7), we checked that Droid Sans is not present. The font has been replace by "Roboto regular". There is a symlink DroidSans.ttf -> Roboto-Regular.ttf in the /system/font directory, but the family name remains "Roboto Regular" of course.

This lead to at least one issue. If you create a QML app with e.g. german text and umlaut like "Zuletzt geöffnet" the umlaut is not displayed and replaced by a square. Droid sans is not found and necessitas fallback on DroidFallBack.ttf. This font is CJK, but the umlauts are not in. This bug is reproducible on ICS but not on Froyo.

Now I have finished to write, I've just found http://forum.xda-developers.com/showthread.php?t=1309621 and it looks very similar :)
I would suggest to add Roboto in the list of font fallback in QAndroidPlatformFontDatabase fallbacksForFamily. I will comment in the issue tracker.

lasconic

BogDan Vatra

unread,
Nov 13, 2012, 12:09:24 PM11/13/12
to andro...@googlegroups.com
This group is also ok :)

The fix will be shipped with the next release (beta2) before the end
of this year.

Cheers,
BogDan.


2012/11/13 lasconic <lasc...@gmail.com>:

Baltix kūrėjas

unread,
Jul 16, 2014, 7:10:22 PM7/16/14
to andro...@googlegroups.com
Hi BogDan,

The issue with lots of characters replaced by square in QT programs for Android still exist, see for example this bugreport: http://hub.qgis.org/issues/10069

It seems you forgot to add Roboto in the list of font fallback in QAndroidPlatformFontDatabase fallbacksForFamily :(


2012 m. lapkritis 13 d., antradienis 19:09:28 UTC+2, BogDan rašė:
The fix will be shipped with the next release (beta2) before the end
of this year.

Cheers,
BogDan.

2012/11/13 lasconic <lasc...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages