Massimo Del Fedele max@veneto.com writes:
Yep, of course, but we don't need to check for GetGlyphOutlineW() correctness (well, not for this case, at least). It IS correct. If you ask for buffer size (as done on first call) it returns 0 on error AND on unprintable glyphs. The GDI_ERROR value is returned ONLY when asking just for metrics or trying to get the glyph data, NOT when asking for buffer size (on which GDI_ERROR could be a valid buffer size), as well documented on MSDN : http://msdn.microsoft.com/en-us/library/dd144891(VS.85).aspx (see return value)
GDI_ERROR is clearly not a valid buffer size, and must be checked for. Please write test cases like Dmitry suggested.