We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f784453 commit 701facfCopy full SHA for 701facf
src/MagesScriptTool/SpecBank.cs
@@ -67,8 +67,9 @@ static ImmutableArray<GlyphSpec> toGlyphSpecs(JsonElement json) {
67
Int16 unitsOffset = glyphsJson.GetProperty("unitsOffset").GetInt16();
68
string text = toText(glyphsJson.GetProperty("text"));
69
int index = 0;
70
- foreach (char character in text) {
71
- glyphs.Add(new([unitsOffset + index], character.ToString(), style));
+ TextElementEnumerator charEnum = StringInfo.GetTextElementEnumerator(text);
+ while (charEnum.MoveNext()) {
72
+ glyphs.Add(new([unitsOffset + index], charEnum.GetTextElement(), style));
73
index++;
74
}
75
} else if (glyphsJson.ValueKind == JsonValueKind.Array) {
0 commit comments