[06/12] gdi32: Perform the world transform separately from font scaling

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Mon Jun 30 06:28:44 CDT 2008


Am Dienstag, den 24.06.2008, 16:11 +0900 schrieb Dmitry Timoshkov:
> +    /* World transform */
> +    if (!is_identity_FMAT2(&font->font_desc.matrix))
> +    {
> +        FT_Matrix worldMat;
> +        worldMat.xx = FT_FixedFromFloat(font->font_desc.matrix.eM11);
> +        worldMat.xy = FT_FixedFromFloat(font->font_desc.matrix.eM21);
> +        worldMat.yx = FT_FixedFromFloat(font->font_desc.matrix.eM12);
> +        worldMat.yy = FT_FixedFromFloat(font->font_desc.matrix.eM22);
> +        pFT_Matrix_Multiply(&worldMat, &transMat);
> +        needsTransform = TRUE;
> +    }
> +
This causes a regression in the German computer-aided tax form printing
program "Elster-Formular". Previously, font scaling worked like in the
GM_COMPATIBLE graphics mode (set via SetGraphicsMode on the DC), that
is, mainly abs(yy) is used as scaling factor, and that's it. This change
introduces something like the GM_ADVANCED graphics mode, but does it
wrong (for example, the origin for reflections should be the point
specified in TextOut, currently, reflections are done relative to the
base line of the character; also the background is not reflected at
all). I have attached a simple test program to show what happens in wine
with a scaling that inverts the y axis (as the German tax program uses).
Its expected output would be to characters looking the same at the same
Y position, which is what I get in windows, and also with Wine 1.0.

If the GM_ADVANCED line is activated, expected output would be the first
"F" as is, and the second "F" upside down above the line, with the
lowest part of the white box touching the black line. No Wine version
does handle this case correctly.

Regards,
  Michael Karcher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontbug.c
Type: text/x-csrc
Size: 1762 bytes
Desc: 
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080630/6beec426/attachment.c 


More information about the wine-devel mailing list