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

Unified Diff: src/ports/SkFontMgr_custom.cpp

Issue 1817633002: Make FreeType usable on Windows. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: add missing file Created 4 years, 9 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/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontMgr_custom_empty_factory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_custom.cpp
diff --git a/src/ports/SkFontMgr_custom.cpp b/src/ports/SkFontMgr_custom.cpp
index 158ba006d4f16ad3b0b1b9a94a006ee68fb2a59f..c77fe394b138cf14868a6ce368e799474d4829cb 100644
--- a/src/ports/SkFontMgr_custom.cpp
+++ b/src/ports/SkFontMgr_custom.cpp
@@ -506,3 +506,23 @@ private:
SkFontMgr* SkFontMgr_New_Custom_Embedded(const SkEmbeddedResourceHeader* header) {
return new SkFontMgr_Custom(EmbeddedSystemFontLoader(header));
}
+
+///////////////////////////////////////////////////////////////////////////////
+
+class EmptyFontLoader : public SkFontMgr_Custom::SystemFontLoader {
+public:
+ EmptyFontLoader() { }
+
+ void loadSystemFonts(const SkTypeface_FreeType::Scanner& scanner,
+ SkFontMgr_Custom::Families* families) const override
+ {
+ SkFontStyleSet_Custom* family = new SkFontStyleSet_Custom(SkString());
+ families->push_back().reset(family);
+ family->appendTypeface(new SkTypeface_Empty);
+ }
+
+};
+
+SK_API SkFontMgr* SkFontMgr_New_Custom_Empty() {
+ return new SkFontMgr_Custom(EmptyFontLoader());
+}
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontMgr_custom_empty_factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698