[1/5] gdi32: Fix the advance width in synthetic bold glyphs when using scaling factors.

Henri Verbeet hverbeet at gmail.com
Thu Nov 5 08:23:41 CST 2015


> +static inline void calc_unit_vector(FT_Vector *vec)
> +{
> +    FT_Fixed len;
> +    len = pFT_Vector_Length(vec);
> +    vec->x = (vec->x << 6) / len;
> +    vec->y = (vec->y << 6) / len;
> +}
For what it's worth, that's usually called normalisation. Given how
this is used, there's probably something to be said for not modifying
the input vector and just having an output variable instead.



More information about the wine-devel mailing list