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

Unified Diff: src/core/SkFontHost.cpp

Issue 105223006: Remove a layer of indirection and code from SkFontHost. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Rebase, should now work due to Android changes. Created 6 years, 3 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 | « include/core/SkFontHost.h ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFontHost.cpp
diff --git a/src/core/SkFontHost.cpp b/src/core/SkFontHost.cpp
index a4055a1d8a10a1cbd57cbb54a74a98711a33d017..c582ba5bfd4ca1ba11619c766f8ee53cc710a4e3 100644
--- a/src/core/SkFontHost.cpp
+++ b/src/core/SkFontHost.cpp
@@ -207,33 +207,3 @@ SkFontMgr* SkFontMgr::RefDefault() {
SK_DECLARE_STATIC_LAZY_PTR(SkFontMgr, singleton, CreateDefault);
return SkRef(singleton.get());
}
-
-//////////////////////////////////////////////////////////////////////////
-
-SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
- const char familyName[],
- SkTypeface::Style style) {
- SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
- if (familyFace) {
- bool bold = style & SkTypeface::kBold;
- bool italic = style & SkTypeface::kItalic;
- SkFontStyle newStyle = SkFontStyle(bold ? SkFontStyle::kBold_Weight
- : SkFontStyle::kNormal_Weight,
- SkFontStyle::kNormal_Width,
- italic ? SkFontStyle::kItalic_Slant
- : SkFontStyle::kUpright_Slant);
- return fm->matchFaceStyle(familyFace, newStyle);
- } else {
- return fm->legacyCreateTypeface(familyName, style);
- }
-}
-
-SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) {
- SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
- return fm->createFromFile(path);
-}
-
-SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) {
- SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
- return fm->createFromStream(stream);
-}
« no previous file with comments | « include/core/SkFontHost.h ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698