Some fonts can end up with too low height for some sizes, resulting in ppem == 0, which can lead to some metrics becoming 0 too, especially tmHeight and tmAveCharWidth. This behavior is also observed on Windows, but on Linux it could lead to division by zero. This was noticed with the font `Emmentaler-Brace`, which comes with TexLive and GNU LilyPond, in the comctl32 status test.
This patch set also tries to make the Wine behavior closer to the Windows one by enabling tmAveCharWidth to be 0 and preventing it and tmHeight from causing divisions by zero. This is very much an edge case, and I don't know if it has caused problems in actual programs, so I don't know if it would be worth it to make the behavior match exactly. But this way at least the tests should pass if some incomplete/misconfigured fonts are installed.
I mainly limited myself to win32u. I'm not sure if these changes could affect behavior in other parts of the codebase, but the tests seems unchanged.
-- v2: win32u: Allow tmAveCharWidth to be 0. win32u: Prevent division by 0 in get_transform_matrices(). win32u: check if tmAveCharWidth is 0 before division. win32u: Do not use SCALE_NTM if TM.tmHeight == 0. win32u: Warn when ppem == 0.