Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: src/ports/SkFontConfigInterface_direct.cpp

Issue 2222523002: Filter for TrueType fonts, avoid Type-1 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add CFF according to Behdad's recommendation Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontConfigInterface_direct.cpp
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp
index 345544724695a1729e1644693199f45f49913148..a13eb70c63f5b3527fb940cc0bcdb8dbe918fb65 100644
--- a/src/ports/SkFontConfigInterface_direct.cpp
+++ b/src/ports/SkFontConfigInterface_direct.cpp
@@ -593,6 +593,11 @@ bool SkFontConfigInterfaceDirect::matchFamilyName(const char familyName[],
FcPatternAddBool(pattern, FC_SCALABLE, FcTrue);
+ // Using hb-ot-font functions for glyph lookup in Chrome does not support
+ // Type1 fonts.
+ FcPatternAddString(pattern, FC_FONTFORMAT, reinterpret_cast<const FcChar8*>("TrueType"));
+ FcPatternAddString(pattern, FC_FONTFORMAT, reinterpret_cast<const FcChar8*>("CFF"));
+
FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698