http://bugs.winehq.org/show_bug.cgi?id=5946
--- Comment #14 from Niels Martin Hansen nielsm@indvikleren.dk 2009-01-24 10:58:42 --- I don't know how common this technique is for getting text paths. (The more "sanctioned" method I believe should be to repeatedly call GetGlyphOutlineW().) But it can affect various kinds of graphical applications that need to draw text in more advanced ways than GDI is able of.
I have looked a bit further into the Wine GDI32 source and found some things I think look strange.
First of all, Wine's GetPath() will return -1 on error. Microsoft doesn't seem to document the actual return on error, but it seems that TextSub expects a 0 return to signal error. I don't think this is the cause however.
Looking further, it appears that PATH_ExtTextOut() will abort if GetGlyphOutlineW() returns zero. I don't know if this applies to Wine, but in my own experiments, on Windows GetGlyphOutlineW() will return zero for space characters. This might be the cause of the bug. However WineEngGetGlyphOutline() seems to return GDI_ERROR (which is (~0d) ie. non-zero) on error. I believe it may also return 0 if the glyph requires an empty path to draw, such as I would expect space characters to do.