[Wine-patches] [eter-2.0.0] gdiplus: Avoid saving negative values in pixel_size and emSize. (eterbug #8317)
Dmitry Timoshkov
dmitry на baikal.ru
Вт Апр 24 12:20:11 MSK 2012
---
dlls/gdiplus/font.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 169e28f..1ac7604 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -190,9 +190,6 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
(*font)->lfw.lfUnderline = logfont->lfUnderline;
(*font)->lfw.lfStrikeOut = logfont->lfStrikeOut;
- (*font)->pixel_size = (*font)->emSize = logfont->lfHeight;
- (*font)->unit = UnitPixel;
-
hfont = CreateFontIndirectW(&(*font)->lfw);
oldfont = SelectObject(hdc, hfont);
GetTextMetricsW(hdc, &textmet);
@@ -201,6 +198,8 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
(*font)->lfw.lfWeight = textmet.tmWeight;
(*font)->lfw.lfCharSet = textmet.tmCharSet;
+ (*font)->pixel_size = (*font)->emSize = textmet.tmHeight;
+ (*font)->unit = UnitPixel;
(*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */
(*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading;
--
1.7.9.4
Подробная информация о списке рассылки Wine-patches