[PATCH 2/2] gdi32: Ensure a fixed-pitch full-width character has double width of a half-width character.

Alexandre Julliard julliard at winehq.org
Thu Dec 20 11:06:43 CST 2012


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

> @@ -5866,10 +5867,22 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
>          return GDI_ERROR;
>      }
>  
> +    if (!font->orientation) {
> +        TEXTMETRICW tm;
> +        double advance = (ft_face->glyph->metrics.horiAdvance + 63) >> 6;
> +        get_text_metrics(incoming_font, &tm);
> +        if (!(tm.tmPitchAndFamily & TMPF_FIXED_PITCH) &&
> +            (tm.tmAveCharWidth * 2) != (INT)(advance * widthRatio) &&
> +            (tm.tmAveCharWidth * 2) == (INT)((advance + 1.0) * widthRatio)) {
> +            TRACE("add fullwidth character padding\n");
> +            padding = 1 << 6;
> +        }
> +    }

Is it really limited to orientation==0?  A test case with a different
orientation would be useful.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list