On Sat Dec 21 23:11:27 2024 +0000, Esme Povirk wrote:
The special case makes sense to me only because those characters are also handled in the actual drawing routine as a special case. I have no idea how native does it (I can't think of any good way to test what fonts it's actually using), and no particular reason to believe it resembles this (other than knowing that the times it broke, it's been using fallbacks when it doesn't need to). I don't think native GDI+ does anything nearly as complex as dwrite, but that doesn't mean this way makes sense. Can you explain what you mean by per-range?
By range I mean a segment of original text that has uniform properties, one of them being writing script property. In directwrite this is done by splitting up the text by the script (each unicode point belongs to some script, or is attached to preceding/following range), and then further by properties that user had applied to the text, such as preferred locale for example. This way we never do font mapping for text that contains characters from different scripts. I don't remember now if I had tested this properly, but it's certainly possible to do. We probably don't do such segmentation in gdi+.
For gdi+ this might be impossible to test reliably, because it does not let you control fallback behavior.