From 01370964495a0769edafb76a06e7b5a81374c1fc Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 23 May 2019 19:40:54 +0900 Subject: [PATCH] [WIN32SS][NTGDI] Don't use FLOAT in IntEscapeMatrix (#1572) Appendum to 1a40284. Use a 16.16 fixed point value instead of FLOAT. CORE-15838 --- win32ss/gdi/ntgdi/freetype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 126040c88f7..3dc10bc63fc 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -719,8 +719,8 @@ VOID FASTCALL IntWidthMatrix(FT_Face face, FT_Matrix *pmat, LONG lfWidth) VOID FASTCALL IntEscapeMatrix(FT_Matrix *pmat, LONG lfEscapement) { FT_Vector vecAngle; - /* Convert from angle in tenths of degrees to 'FT_Angle' degrees */ - FT_Angle angle = FT_FixedFromFloat((FLOAT)lfEscapement / 10); + /* Convert the angle in tenths of degrees into degrees as a 16.16 fixed-point value */ + FT_Angle angle = INT_TO_FIXED(lfEscapement) / 10; FT_Vector_Unit(&vecAngle, angle); pmat->xx = vecAngle.x; pmat->xy = -vecAngle.y; -- 2.17.1