Closed pyscripter closed 1 year ago
There are three major issues with Unicode handling shown below:
A) Wide glyphs (e.g. Chinese characters) taking more space than other characters 爾雅爾雅爾雅爾雅爾雅爾雅
B) Surrogates pairs (two widechars correspond to one glyph) UTF-16 Encoding: 0xD83D 0xDCBC
C) Combining characters (more than one Widechars shown as one glyph) Åström ḱṷṓn Precomposed vrs Decomposed ḱṷṓn (U+1E31 U+1E77 U+1E53 U+006E) ḱṷṓn (U+006B U+0301 U+0075 U+032D U+006F U+0304 U+0301 U+006E)
SynEdit only deals with the first one but in a peculiar way (ExpandAtWideGlyphs)
Finished and committed the painting code to the DWrite branch. Sample output: Chinese properly spaced, surrogate pairs and color emojis Bidirectional text properly selected.
See also https://en.delphipraxis.net/topic/6277-synedit-just-got-a-major-uplift/
There are three major issues with Unicode handling shown below:
A) Wide glyphs (e.g. Chinese characters) taking more space than other characters 爾雅爾雅爾雅爾雅爾雅爾雅
B) Surrogates pairs (two widechars correspond to one glyph) UTF-16 Encoding: 0xD83D 0xDCBC
C) Combining characters (more than one Widechars shown as one glyph) Åström ḱṷṓn Precomposed vrs Decomposed ḱṷṓn (U+1E31 U+1E77 U+1E53 U+006E) ḱṷṓn (U+006B U+0301 U+0075 U+032D U+006F U+0304 U+0301 U+006E)
SynEdit only deals with the first one but in a peculiar way (ExpandAtWideGlyphs)