diff options
author | bungeman <bungeman@google.com> | 2017-04-25 13:32:50 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-25 17:56:14 +0000 |
commit | bc096bffcbc9b640c09010247994cd64e064384a (patch) | |
tree | 8faafa1c727e123c76127bd61395c6fea162270a /src/ports/SkFontHost_mac.cpp | |
parent | e908b94d2f4642b25b2154eae2217d1a2eedcae9 (diff) |
Improve variation comment for iOS.
CTFontCopyVariationAxes returns nullptr for fonts which began life with
CGFontCreateWithDataProvider on macOS 10.10 and earlier and iOS 9 and
earlier. The issue was fixed in maxOS 10.11 and iOS 10. Improve the
existing comments to make this clear.
Change-Id: I0de1734e266d30aab7d38d0dd752f66259f677d9
Reviewed-on: https://skia-review.googlesource.com/14278
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontHost_mac.cpp')
-rw-r--r-- | src/ports/SkFontHost_mac.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 4c5added4c..b525ed597f 100644 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -1848,8 +1848,8 @@ int SkTypeface_Mac::onGetVariationDesignPosition( { // The CGFont variation data does not contain the tag. - // This call always returns nullptr on 10.10 and under for CGFontCreateWithDataProvider fonts. - // When this happens, there is no API to provide the tag. + // CTFontCopyVariationAxes returns nullptr for CGFontCreateWithDataProvider fonts with + // macOS 10.10 and iOS 9 or earlier. When this happens, there is no API to provide the tag. UniqueCFRef<CFArrayRef> ctAxes(CTFontCopyVariationAxes(fFontRef.get())); if (!ctAxes) { return -1; @@ -2425,8 +2425,8 @@ protected: // CTFont variation dictionary runs into bugs. So use the CTFont variation data // to match names to tags to create the appropriate CGFont. UniqueCFRef<CTFontRef> ct(CTFontCreateWithGraphicsFont(cg, 0, nullptr, nullptr)); - // This call always returns nullptr on 10.10 and under. - // When this happens, there is no API to provide the tag. + // CTFontCopyVariationAxes returns nullptr for CGFontCreateWithDataProvider fonts with + // macOS 10.10 and iOS 9 or earlier. When this happens, there is no API to provide the tag. UniqueCFRef<CFArrayRef> ctAxes(CTFontCopyVariationAxes(ct.get())); if (!ctAxes) { return nullptr; |