On 23/04/2012 15:32, Dmitry Timoshkov wrote:
This reverts commit f4625d1ae1109ee9a30faa8254b10779853f0ac2.
dlls/gdi32/freetype.c | 2 +- dlls/gdi32/tests/font.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 3875e4f..401cfd1 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5048,7 +5048,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, font = alloc_font();
if(face->scalable) {
height = -2048; /* 2048 is the most common em size */
height = 100; width = 0; } else { height = face->size.y_ppem>> 6;
You'll need to fix the ntmTm.ntmCellHeight and ntmTm.ntmAvgWidth values.
Huw.
Huw Davies huw@codeweavers.com wrote:
if(face->scalable) {
height = -2048; /* 2048 is the most common em size */
height = 100; width = 0; } else { height = face->size.y_ppem>> 6;
You'll need to fix the ntmTm.ntmCellHeight and ntmTm.ntmAvgWidth values.
As far as I can see that code always have been that way, and reverted patch didn't touch it either. But I see your point, and will add the tests (and a fix if the tests prove it's correct) in a later patch.
On 23/04/2012 16:07, Dmitry Timoshkov wrote:
Huw Davieshuw@codeweavers.com wrote:
You'll need to fix the ntmTm.ntmCellHeight and ntmTm.ntmAvgWidth values.
As far as I can see that code always have been that way, and reverted patch didn't touch it either. But I see your point, and will add the tests (and a fix if the tests prove it's correct) in a later patch.
Perhaps the original commit was added to work around this issue?
Note, you'll probably have to retrieve the metrics at the design size (2048) in order to get accurate values for these members. Simply up-scaling the values obtained at 100 ppem will lead to rounding errors. As you say, tests are needed.
Huw.
Huw Davies huw@codeweavers.com wrote:
Perhaps the original commit was added to work around this issue?
No, it was added for a not related reason.
Note, you'll probably have to retrieve the metrics at the design size (2048) in order to get accurate values for these members. Simply up-scaling the values obtained at 100 ppem will lead to rounding errors. As you say, tests are needed.
Yeah, the tests are needed. For now I just wanted to make gdiplus not rely on broken behaviour.