Don't try to rotate bitmap fonts.

This commit is contained in:
Huw Davies 2004-08-11 19:34:20 +00:00 committed by Alexandre Julliard
parent 8c2ff3ca6d
commit dbf5b2a320
2 changed files with 6 additions and 3 deletions

View File

@ -1824,7 +1824,7 @@ GdiFont WineEngCreateFontInstance(DC *dc, HFONT hfont)
pFT_Select_Charmap(ret->ft_face, ft_encoding_apple_roman);
}
ret->orientation = lf.lfOrientation;
ret->orientation = FT_IS_SCALABLE(ret->ft_face) ? lf.lfOrientation : 0;
ret->name = strdupW(family->FamilyName);
ret->underline = lf.lfUnderline ? 0xff : 0;
ret->strikeout = lf.lfStrikeOut ? 0xff : 0;

View File

@ -1004,7 +1004,12 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
y = pt.y;
}
GetTextMetricsW(hdc, &tm);
GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), &lf);
if(!(tm.tmPitchAndFamily & TMPF_VECTOR)) /* Non-scalable fonts shouldn't be rotated */
lf.lfEscapement = 0;
if(lf.lfEscapement != 0) {
cosEsc = cos(lf.lfEscapement * M_PI / 1800);
sinEsc = sin(lf.lfEscapement * M_PI / 1800);
@ -1106,8 +1111,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
xwidth = width * cosEsc;
ywidth = width * sinEsc;
GetTextMetricsW(hdc, &tm);
tm.tmAscent = abs(X11DRV_YWStoDS(physDev, tm.tmAscent));
tm.tmDescent = abs(X11DRV_YWStoDS(physDev, tm.tmDescent));
switch( align & (TA_LEFT | TA_RIGHT | TA_CENTER) ) {