Re: [PATCH] Fix font x_scale value in _compute_transform()

Bryce Harrington <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Wed, Aug 20, 2014 at 09:38:37AM -0700, Maks Naumov wrote:
> Signed-off-by: Maks Naumov <[email protected]>
> ---
>  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 <[email protected]>

> 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
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.