diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-30 16:46:10 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-30 16:46:10 +0000 |
commit | 7ae034d651f3536457b9654e3a36a91716a18948 (patch) | |
tree | 766418225976889d69787fab925523f31a2ce0cc /include/core/SkFont.h | |
parent | f7f9aa0e4721624395d247ffa1f0128cfac95341 (diff) |
Test font created from paint
This is meant to allow clients to migrate over to a SkFont api on canvas (e.g. drawText(text, font, paint)) while still permitting the current setters in paint (e.g. setTextSize, setFlags).
R=bungeman@google.com, eae@chromium.org, fmalita@google.com, fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/245953003
git-svn-id: http://skia.googlecode.com/svn/trunk@14997 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkFont.h')
-rw-r--r-- | include/core/SkFont.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h index 4891926326..9bdecd6eb9 100644 --- a/include/core/SkFont.h +++ b/include/core/SkFont.h @@ -5,6 +5,9 @@ * found in the LICENSE file. */ +#ifndef SkFont_DEFINED +#define SkFont_DEFINED + #include "SkRefCnt.h" #include "SkScalar.h" @@ -125,6 +128,12 @@ public: uint32_t getFlags() const { return fFlags; } MaskType getMaskType() const { return (MaskType)fMaskType; } + bool isVertical() const { return SkToBool(fFlags & kVertical_Flag); } + bool isEmbolden() const { return SkToBool(fFlags & kEmbolden_Flag); } + bool isEnableAutoHints() const { return SkToBool(fFlags & kEnableAutoHints_Flag); } + bool isEnableByteCodeHints() const { return SkToBool(fFlags & kEnableByteCodeHints_Flag); } + bool isUseNonLinearMetrics() const { return SkToBool(fFlags & kUseNonlinearMetrics_Flag); } + int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding, uint16_t glyphs[], int maxGlyphCount) const; @@ -148,3 +157,5 @@ private: uint8_t fMaskType; // uint8_t fPad; }; + +#endif |