[2/3] gdi32: Return fake BBox when requested empty glyph metrics. (try 2)

Alexandre Julliard julliard at winehq.org
Thu Sep 26 13:05:24 CDT 2013


Akihiro Sagawa <sagawa.aki at gmail.com> writes:

> @@ -6519,11 +6519,17 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
>      }
>  
>      lpgm->gmBlackBoxX = (right - left) >> 6;
> +    if (lpgm->gmBlackBoxX == 0)
> +        lpgm->gmBlackBoxX = 1;
>      lpgm->gmBlackBoxY = (top - bottom) >> 6;
> +    if (lpgm->gmBlackBoxY == 0)
> +        lpgm->gmBlackBoxY = 1;
>      lpgm->gmptGlyphOrigin.x = origin_x >> 6;
>      lpgm->gmptGlyphOrigin.y = origin_y >> 6;
>      abc->abcA = left >> 6;
>      abc->abcB = (right - left) >> 6;
> +    if (abc->abcB == 0)
> +        abc->abcB = 1;
>      abc->abcC = adv - abc->abcA - abc->abcB;

It would be a good idea to add tests for the ABC metrics too.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list