Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3651

Re: Distiller XI Pro, “… charpath clip stroke”

Newsgroups comp.lang.postscript
Date 2021-06-14 10:36 -0700
References <1d0d2ab7-b2bf-4f3b-a46e-9ae1f1383500n@googlegroups.com>
Message-ID <2ac2a9a5-1a3e-4d06-ae1d-a62642908b59n@googlegroups.com> (permalink)
Subject Re: Distiller XI Pro, “… charpath clip stroke”
From jdaw1 <jdawiseman@gmail.com>

Show all headers | View raw


For robustness against website failure, the current code (though the jdawiseman.com version of it might, within the next few days, be updated). 




%!PS

% (c) Copyright 2021 Julian Wiseman of jdawiseman.com.
% http://www.jdawiseman.com/papers/bugs/20210614_clip_test.ps
% http://groups.google.com/g/comp.lang.postscript/c/wa-vv0jzOfk

% PDF made by Adobe Distiller XI Pro 11.0.23 (01/11/2017), "Copyright 1984-2012 Adobe Systems Incorporated".




% DeFontPath has two uses.
% Bug in Adobe Distiller 8.1.3 (23/10/2006). In attempting to treat paths derived from text as copyable text, it fails to cope with paths made partly thereby and partly from a upath.
% Also, eliminates some types of problems with embedding fonts.
/DeFontPath
{
	{
		[ {/moveto cvx} {/lineto cvx} {/curveto cvx} {/closepath cvx} pathforall ] newpath cvx exec
	} stopped {(Warning: protected path in DeFontPath) =} if
} bind def  % /DeFontPath


% BoolCharPath  BoolDeFont  PaintTextPath -
/PaintTextPath
{
	2 dict begin
	/BoolDeFont exch def
	/BoolCharPath exch def
	gsave
	(ABCDE) BoolCharPath charpath
	BoolDeFont {DeFontPath} if
	gsave  BoolCharPath {0.4 0.6 1} {0 0.8 0} ifelse  setrgbcolor fill  grestore
	4 setlinewidth   0 setgray  1 setlinejoin  clip stroke  % !!! Without DeFontPath, clip fails !!!
	grestore
	end
} bind def  % /PaintTextPath


<< /PageSize [340 240] >> setpagedevice
0 1 1
{
	1 eq /BoolDeFont exch def

	/FiraSans-Regular 9.5 selectfont   0.6 0 0 setrgbcolor
	BoolDeFont {(Page 2, with)} {(Page 1, without)} ifelse
	10 227 moveto show ( DeFontPath: blue = true charpath; green = false charpath.) show
	10 217 moveto (Source: http://www.jdawiseman.com/papers/bugs/20210614_clip_test.ps) show
	/FiraSansExtraCondensed-Bold 128 selectfont
	10 210 moveto  320 0 rlineto stroke
	10 110 moveto true  BoolDeFont PaintTextPath
	10  10 moveto false BoolDeFont PaintTextPath
	showpage
} for  % BoolDeFont

Back to comp.lang.postscript | Previous | Next | Find similar


Thread

Re: Distiller XI Pro, “… charpath clip stroke” jdaw1 <jdawiseman@gmail.com> - 2021-06-14 10:36 -0700

csiph-web