SKFont.CountGlyphs Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| CountGlyphs(ReadOnlySpan<Char>) |
Counts the number of glyphs needed to represent the text. |
| CountGlyphs(String) |
Counts the number of glyphs needed to represent the text. |
| CountGlyphs(ReadOnlySpan<Byte>, SKTextEncoding) |
Counts the number of glyphs needed to represent the text. |
| CountGlyphs(IntPtr, Int32, SKTextEncoding) |
Counts the number of glyphs needed to represent the text. |
CountGlyphs(ReadOnlySpan<Char>)
Counts the number of glyphs needed to represent the text.
public int CountGlyphs(ReadOnlySpan<char> text);
Parameters
- text
- ReadOnlySpan<Char>
The text to count.
Returns
The number of glyphs.
Applies to
CountGlyphs(ReadOnlySpan<Byte>, SKTextEncoding)
Counts the number of glyphs needed to represent the text.
public int CountGlyphs(ReadOnlySpan<byte> text, SkiaSharp.SKTextEncoding encoding);
Parameters
- text
- ReadOnlySpan<Byte>
The text to count.
- encoding
- SKTextEncoding
The SKTextEncoding of the text.
Returns
The number of glyphs.
Applies to
CountGlyphs(IntPtr, Int32, SKTextEncoding)
Counts the number of glyphs needed to represent the text.
public int CountGlyphs(IntPtr text, int length, SkiaSharp.SKTextEncoding encoding);
Parameters
- text
- IntPtr
A pointer to the text buffer.
- length
- Int32
The number of bytes in the text buffer.
- encoding
- SKTextEncoding
The SKTextEncoding of the text.
Returns
The number of glyphs.