Re: Fix for 687368 (large rendering of platfonts) |

Ray Johnston <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Artifex Software Inc.
Message-ID <[email protected]>
Raph,

Looks OK to me.

Regards,
Ray
______________________________________________________________________

Raph Levien wrote:

> Reviewers,
> 
>    As discussed last week, here is a simple patch which simply
> disables xfonts (platfonts) when antialiasing is in effect. This fixes
> bug 687368, and also avoids quality degradation arising from mixing
> platfonts and antialiased fonts.
> 
>    The scale problem was introduced when the antialiasing logic was
> changed; previously, the "pair" at the time of xfont lookup
> represented the metrics at the device resolution, but now the "pair"
> is computed based on the metrics at the supersampling resolution.
> I considered diving in and making the pair for xfont lookup reflect
> the device resolution, but the logic looked fairly delicate, and I
> didn't want to break anything.
> 
> Raph
> 
> Index: src/gxchar.c
> ===================================================================
> RCS file: /cvs/ghostscript/gs/src/gxchar.c,v
> retrieving revision 1.40
> diff -C2 -r1.40 gxchar.c
> *** a/src/gxchar.c	13 Mar 2004 18:28:52 -0000	1.40
> --- b/src/gxchar.c	1 Apr 2004 16:22:24 -0000
> ***************
> *** 873,876 ****
> --- 873,877 ----
>       int code;
>       cached_char *cc;
> +     gs_log2_scale_point log2_scale;
>   
>       if (penum->charpath_flag == cpm_show && SHOW_USES_OUTLINE(penum)) {
> ***************
> *** 927,931 ****
>   		    {
>   			int alpha_bits, depth;
> - 			gs_log2_scale_point log2_scale;
>   			gs_fixed_point subpix_origin;
>   
> --- 928,931 ----
> ***************
> *** 948,951 ****
> --- 948,955 ----
>   			/* If possible, try for an xfont before */
>   			/* rendering from the outline. */
> + 
> + 		        /* If antialiasing is in effect, don't use xfont */
> + 		        if (log2_scale.x + log2_scale.y > 0)
> + 			    goto no_cache;
>   			if (pfont->ExactSize == fbit_use_outlines ||
>   			    pfont->PaintType == 2
> _______________________________________________
> gs-code-review mailing list
> [email protected]
> http://www.ghostscript.com/mailman/listinfo/gs-code-review
> 
> 

-- 
Ray Johnston
Director of Engineering                          Tel: (714) 484-0376
Artifex Software Inc.                            Fax: (714) 220-1022
______________________________________________________________________
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.