[cairo] [PATCH] Fix font x_scale value in _compute_transform()

Bryce Harrington bryce at osg.samsung.com
Wed Aug 27 21:13:40 PDT 2014


On Wed, Aug 20, 2014 at 09:38:37AM -0700, Maks Naumov wrote:
> Signed-off-by: Maks Naumov <maksqwe1 at ukr.net>
> ---
>  src/cairo-ft-font.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The chunk of code with this line was added in commit b94a519a.
I'm finding no indication this was intentional; from the code the
intention seems clear that it's trying to track x and y font scaling
separately.  So I'll go ahead and merge it, but am CC'ing Behdad just in
case.

Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

> diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
> index 59df4fc..87e733b 100644
> --- a/src/cairo-ft-font.c
> +++ b/src/cairo-ft-font.c
> @@ -745,7 +745,7 @@ _compute_transform (cairo_ft_font_transform_t *sf,
>  	double best_y_size = 0;
>  
>  	for (i = 0; i < unscaled->face->num_fixed_sizes; i++) {
> -	    double x_size = unscaled->face->available_sizes[i].y_ppem / 64.;
> +	    double x_size = unscaled->face->available_sizes[i].x_ppem / 64.;
>  	    double y_size = unscaled->face->available_sizes[i].y_ppem / 64.;
>  	    double distance = y_size - y_scale;
>  
> -- 
> 1.9.1
> 
> 
> 
> -- 
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list