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

Unified Diff: src/ports/SkFontMgr_custom_directory_factory.cpp

Issue 1184923002: Refactor SkFontHost_linux into SkFontMgr_custom. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Don't export embedded. Created 5 years, 6 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
Index: src/ports/SkFontMgr_custom_directory_factory.cpp
diff --git a/src/ports/SkFontMgr_custom_directory_factory.cpp b/src/ports/SkFontMgr_custom_directory_factory.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0ca6f4b3b4b6968232437381278f13239ab3a3c9
--- /dev/null
+++ b/src/ports/SkFontMgr_custom_directory_factory.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkFontMgr.h"
+#include "SkFontMgr_custom.h"
+
+#ifndef SK_FONT_FILE_PREFIX
+# define SK_FONT_FILE_PREFIX "/usr/share/fonts/"
+#endif
+
+SkFontMgr* SkFontMgr::Factory() {
+ return SkFontMgr_New_Custom_Directory(SK_FONT_FILE_PREFIX);
+}

Powered by Google App Engine
This is Rietveld 408576698