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 /include/core/SkFontArguments.h | |
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 'include/core/SkFontArguments.h')
-rw-r--r-- | include/core/SkFontArguments.h | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/include/core/SkFontArguments.h b/include/core/SkFontArguments.h deleted file mode 100644 index 473798fb84..0000000000 --- a/include/core/SkFontArguments.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkFontAgruments_DEFINED -#define SkFontAgruments_DEFINED - -#include "SkScalar.h" -#include "SkTypes.h" - -/** Represents a set of actual arguments for a font. */ -struct SkFontArguments { - struct VariationPosition { - struct Coordinate { - SkFourByteTag axis; - SkScalar value; - }; - const Coordinate* coordinates; - int coordinateCount; - }; - // deprecated, use VariationCoordinate instead - struct Axis { - SkFourByteTag fTag; - SkScalar fStyleValue; - }; - - SkFontArguments() : fCollectionIndex(0), fVariationDesignPosition{nullptr, 0} {} - - /** Specify the index of the desired font. - * - * Font formats like ttc, dfont, cff, cid, pfr, t42, t1, and fon may actually be indexed - * collections of fonts. - */ - SkFontArguments& setCollectionIndex(int collectionIndex) { - fCollectionIndex = collectionIndex; - return *this; - } - - // deprecated, use setVariationDesignPosition instead. - SkFontArguments& setAxes(const Axis* axes, int axisCount) { - fVariationDesignPosition.coordinates = - reinterpret_cast<const VariationPosition::Coordinate*>(axes); - fVariationDesignPosition.coordinateCount = axisCount; - return *this; - } - - /** Specify a position in the variation design space. - * - * Any axis not specified will use the default value. - * Any specified axis not actually present in the font will be ignored. - * - * @param position not copied. The value must remain valid for life of SkFontArguments. - */ - SkFontArguments& setVariationDesignPosition(VariationPosition position) { - fVariationDesignPosition.coordinates = position.coordinates; - fVariationDesignPosition.coordinateCount = position.coordinateCount; - return *this; - } - - int getCollectionIndex() const { - return fCollectionIndex; - } - // deprecated, use getVariationDesignPosition instead. - const Axis* getAxes(int* axisCount) const { - *axisCount = fVariationDesignPosition.coordinateCount; - return reinterpret_cast<const Axis*>(fVariationDesignPosition.coordinates); - } - VariationPosition getVariationDesignPosition() const { - return fVariationDesignPosition; - } -private: - int fCollectionIndex; - VariationPosition fVariationDesignPosition; -}; - -#endif |