diff options
author | bungeman <bungeman@google.com> | 2015-05-20 09:21:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-20 09:21:04 -0700 |
commit | 41868fe5625fc3bd70daa3f461c881b5db6a9265 (patch) | |
tree | 6f6d670bbf415a70c152b0a6332a0428fb0d77b4 /src/ports/SkFontHost_FreeType_common.h | |
parent | d223eb36a0be2bb5a278a483d6289a16b28eaf1a (diff) |
Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.
Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97
Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9
Review URL: https://codereview.chromium.org/1027373002
Diffstat (limited to 'src/ports/SkFontHost_FreeType_common.h')
-rw-r--r-- | src/ports/SkFontHost_FreeType_common.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h index 857d2c8990..8ae872c1da 100644 --- a/src/ports/SkFontHost_FreeType_common.h +++ b/src/ports/SkFontHost_FreeType_common.h @@ -43,9 +43,17 @@ public: public: Scanner(); ~Scanner(); + struct AxisDefinition { + SkFourByteTag fTag; + SkFixed fMinimum; + SkFixed fDefault; + SkFixed fMaximum; + }; + using AxisDefinitions = SkSTArray<4, AxisDefinition, true>; bool recognizedFont(SkStream* stream, int* numFonts) const; bool scanFont(SkStream* stream, int ttcIndex, - SkString* name, SkFontStyle* style, bool* isFixedPitch) const; + SkString* name, SkFontStyle* style, bool* isFixedPitch, + AxisDefinitions* axes) const; private: FT_Face openFace(SkStream* stream, int ttcIndex, FT_Stream ftStream) const; FT_Library fLibrary; |