usp10: when checking font for shaping the font needs at least 1 of the features but does not need all.

Dmitry Timoshkov dmitry at codeweavers.com
Wed Oct 6 23:10:41 CDT 2010


Aric Stewart <aric at codeweavers.com> wrote:

> -    while (ShapingData[psa->eScript].requiredFeatures[i])
> +    while (ShapingData[psa->eScript].requiredFeatures[i] && !found)
>      {
>          feature = load_GSUB_feature(hdc, psa, psc, ShapingData[psa->eScript].requiredFeatures[i]);
> -        if (!feature)
> -            return USP_E_SCRIPT_NOT_IN_FONT;
> +        if (feature)
> +            found = TRUE;

Why not return S_OK right away here, and return USP_E_SCRIPT_NOT_IN_FONT
right after the while loop? That would eliminate a need for an intermediate
variable and simplify the code.

-- 
Dmitry.



More information about the wine-devel mailing list