diff options
author | Ben Wagner <bungeman@google.com> | 2017-02-23 20:48:43 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-23 20:48:53 +0000 |
commit | 97043299cb352f50f604878b7a1dc8ad127fc1c6 (patch) | |
tree | 3363bfc674ab808e735336898386076d9c3b9558 /src/ports/SkFontMgr_fontconfig.cpp | |
parent | 3f81f3703a68755c88f5cc4a87728b98f34c4cd4 (diff) |
Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 0f3d0c37dbcaf4ec271d5fe847becc9b1aa6f537.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Add SkTypeface::getVariationDesignPosition.
>
> Allow users to query a typeface's position in variation design space.
>
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> 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: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7
Reviewed-on: https://skia-review.googlesource.com/8929
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkFontMgr_fontconfig.cpp')
-rw-r--r-- | src/ports/SkFontMgr_fontconfig.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp index 85230b394e..63d720b390 100644 --- a/src/ports/SkFontMgr_fontconfig.cpp +++ b/src/ports/SkFontMgr_fontconfig.cpp @@ -899,24 +899,25 @@ protected: return new SkTypeface_stream(std::move(data), std::move(name), style, isFixedWidth); } - 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); bool isFixedPitch; 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 data = skstd::make_unique<SkFontData>(std::move(stream), args.getCollectionIndex(), + auto data = skstd::make_unique<SkFontData>(std::move(stream), params.getCollectionIndex(), axisValues.get(), axisDefinitions.count()); return new SkTypeface_stream(std::move(data), std::move(name), style, isFixedPitch); } |