From 1dd9a0af4f577ccb5578cea562a98686c8e290e6 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 9 Jul 2014 09:49:59 +0200 Subject: Fix fallbacks for adapted common script When the platform plugin gives us specific fallbacks for a specific script, we need to respect this, and load the correct font family regardless of which writing systems it supports. This is especially important since the common script is adapted to match surrounding, proper scripts, so characters such as digits next to e.g. Hebrew text will be marked as Hebrew. On stock Android, there is a single Hebrew font, and this would previously be put in all fallback slots for Hebrew regardless of what fallback fonts were dictated by the platform plugin. Since this font does not support the digits, they would show up as boxes. [ChangeLog][Android] Fixed common characters like digits and punctuation showing as boxes when positioned next to non-latin scripts. Task-number: QTBUG-39377 Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9 Reviewed-by: Konstantin Ritt --- src/gui/text/qfontdatabase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qfontdatabase.h') diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h index 9986ef6c60..833e574707 100644 --- a/src/gui/text/qfontdatabase.h +++ b/src/gui/text/qfontdatabase.h @@ -160,7 +160,7 @@ private: static void createDatabase(); static void parseFontName(const QString &name, QString &foundry, QString &family); static QString resolveFontFamilyAlias(const QString &family); - static QFontEngine *findFont(int script, const QFontPrivate *fp, const QFontDef &request, bool multi = false); + static QFontEngine *findFont(int script, const QFontPrivate *fp, const QFontDef &request, bool multi = false, bool fallback = false); static void load(const QFontPrivate *d, int script); friend struct QFontDef; -- cgit v1.2.3