diff options
author | Ben Wagner <bungeman@google.com> | 2017-02-17 18:38:52 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-17 18:39:09 +0000 |
commit | 7d07d4663822c05e421f1f50460a985ab43adac4 (patch) | |
tree | 708aca529955646b35468d4364dd75517765ad9a /src/ports/SkFontMgr_FontConfigInterface.cpp | |
parent | 87e7f820f74a990a59fb8f1d5c182584ce586ecf (diff) |
Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 87e7f820f74a990a59fb8f1d5c182584ce586ecf.
Reason for revert: Failed a test on Mac
Original change's description:
> Add SkTypeface::getVariationDesignPosition.
>
> Allow users to query a typeface's position in variation design space.
>
> Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
> Reviewed-on: https://skia-review.googlesource.com/7130
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ia65792083642dbe9333a62eb75d162931b57cffd
Reviewed-on: https://skia-review.googlesource.com/8670
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontMgr_FontConfigInterface.cpp')
-rw-r--r-- | src/ports/SkFontMgr_FontConfigInterface.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ports/SkFontMgr_FontConfigInterface.cpp b/src/ports/SkFontMgr_FontConfigInterface.cpp index 6264710008..81c4868e5d 100644 --- a/src/ports/SkFontMgr_FontConfigInterface.cpp +++ b/src/ports/SkFontMgr_FontConfigInterface.cpp @@ -222,7 +222,7 @@ protected: return SkTypeface_FCI::Create(std::move(fontData), std::move(name), style, isFixedPitch); } - SkTypeface* onCreateFromStream(SkStreamAsset* s, const SkFontArguments& args) const override { + SkTypeface* onCreateFromStream(SkStreamAsset* s, const FontParameters& params) const override { using Scanner = SkTypeface_FreeType::Scanner; std::unique_ptr<SkStreamAsset> stream(s); const size_t length = stream->getLength(); @@ -237,18 +237,19 @@ protected: SkFontStyle style; SkString name; Scanner::AxisDefinitions axisDefinitions; - if (!fScanner.scanFont(stream.get(), args.getCollectionIndex(), + if (!fScanner.scanFont(stream.get(), params.getCollectionIndex(), &name, &style, &isFixedPitch, &axisDefinitions)) { return nullptr; } + int paramAxisCount; + const FontParameters::Axis* paramAxes = params.getAxes(¶mAxisCount); SkAutoSTMalloc<4, SkFixed> axisValues(axisDefinitions.count()); - Scanner::computeAxisValues(axisDefinitions, args.getVariationDesignPosition(), - axisValues, name); + Scanner::computeAxisValues(axisDefinitions, paramAxes, paramAxisCount, axisValues, name); auto fontData = skstd::make_unique<SkFontData>(std::move(stream), - args.getCollectionIndex(), + params.getCollectionIndex(), axisValues.get(), axisDefinitions.count()); return SkTypeface_FCI::Create(std::move(fontData), std::move(name), style, isFixedPitch); |