diff options
author | Mike Reed <reed@google.com> | 2018-11-11 20:37:45 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2018-11-12 02:40:59 +0000 |
commit | 477fb9116337e9dd95cfdbf0c0d312d5d691e998 (patch) | |
tree | 56f6a797d5f2bf601e11491d23993b1d235d1243 /include | |
parent | 9a06c57d430c837b7117c2d359a1db325d0b98a1 (diff) | |
download | skqp-477fb9116337e9dd95cfdbf0c0d312d5d691e998.tar.gz |
add getwidths to SkFont
It *seems* that chrome only ever uses glyphs, so I hope we can skip the encoding parameter.
Bug: skia:
Change-Id: I3b6857ba6a37050a9fd0913a16b980bc45d54bda
Reviewed-on: https://skia-review.googlesource.com/c/170341
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFont.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h index 9d7bfa2136..6b31ecefb0 100644 --- a/include/core/SkFont.h +++ b/include/core/SkFont.h @@ -139,6 +139,9 @@ public: SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding, SkRect* bounds = nullptr) const; + void getWidths(const uint16_t glyphs[], int count, SkScalar widths[], + SkRect bounds[] = nullptr) const; + SkScalar getMetrics(SkFontMetrics* metrics) const; SkScalar getSpacing() const { return this->getMetrics(nullptr); } |