Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!ottix-news.ottix.net!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: rodd@panix.com (Rod Dorman) Newsgroups: comp.lang.postscript Subject: Re: Postscript output with a unicode font character from a non-built in font Date: Mon, 4 Aug 2014 20:06:40 +0000 (UTC) Organization: Public Access Networks Corp. Lines: 33 Message-ID: References: <53df8e33$0$2741$c3e8da3$66d3cc2f@news.astraweb.com> NNTP-Posting-Host: panix1.panix.com X-Trace: reader1.panix.com 1407182800 9558 166.84.1.1 (4 Aug 2014 20:06:40 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 4 Aug 2014 20:06:40 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Xref: csiph.com comp.lang.postscript:1946 In article , ken wrote: >In article <53df8e33$0$2741$c3e8da3$66d3cc2f@news.astraweb.com>, >idprog@trust.com says... >> How should I go about printing this character from Postscript? > >First you need to embed the font. Assuming you are using the Windows >TrueType font you will need to convert the font to a type 42, and >include the type 42 font in the PostScript file. > >As part of this exercise you will need to re-encode the font so that the >character code you want to use in the PostScript to draw this glyph maps >to the relevant glyph program in the Type 42 font. > >The font's Encoding maps character codes to glyph names, the Charstrings >dictionary contains a number of key/value pairs, where the key is the >glyphg name and the value is the GID of the glyph you want to draw. So >you need to ensure that the mapping "character code->glyph name ->GID" >results in whatever the GID is for the glyph you want to draw, in the >font in question (Note, *none* of this is anythign to do with Unicode, >though the TTF may contain a Unicode CMAP table, which will at least >allow you to discover what the GID for the glyph relating to the given >Unicode code point is). > >Then you simply select and scale the font, then 'show' the character >code which maps to that glyph, just as you would for any other glyph. Note that if the glyph you want isn't mapped in the Encoding array you can avoid needing to reencode by using the glyphshow command. -- -- Rod -- rodd(at)polylogics(dot)com