Commit d8196092 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

gdi32: Scale outline font metrics as signed integers.

parent e5d8129a
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment