diff options
author | bungeman <bungeman@google.com> | 2016-04-12 13:45:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-12 13:45:06 -0700 |
commit | 11a77c6e0634e2feb6fe4e74806db2fdd2a799ec (patch) | |
tree | d62d216858bbe136c4b41b9ec563ea35bd7ff1ed /include/ports/SkFontConfigInterface.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 'include/ports/SkFontConfigInterface.h')
-rw-r--r-- | include/ports/SkFontConfigInterface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h index 063cb9d553..464251bc2d 100644 --- a/include/ports/SkFontConfigInterface.h +++ b/include/ports/SkFontConfigInterface.h @@ -80,11 +80,19 @@ public: * * If a match is not found, return false, and ignore all out parameters. */ +#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE virtual bool matchFamilyName(const char familyName[], SkTypeface::Style requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, SkTypeface::Style* outStyle) = 0; +#else + virtual bool matchFamilyName(const char familyName[], + SkFontStyle requested, + FontIdentity* outFontIdentifier, + SkString* outFamilyName, + SkFontStyle* outStyle) = 0; +#endif /** * Given a FontRef, open a stream to access its data, or return null |