Replies: 1 comment
-
You could enumerate each grapheme and then the code points related to each char in that grapheme? namespace SixLabors.Fonts.Unicode;
SpanGraphemeEnumerator enumerator = new(text);
while (graphemeEnumerator.MoveNext())
{
SpanCodePointEnumerator codePointEnumerator = new(graphemeEnumerator.Current);
while (codePointEnumerator.MoveNext())
{
// Get the glyphs for each codepoint.
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently I am using string.EnumerateRunes() to get runes in a string, and then using Font.TryGetGlyphs() to check GlyphType of the each Glyph generated by the corresponded rune.
However, in some situations, simply consider runes in a string is incomplete, I need to consider each TextElements by using StringInfo.GetTextElementEnumerator(). Since TryGetGlyphs cannot test TextElement, is there a better way?
Beta Was this translation helpful? Give feedback.
All reactions