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 calculated.
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 [1], 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. [2] [3]
Cheers, Pedro.
[1] 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 applicable.
Followup: you can download Lotus trial versions here:
http://www.ibm.com/developerworks/lotus/downloads/
Hope this helps.
Regards, Pedro.
Hi Pedro,
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.
-- Keith
--- "Pedro Araújo Chaves Jr." inckie@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 calculated.
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 [1], 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. [2] [3]
Cheers, Pedro.
[1] 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 applicable.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Hi all,
I'm writing just to ask why my patch and test case for Bug 50 (the text justification issue) weren't committed yet, so that I can take the proper measures in order that they can be.
Regards, Pedro.