diff options
author | 2016-04-12 13:45:06 -0700 | |
---|---|---|
committer | 2016-04-12 13:45:06 -0700 | |
commit | 11a77c6e0634e2feb6fe4e74806db2fdd2a799ec (patch) | |
tree | d62d216858bbe136c4b41b9ec563ea35bd7ff1ed /src/ports/SkFontConfigInterface_direct.h | |
parent | 0586f5cc9713268238394411a5daa2c7758b092b (diff) |
Begin switch to SkFontStyle for legacy calls.
This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides
only the old interface.
Ideally, everyone would switch directly to SkFontMgr and use one of the
newer calls, but there is currently no path for current users to get
there. This updates all the internals to use SkFontStyle, after
switching these over the higher level APIs can be switched.
The Chromium follow on patch can be seen at https://crrev.com/1877673002
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002
TBR=reed
This doesn't really change API, just modernizes it.
Review URL: https://codereview.chromium.org/1873923002
Diffstat (limited to 'src/ports/SkFontConfigInterface_direct.h')
-rw-r--r-- | src/ports/SkFontConfigInterface_direct.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ports/SkFontConfigInterface_direct.h b/src/ports/SkFontConfigInterface_direct.h index a048aed7e7..22dd9f1994 100644 --- a/src/ports/SkFontConfigInterface_direct.h +++ b/src/ports/SkFontConfigInterface_direct.h @@ -17,11 +17,20 @@ public: SkFontConfigInterfaceDirect(); ~SkFontConfigInterfaceDirect() override; +#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE bool matchFamilyName(const char familyName[], SkTypeface::Style requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, SkTypeface::Style* outStyle) override; +#else + bool matchFamilyName(const char familyName[], + SkFontStyle requested, + FontIdentity* outFontIdentifier, + SkString* outFamilyName, + SkFontStyle* outStyle) override; + +#endif SkStreamAsset* openStream(const FontIdentity&) override; // new APIs |