Path: utzoo!attcan!uunet!tektronix!pogo!rgrove From: rgrove@pogo.GPID.TEK.COM (Robert Grove) Newsgroups: comp.lang.postscript Subject: Re: composite characters Message-ID: <6613@pogo.GPID.TEK.COM> Date: 17 Jan 89 01:54:10 GMT References: <8600@bloom-beacon.MIT.EDU> Reply-To: rgrove@pogo.GPID.TEK.COM (Robert Grove) Organization: Tektronix Inc., Wilsonville, Oregon Lines: 41 In article <8600@bloom-beacon.MIT.EDU> noid@athena.mit.edu (Adam G. Mellis) writes: >Could someone tell me the right way to create a composite >character in a user-defined font. Say I have two chars, z >and caron, both defined in my CharacterDefs dict, and I want >a new char, zcaron, that has a caron above the z: simply >calling the caron procedure within zcaron fails as the caron >procedure is apparently undefined. Why?... I sent mail but, I am not sure it got through. I suspect the reason to be that you have set the current directory to be your font directory within the BuildChar procedure. The character definitions are in another dictionary, probably CharacterDefs, which is a dictionary contained within your fontdict. Usually, the procedure to draw your character is put on the stack and executed by something like: CharacterDefs Charname get exec % Charname is the name of the character within BuildChar. If your CharacterDef entry for your combined character, /zcaron, simply tries to execute the procedure for /z and /caron, it won't find them in the current dictionary (Your font dict). There are several solutions to the problem. One technique I have used sucessfully for combined user defined characters would have an entry for the zcaron character in CharacterDefs something like the following: /zcaron { CharacterDefs /z get exec CharacterDefs /caron get exec } def Another solution which should work, although I have not tried it, would be to make Characterdefs the currentdict with begin ... end within the procedure for zcaron. Don't forget to have a BBox entry for zcaron which will hold both of the characters from which it is derived as well as an appropriate Metrics entry. -- Robert Grove rgrove@pogo.gpid.tek.com | {anybackbone}!tektronix!pogo.gpid.tek.com!rgrove