[usp10 5/6] Fix the ABC width calculations in ScriptPlace

Alexandre Julliard julliard at winehq.org
Fri Dec 18 06:19:41 CST 2009


Jason Green <jave27 at gmail.com> writes:

> -    if (pABC) TRACE("Total for run: abcA=%d, abcB=%d, abcC=%d\n", pABC->abcA, pABC->abcB, pABC->abcC);
> +    if (pABC)
> +    {
> +        ABC tmp;
> +
> +
> +        /* the compositie 'A' width is simply the padding from the first glyph in the run */
> +        get_cache_glyph_widths(psc, pwGlyphs[0], &tmp);
> +        pABC->abcA = tmp.abcA;
> +
> +        /* the compositie 'C' width is simply the padding from the last glyph in the run */
> +        get_cache_glyph_widths(psc, pwGlyphs[cGlyphs - 1], &tmp);
> +        pABC->abcC = tmp.abcC;
> +
> +        /* since the 'B' width now includes the 'A' and 'C' widths, we must adjust it slightly */
> +        pABC->abcB -= pABC->abcA + pABC->abcC;
> +
> +        TRACE("Total for run: abcA=%d, abcB=%d, abcC=%d\n", pABC->abcA, pABC->abcB, pABC->abcC);
> +    }

That's too complicated, there's no reason to retrieve the sizes twice,
just handle that in the main loop.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list