[3/3] gdiplus: Make GdipMeasureCharacterRanges/GdipMeasureString/GdipDrawString add extra space around the text.

Vincent Povirk madewokherd at gmail.com
Fri Aug 24 10:02:24 CDT 2012

> For instance accoding to the tests MeasureCharacterRanges adds extra space
> only to X, while GdipMeasureString and GdipDrawString also add extra space
> to Height and Width of the bounding rectangle.

That doesn't sound inconsistent to me, it's just that those functions
are measuring different things. CharacterRanges tells you where the
individual characters are (and is resolution-dependent as I understand
it), while MeasureString/DrawString only give information about full
lines and are resolution-independent (they may have to cut into the
padding depending on the hinting at that resolution, but users of
these functions can ignore that and assume the entire line will scale
to any resolution).

Probably the callback just needs another argument specifying where the
first character is. (For tabs we may need a position for subsequent
characters as well, or multiple callbacks for a single line.)

I don't think we should make MeasureString/DrawString
resolution-independent because that also makes native's text
incredibly ugly, and would greatly increase the complexity of

More information about the wine-devel mailing list