aboutsummaryrefslogtreecommitdiff
path: root/include/core/SkFont.h
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2018-11-23 15:27:51 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-11-23 20:54:16 +0000
commit358fcad1b864f464d197fc2761110dac0267f5d7 (patch)
treeb8fb8e03469d6b4f25b062da90bb0a04b9b1f64d /include/core/SkFont.h
parent7593b34081f2de0a828c33236ebc4b0d96591e81 (diff)
downloadskqp-358fcad1b864f464d197fc2761110dac0267f5d7.tar.gz
start to hide textparams on SkPaint
Bug: skia: Change-Id: Id73c983cc71d39fe587d355e690261627fa63aee Reviewed-on: https://skia-review.googlesource.com/c/172643 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkFont.h')
-rw-r--r--include/core/SkFont.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h
index ade29f3242..edf1699c9f 100644
--- a/include/core/SkFont.h
+++ b/include/core/SkFont.h
@@ -291,6 +291,23 @@ public:
return this->textToGlyphs(text, byteLength, encoding, nullptr, 0);
}
+ /** Returns true if all text corresponds to a non-zero glyph index.
+ Returns false if any characters in text are not supported in
+ SkTypeface.
+
+ If SkTextEncoding is kGlyphID_SkTextEncoding,
+ returns true if all glyph indices in text are non-zero;
+ does not check to see if text contains valid glyph indices for SkTypeface.
+
+ Returns true if byteLength is zero.
+
+ @param text array of characters or glyphs
+ @param byteLength number of bytes in text array
+ @param encoding text encoding
+ @return true if all text corresponds to a non-zero glyph index
+ */
+ bool containsText(const void* text, size_t byteLength, SkTextEncoding encoding) const;
+
/** Returns the advance width of text.
The advance is the normal distance to move before drawing additional text.
Returns the bounding box of text if bounds is not nullptr.