https://bugs.winehq.org/show_bug.cgi?id=53929
--- Comment #2 from 399989567@qq.com --- (In reply to Fabian Maurer from comment #1)
Windows does that properly? I guess a testcase would be nice, did you run into that using a certain program?
There is no such problem on Windows. I was in the East Eighth District yesterday. The time you replied was early morning at 01:30am, so I couldn't reply your message in time.I'm sorry.
I wrote a demo of a windows program, which is used to input an emoji ???? (U+1F34A), and the Textout API is used here to output characters (Textout directly calls ExtTextout in wine), and ExtTextout accepts WCHAR * characters String (0xD83C, 0xDF4A), here involves "surrogate_pai", which uses four bytes to represent a character, but I looked at the implementation of ExtTextout, he only accepts two bytes each time, so he thinks that a four-byte is two Two bytes, so ???? cannot be output.
Because wine thinks that all unicode is two bytes(0xD83C) to represent a character, so there will be many other problems here, such as GetTextExtentPoint32W will get the wrong character width. At the same time, if I use "宋体" as the output font, ???? this character has no corresponding glyph in the font, windows will use other fonts for output(font fallback), and accurately calculate the font width (for line breaks, etc.), but wine will use the font you set (宋体) to calculate the width, I haven't written a corresponding demo about this issue