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

Huw Davies huw at codeweavers.com
Thu Nov 5 05:22:26 CST 2015


On Tue, Nov 03, 2015 at 03:06:24PM +0900, Akihiro Sagawa wrote:
> @@ -6297,6 +6299,14 @@ static inline BOOL is_identity_MAT2(const MAT2 *matrix)
>      return !memcmp(matrix, &identity, sizeof(MAT2));
>  }
>  
> +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;
> +}

You need to check for division by zero.

Huw.



More information about the wine-devel mailing list