Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/gdi32/font.c | 10 +++++----- dlls/gdi32/freetype.c | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 3b3f0b5051..d059f97c24 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1664,16 +1664,16 @@ UINT WINAPI GetOutlineTextMetricsW( output->otmTextMetrics.tmOverhang = width_to_LP( dc, output->otmTextMetrics.tmOverhang ); output->otmAscent = height_to_LP( dc, output->otmAscent); output->otmDescent = height_to_LP( dc, output->otmDescent); - output->otmLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmLineGap)); - output->otmsCapEmHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsCapEmHeight)); - output->otmsXHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsXHeight)); + output->otmLineGap = INTERNAL_YDSTOWS(dc, output->otmLineGap); + output->otmsCapEmHeight = INTERNAL_YDSTOWS(dc, output->otmsCapEmHeight); + output->otmsXHeight = INTERNAL_YDSTOWS(dc, output->otmsXHeight); output->otmrcFontBox.top = height_to_LP( dc, output->otmrcFontBox.top); output->otmrcFontBox.bottom = height_to_LP( dc, output->otmrcFontBox.bottom); output->otmrcFontBox.left = width_to_LP( dc, output->otmrcFontBox.left); output->otmrcFontBox.right = width_to_LP( dc, output->otmrcFontBox.right); output->otmMacAscent = height_to_LP( dc, output->otmMacAscent); output->otmMacDescent = height_to_LP( dc, output->otmMacDescent); - output->otmMacLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmMacLineGap)); + output->otmMacLineGap = INTERNAL_YDSTOWS(dc, output->otmMacLineGap); output->otmptSubscriptSize.x = width_to_LP( dc, output->otmptSubscriptSize.x); output->otmptSubscriptSize.y = height_to_LP( dc, output->otmptSubscriptSize.y); output->otmptSubscriptOffset.x = width_to_LP( dc, output->otmptSubscriptOffset.x); @@ -1682,7 +1682,7 @@ UINT WINAPI GetOutlineTextMetricsW( output->otmptSuperscriptSize.y = height_to_LP( dc, output->otmptSuperscriptSize.y); output->otmptSuperscriptOffset.x = width_to_LP( dc, output->otmptSuperscriptOffset.x); output->otmptSuperscriptOffset.y = height_to_LP( dc, output->otmptSuperscriptOffset.y); - output->otmsStrikeoutSize = abs(INTERNAL_YDSTOWS(dc,output->otmsStrikeoutSize)); + output->otmsStrikeoutSize = INTERNAL_YDSTOWS(dc, output->otmsStrikeoutSize); output->otmsStrikeoutPosition = height_to_LP( dc, output->otmsStrikeoutPosition); output->otmsUnderscoreSize = height_to_LP( dc, output->otmsUnderscoreSize); output->otmsUnderscorePosition = height_to_LP( dc, output->otmsUnderscorePosition); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 7c5a7ef979..660900a56e 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -7576,8 +7576,9 @@ static void scale_outline_font_metrics(const GdiFont *font, OUTLINETEXTMETRICW *
scale_font_metrics(font, &potm->otmTextMetrics);
-#define SCALE_X(x) (x) = GDI_ROUND((double)(x) * (scale_x)) -#define SCALE_Y(y) (y) = GDI_ROUND((double)(y) * (scale_y)) +/* Windows scales these values as signed integers even if they are unsigned */ +#define SCALE_X(x) (x) = GDI_ROUND((int)(x) * (scale_x)) +#define SCALE_Y(y) (y) = GDI_ROUND((int)(y) * (scale_y))
SCALE_Y(potm->otmAscent); SCALE_Y(potm->otmDescent);