wine/dlls/gdi32
Zhiyi Zhang 58b477d158 win32u: Choose a smaller ppem to avoid exceeding the requested font height.
When height > 0, CreateFontA/W() should not return a font face exceeding the requested height.
For instance, Tahoma has 2049 units of ascent, 423 units of descent and its units per EM square is
2048. When requesting a font 20 pixels in height, ppem = units_per_EM * requested_height / (ascent + descent)
= 2048 * 20 / (2049 + 423) = 16.57 ~= 17. When getting the resulting height back from the ppem,
resulting_height = (ascent + descent) * ppem / units_per_EM = (2049.0 + 423) * 17 / 2048 = 20.52
~=21. So it ends up getting a larger font than requested and violates the spec.

Fix Nancy Drew: Legend of the Crystal Skull crash at start.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-19 22:45:18 +02:00
..
tests win32u: Choose a smaller ppem to avoid exceeding the requested font height. 2022-08-19 22:45:18 +02:00
uniscribe
dc.c win32u: Use platform-independent layout for DC_ATTR. 2022-08-09 15:55:43 +02:00
emfdc.c win32u: Use platform-independent layout for DC_ATTR. 2022-08-09 15:55:43 +02:00
enhmetafile.c
gdi32.rc
gdi32.spec gdi32: Implement D3DKMTQueryVideoMemoryInfo(). 2022-05-17 17:50:43 +02:00
gdi_private.h
icm.c
Makefile.in
metadc.c
metafile.c
objects.c
opengl.c
resource.h
text.c