@@ -709,7 +709,7 @@ Whether edge pixels draw opaque or with partial transparency.
709
709
710
710
# ------------------------------------------------------------------------------
711
711
712
- #Method uint16_t unicharToGlyph(SkUnichar uni) const
712
+ #Method SkGlyphID unicharToGlyph(SkUnichar uni) const
713
713
#In incomplete
714
714
#Line # incomplete ##
715
715
@@ -746,59 +746,6 @@ Whether edge pixels draw opaque or with partial transparency.
746
746
747
747
# ------------------------------------------------------------------------------
748
748
749
- #Method bool containsText(const void* text, size_t byteLength, SkTextEncoding encoding) const
750
- #In Utility
751
- #Line # returns if all text corresponds to Glyphs ##
752
- #Populate
753
-
754
- #NoExample
755
- #Description
756
- containsText succeeds for degree symbol, but cannot find a glyph index
757
- corresponding to the Unicode surrogate code point.
758
- ##
759
- SkFont font;
760
- const uint16_t goodChar = 0x00B0; // degree symbol
761
- const uint16_t badChar = 0xD800; // Unicode surrogate
762
- SkDebugf("0x%04x %c= has char\n", goodChar,
763
- font.containsText(&goodChar, 2, SkTextEncoding::kUTF16) ? '=' : '!');
764
- SkDebugf("0x%04x %c= has char\n", badChar,
765
- font.containsText(&badChar, 2, SkTextEncoding::kUTF16) ? '=' : '!');
766
-
767
- #StdOut
768
- 0x00b0 == has char
769
- 0xd800 != has char
770
- ##
771
- ##
772
-
773
- #Example
774
- #Description
775
- containsText returns true that glyph index is greater than zero, not
776
- that it corresponds to an entry in Typeface.
777
- ##
778
- SkFont font;
779
- const uint16_t goodGlyph = 511;
780
- const uint16_t zeroGlyph = 0;
781
- const uint16_t badGlyph = 65535; // larger than glyph count in font
782
- SkDebugf("0x%04x %c= has glyph\n", goodGlyph,
783
- font.containsText(&goodGlyph, 2, SkTextEncoding::kGlyphID) ? '=' : '!');
784
- SkDebugf("0x%04x %c= has glyph\n", zeroGlyph,
785
- font.containsText(&zeroGlyph, 2, SkTextEncoding::kGlyphID) ? '=' : '!');
786
- SkDebugf("0x%04x %c= has glyph\n", badGlyph,
787
- font.containsText(&badGlyph, 2, SkTextEncoding::kGlyphID) ? '=' : '!');
788
-
789
- #StdOut
790
- 0x01ff == has glyph
791
- 0x0000 != has glyph
792
- 0xffff == has glyph
793
- ##
794
- ##
795
-
796
- #SeeAlso incomplete
797
-
798
- #Method ##
799
-
800
- # ------------------------------------------------------------------------------
801
-
802
749
#Method SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding encoding,
803
750
SkRect* bounds = nullptr) const
804
751
#In incomplete
0 commit comments