Author: fireball
Date: Fri Jun 11 20:18:59 2010
New Revision: 47757
URL:
http://svn.reactos.org/svn/reactos?rev=47757&view=rev
Log:
- Merge in changes from Wine-1.1.44 related to supporting the ETO_PDY flag. Unregresses
the text rendering in FF 3.5. Thanks to Jan Roeloffzen for help finding this problem and
suggesting the right solution.
Modified:
branches/arwinss/reactos/dll/win32/winent.drv/font.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c
Modified: branches/arwinss/reactos/dll/win32/winent.drv/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] Fri Jun 11 20:18:59
2010
@@ -591,8 +591,6 @@
AA_Type aa_type = AA_None;
//DIBSECTION bmp;
unsigned int idx;
- double cosEsc, sinEsc;
- LOGFONTW lf;
//enum drawable_depth_type depth_type = (physDev->depth == 1) ? mono_drawable :
color_drawable;
//Picture tile_pict = 0;
@@ -645,16 +643,6 @@
{
retv = TRUE;
goto done_unlock;
- }
-
-
- GetObjectW(GetCurrentObject(physDev->hUserDC, OBJ_FONT), sizeof(lf), &lf);
- if(lf.lfEscapement != 0) {
- cosEsc = cos(lf.lfEscapement * M_PI / 1800);
- sinEsc = sin(lf.lfEscapement * M_PI / 1800);
- } else {
- cosEsc = 1;
- sinEsc = 0;
}
if (flags & ETO_CLIPPED)
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] Fri Jun 11
20:18:59 2010
@@ -135,10 +135,9 @@
const RECT *lprect, LPCWSTR wstr, UINT count,
const INT *lpDx, gsCacheEntryFormat *formatEntry)
{
- INT offset = 0, xoff = 0, yoff = 0;
+ POINT offset = {0, 0};
AA_Type aa_type = AA_None;
INT idx;
- /*double*/ int cosEsc = 1, sinEsc = 0;
BRUSHGDI *pTextPen;
/* Create pen for text output */
@@ -154,22 +153,31 @@
//sharp_glyph_fn = SharpGlyphGray;
for(idx = 0; idx < count; idx++) {
- sharp_glyph_fn(pDC, pDC->rcDcRect.left + pDC->rcVport.left + x + xoff,
- pDC->rcDcRect.top + pDC->rcVport.top + y + yoff,
- formatEntry->bitmaps[wstr[idx]],
- &formatEntry->gis[wstr[idx]],
- pTextPen);
- if(lpDx) {
- offset += lpDx[idx];
- xoff = offset * cosEsc;
- yoff = offset * -sinEsc;
- } else {
- xoff += formatEntry->gis[wstr[idx]].xOff;
- yoff += formatEntry->gis[wstr[idx]].yOff;
+ sharp_glyph_fn(pDC,
+ pDC->rcDcRect.left + pDC->rcVport.left + x + offset.x,
+ pDC->rcDcRect.top + pDC->rcVport.top + y + offset.y,
+ formatEntry->bitmaps[wstr[idx]],
+ &formatEntry->gis[wstr[idx]],
+ pTextPen);
+ if(lpDx)
+ {
+ if(flags & ETO_PDY)
+ {
+ offset.x += lpDx[idx * 2];
+ offset.y += lpDx[idx * 2 + 1];
+ }
+ else
+ offset.x += lpDx[idx];
+ }
+ else
+ {
+ offset.x += formatEntry->gis[wstr[idx]].xOff;
+ offset.y += formatEntry->gis[wstr[idx]].yOff;
}
}
} else {
#if 0
+ OUTDATED (need to merge 47289 and higher)
XImage *image;
int image_x, image_y, image_off_x, image_off_y, image_w, image_h;
RECT extents = {0, 0, 0, 0};