diff options
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r-- | include/core/SkPaint.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 39e4f65ab2..83d5502742 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -180,8 +180,8 @@ public: */ void unflatten(SkReadBuffer& buffer); - /** Sets all paint's contents to their initial values. This is equivalent to replacing - the paint with the result of SkPaint(). + /** Sets all SkPaint contents to their initial values. This is equivalent to replacing + SkPaint with the result of SkPaint(). */ void reset(); @@ -1062,11 +1062,17 @@ public: /** \enum SkPaint::TextEncoding TextEncoding determines whether text specifies character codes and their encoded - size, or glyph indices. Character codes use the encoding specified by the Unicode standard. + size, or glyph indices. Characters are encoded as specified by the Unicode standard. Character codes encoded size are specified by UTF-8, UTF-16, or UTF-32. - All character encodings are able to represent all of Unicode, differing only - in the total storage required. UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes. UTF-16 (RFC 2781) encodes each character as one or two 16-bit words. UTF-32 encodes each character as one 32-bit word. + All character code formats are able to represent all of Unicode, differing only + in the total storage required. + + UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes. + + UTF-16 (RFC 2781) encodes each character as one or two 16-bit words. + + UTF-32 encodes each character as one 32-bit word. font manager uses font data to convert character code points into glyph indices. A glyph index is a 16-bit word. @@ -1112,6 +1118,11 @@ public: */ struct FontMetrics { + /** \enum SkPaint::FontMetrics::FontMetricsFlags + FontMetricsFlags are set in fFlags when underline and strikeout metrics are valid; + the underline or strikeout metric may be valid and zero. + Fonts with embedded bitmaps may not have valid underline or strikeout metrics. + */ enum FontMetricsFlags { kUnderlineThicknessIsValid_Flag = 1 << 0, //!< Set if fUnderlineThickness is valid. kUnderlinePositionIsValid_Flag = 1 << 1, //!< Set if fUnderlinePosition is valid. @@ -1150,6 +1161,7 @@ public: Zero if no average width is stored in the font. */ SkScalar fAvgCharWidth; + SkScalar fMaxCharWidth; //!< Maximum character width. /** Minimum bounding box x value for all glyphs. @@ -1297,8 +1309,7 @@ public: SkPaint::TextEncoding specifies how text represents characters or glyphs. glyphs may be nullptr, to compute the glyph count. - Does not check text for valid character encoding or valid - glyph indices. + Does not check text for valid character codes or valid glyph indices. If byteLength equals zero, returns zero. If byteLength includes a partial character, the partial character is ignored. |