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); |
} |