Thank you,
but as I said, TRichMemo, behaves/works strangely beyond BMP, for example, your pasted emoji is black and white!, it should be colorful!
Try to paste these:😀😃😄😁😆😅
Basically, TRichMemo has some core limitations (Architectural):
- Rendering : Relies on GDI (on Windows), So, No advanced shaping or color fonts
- Unicode : Surrogate pairs (4-byte characters) are not glyph-aware, causing styling, caret, and selection issues
- Text Shaping : No OpenType shaping, fails with ligatures, complex scripts (Arabic, Hindi, etc.)
- Grapheme Clusters: Treats characters as 1 code unit, so, doesn't respect combining marks, ZWJ sequences, emoji clusters
- Line Wrapping : Uses basic width calculation, no kerning, justification, or proper script fallback
.......
.......
and thanks for the link:
It seems we need riched20.dll to enable D2D/emoji features.
C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\riched20.dll
The message (WM_USER + 389) only applies to controls of class: RichEdit20WPT
Since EM_SWITCHTOD2D is part of Microsoft 365's enhanced RichEdit engine, basically you need MS Office installed on your system to enable D2D fully.