diff options
author | Ben Wagner <bungeman@google.com> | 2017-02-24 11:15:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-24 16:59:05 +0000 |
commit | fc497343cbcbd526f77da913ae2feca0e1b1b866 (patch) | |
tree | 98d57a95e80467c180b74f698072ea04c674af27 /src/ports/SkFontMgr_android_parser.cpp | |
parent | 9fe1b22249171087a0f01c67369559f6fd491540 (diff) |
Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.
Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b
Reviewed-on: https://skia-review.googlesource.com/8861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontMgr_android_parser.cpp')
-rw-r--r-- | src/ports/SkFontMgr_android_parser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ports/SkFontMgr_android_parser.cpp b/src/ports/SkFontMgr_android_parser.cpp index e5fdcd0dbf..e50a73946a 100644 --- a/src/ports/SkFontMgr_android_parser.cpp +++ b/src/ports/SkFontMgr_android_parser.cpp @@ -167,8 +167,8 @@ static const TagHandler axisHandler = { if (valueLen == 4) { axisTag = SkSetFourByteTag(value[0], value[1], value[2], value[3]); axisTagIsValid = true; - for (int j = 0; j < file.fAxes.count() - 1; ++j) { - if (file.fAxes[j].fTag == axisTag) { + for (int j = 0; j < file.fVariationDesignPosition.count() - 1; ++j) { + if (file.fVariationDesignPosition[j].axis == axisTag) { axisTagIsValid = false; SK_FONTCONFIGPARSER_WARNING("'%c%c%c%c' axis specified more than once", (axisTag >> 24) & 0xFF, @@ -189,9 +189,9 @@ static const TagHandler axisHandler = { } } if (axisTagIsValid && axisStyleValueIsValid) { - SkFontMgr::FontParameters::Axis& axis = file.fAxes.push_back(); - axis.fTag = axisTag; - axis.fStyleValue = SkFixedToScalar(axisStyleValue); + auto& coordinate = file.fVariationDesignPosition.push_back(); + coordinate.axis = axisTag; + coordinate.value = SkFixedToScalar(axisStyleValue); } }, /*end*/nullptr, |