keithdunwoody at yahoo.com
Wed Dec 27 10:00:57 CST 2006
Suppose the user asks for (on average) 5.5 pixels per space. At the moment wine
is using 5 pixels per space, and then tacking on all the remaining .5 pixels at
the end of the line. The correct answer would be to use 5 pixels in half the
spaces, and 6 in the other half. This is essentially doing pulse width
modulation (PWM) on the space sizes, and you can probably find algorithms for
doing this on the Internet.
However, I think wine is storing the wrong information in the hDC. From what I
remember, wine is storing the average number of pixels per space, and the number
of pixels left over. This isn't enough, because you need to know how many
spaces the "left over" pixels are to be distributed over.
--- "Pedro Araújo Chaves Jr." <inckie at gmail.com> wrote:
> I've been trying to get the lpDx array to be properly calculated, but
> unfortunately to no avail. I did find, though, that GetTextExtentExPointW is
> never called with a maxExt value other than zero, and thus nfit is not
> Regarding that, would any of you know where I should look for the proper
> method of calculating the maximum width (maxExt) of a formatted string? I'm
> somewhat puzzled... neither lprect nor dc->BoundsRect seem to hold the
> proper values for getting that value , or (more likely, I guess) I'm just
> looking at it the wrong way.
> Btw, I'd add that I've been testing this in Lotus Notes R5, just in case it
> helps, and no, I haven't found a link to download a trial.  
>  I'm investigating the SetTextJustification, ExtTextOutW,
> GetTextExtentPointW, GetTextExtentPoint32W, GetTextExtentExPointW, and
> WineEngGetTextExtentExPoint functions from gdi32 (the latter in freetype.c,
> the rest in font.c). I am yet to look into their *I counterparts, where
>  http://appdb.winehq.org/viewbugs.php?bug_id=50
>  http://bugs.winehq.org/show_bug.cgi?id=7016
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the wine-devel