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

Unified Diff: src/ports/SkFontConfigInterface_android.cpp

Issue 382053003: Update find_name_and_attributes to take ttc index. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move find_name_and_attributes to SkTypeface_FreeType::ScanFont. Created 6 years, 5 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 | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontConfigInterface_android.cpp
diff --git a/src/ports/SkFontConfigInterface_android.cpp b/src/ports/SkFontConfigInterface_android.cpp
index 1f901b9fa9f7457e876c12039656d950551a8153..236f62b808275ced3e71a52dacffe5b7cb3d256a 100644
--- a/src/ports/SkFontConfigInterface_android.cpp
+++ b/src/ports/SkFontConfigInterface_android.cpp
@@ -11,6 +11,7 @@
#include "SkFontConfigParser_android.h"
#include "SkFontConfigTypeface.h"
+#include "SkFontHost_FreeType_common.h"
#include "SkFontMgr.h"
#include "SkGlyphCache.h"
#include "SkPaint.h"
@@ -196,10 +197,6 @@ static void insert_into_name_dict(SkTDict<FamilyRecID>& familyNameDict,
}
}
-// Defined in SkFontHost_FreeType.cpp
-bool find_name_and_attributes(SkStream* stream, SkString* name,
- SkTypeface::Style* style, bool* isFixedWidth);
-
///////////////////////////////////////////////////////////////////////////////
SkFontConfigInterfaceAndroid::SkFontConfigInterfaceAndroid(SkTDArray<FontFamily*>& fontFamilies) :
@@ -241,8 +238,9 @@ SkFontConfigInterfaceAndroid::SkFontConfigInterfaceAndroid(SkTDArray<FontFamily*
if (stream.get() != NULL) {
bool isFixedWidth;
SkString name;
- fontRec.fIsValid = find_name_and_attributes(stream.get(), &name,
- &fontRec.fStyle, &isFixedWidth);
+ fontRec.fIsValid = SkTypeface_FreeType::ScanFont(stream.get(), 0,
+ &name, &fontRec.fStyle,
+ &isFixedWidth);
} else {
if (!family->fIsFallbackFont) {
SkDebugf("---- failed to open <%s> as a font\n", filename.c_str());
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698