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

Unified Diff: include/core/SkTypeface.h

Issue 1163283002: update portable fonts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update font creation code 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: include/core/SkTypeface.h
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index f0059deb25f060b3b9a0cd212425edce504e2c85..a0cdca907d84e284e99e6524a1bf5fb6376c7c1a 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -320,6 +320,11 @@ public:
this->onGetFontDescriptor(desc, isLocal);
}
+ // experimental
+ static void AddCreateDelegate(SkTypeface* (*delegate)(const char [], SkTypeface::Style )) {
mtklein 2015/06/09 14:39:49 Something like SetGlobalCreateFromNameDelegate? P
caryclark 2015/06/09 16:37:21 Renamed as recommended. I have no opinion about wh
+ fCreateDelegate = delegate;
+ }
+
protected:
// The type of advance data wanted.
enum PerGlyphInfo {
@@ -411,6 +416,8 @@ private:
SkFontStyle fStyle;
bool fIsFixedPitch;
+ static SkTypeface* (*fCreateDelegate)(const char name[], SkTypeface::Style style);
bungeman-skia 2015/06/09 14:47:51 We often have a typedef (and end it with Proc) to
caryclark 2015/06/09 16:37:21 Done.
+
friend class SkPaint;
friend class SkGlyphCache; // GetDefaultTypeface

Powered by Google App Engine
This is Rietveld 408576698