aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2018-11-11 20:37:45 -0500
committerMike Reed <reed@google.com>2018-11-12 02:40:59 +0000
commit477fb9116337e9dd95cfdbf0c0d312d5d691e998 (patch)
tree56f6a797d5f2bf601e11491d23993b1d235d1243 /include
parent9a06c57d430c837b7117c2d359a1db325d0b98a1 (diff)
downloadskqp-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.h3
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); }