gdi32: pOS2->xAvgCharWidth can be negative however tmAvgCharWidth needs a positive value

Dmitry Timoshkov dmitry at baikal.ru
Tue Feb 21 10:50:43 CST 2012


Aric Stewart <aric at codeweavers.com> wrote:

> > What value does Mac return for these kind of fonts? Does it take an abs()
> > like in your patch? Does it trancate the value? Does it calculate it somehow
> > (like taking an average of glyphs say a+z and A+Z)? Does it do something
> > different?
> >
> 
> Why dos it matter what values Mac returns?  Mac does not do 
> GetTextMetrics, looking at the CTFont object it does not even have 
> methods to get an average character width.

It matters because it's not clear what is the best way to handle a negative
xAvgCharWidth value, especially since Windows considers this kind of fonts
broken, and some apps/dlls (native gdiplus.dll does it for sure) may dig into
font data directly, or use the metrics provided by GDI. How are you planning
to fix that apps?

-- 
Dmitry.



More information about the wine-devel mailing list