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

Huw Davies huw at codeweavers.com
Thu Nov 5 08:58:50 CST 2015


On 5 Nov 2015, at 14:23, Henri Verbeet wrote:
>> +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.

Right, but the result is also called a unit vector, so I'm happy with either.

> 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.

Yes, good point.

Huw.




More information about the wine-devel mailing list