From f1d7b86dd267ed5b59e51339edc4553d37561a39 Mon Sep 17 00:00:00 2001 From: d34d Date: Wed, 3 Feb 2016 13:07:09 -0800 Subject: Fonts: add sans-serif fallback fonts first This fixes an issue where the non line breaking hyphen U+2011 being displayed as and underscore due to the glyph being found in one of the fallback fonts. Adding the sans-serif(Roboto) fonts as fallbacks first allows the glyph to be found in this family before moving on to the other fallback fonts. Change-Id: Ie6ac7e8c838f3a2b864ff25bc9569a8f37beffb9 TICKET: CYNGNOS-1855 --- graphics/java/android/graphics/Typeface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics') diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 4e9788a..6aba87b 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -379,9 +379,9 @@ public class Typeface { if (configFile == themeConfigFile) { systemFontConfig = FontListParser.parse(systemConfigFile, getSystemFontDirLocation().getAbsolutePath()); + addFallbackFontsForFamilyName(systemFontConfig, fontConfig, SANS_SERIF_FAMILY_NAME); addMissingFontFamilies(systemFontConfig, fontConfig); addMissingFontAliases(systemFontConfig, fontConfig); - addFallbackFontsForFamilyName(systemFontConfig, fontConfig, SANS_SERIF_FAMILY_NAME); } List familyList = new ArrayList(); -- cgit v1.1