On Wed Sep 13 14:08:58 2023 +0000, Torge Matthies wrote:
The `get_char_sa` function is *really close* to what Windows seems to hardcode (doesn't take from the font's data). It doesn't match 1:1, but it's similar enough that there is definitely strong correlation. `glyph` here is a bit of a misnomer that I carried over from the calling `get_glyph_outline` function, where it's also called that. `glyph` is the unicode character code (BMP only), `index` is the index in the font that the character was found in. I wrapped the whole function in an `if (!(format & GGO_GLYPH_INDEX))` for now, but I will need to test how `GGO_GLYPH_INDEX` is handled, and I dropped the `index` parameter. Note that I will be splitting up this MR into two parts, one for the gdi part and one for the gdiplus part.
It does not have to match gdi 1:1. My point was that looking up unicode categories for every character is not really necessary.