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

Unified Diff: src/core/SkTypeface.cpp

Issue 1163283002: update portable fonts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rewrite aaxfermodes.cpp to reduce test area 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
« no previous file with comments | « gm/aaxfermodes.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 342c41553d15da8e98a2764eb46e40fe808ec4e7..fcbb7452d0297e4e5add82ff4ac5c222553bf36a 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -19,6 +19,9 @@ SkTypeface::SkTypeface(const SkFontStyle& style, SkFontID fontID, bool isFixedPi
SkTypeface::~SkTypeface() { }
+
+SkTypeface* (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style ) = NULL;
+
///////////////////////////////////////////////////////////////////////////////
class SkEmptyTypeface : public SkTypeface {
@@ -110,6 +113,12 @@ bool SkTypeface::Equal(const SkTypeface* facea, const SkTypeface* faceb) {
///////////////////////////////////////////////////////////////////////////////
SkTypeface* SkTypeface::CreateFromName(const char name[], Style style) {
+ if (gCreateTypefaceDelegate) {
+ SkTypeface* result = (*gCreateTypefaceDelegate)(name, style);
+ if (result) {
+ return result;
+ }
+ }
if (NULL == name) {
return RefDefault(style);
}
« no previous file with comments | « gm/aaxfermodes.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698