#include <ftoutln.h>
#include <ftwinfnt.h>
+#include <gdi/eng/floatobj.h>
+
#define NDEBUG
#include <debug.h>
USHORT DxShift;
PMATRIX pmxWorldToDevice;
LONG fixAscender, fixDescender;
+ FLOATOBJ Scale;
// TODO: Write test-cases to exactly match real Windows in different
// bad parameters (e.g. does Windows check the DC or the RECT first?).
}
else
{
- TextLeft += Dx[i<<DxShift] << 6;
- DPRINT("New TextLeft2: %I64d\n", TextLeft);
+ Scale = pdcattr->mxWorldToDevice.efM11;
+ if (_FLOATOBJ_Equal0(&Scale))
+ FLOATOBJ_Set1(&Scale);
+
+ FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); // do the shift before multiplying to preserve precision
+ TextLeft += FLOATOBJ_GetLong(&Scale);
+ DPRINT("New TextLeft2: %I64d\n", TextLeft);
}
if (DxShift)