Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1945
| From | ken <ken@spamcop.net> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: Postscript output with a unicode font character from a non-built in font |
| Date | 2014-08-04 15:14 +0100 |
| Message-ID | <MPG.2e49a5934cbfe069898c3@usenet.plus.net> (permalink) |
| References | <53df8e33$0$2741$c3e8da3$66d3cc2f@news.astraweb.com> |
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. As you've probably guessed by now, this isn't entirely simple to get right, and you will need a working knowledge of PostScript fonts as well, in order to get things like the FontMatrix correct (for example, the PostScript font design grid is usually 1000x1000, whereas the TrueType design grid is usually 2048x2048) Ken Some possibly useful liks: You will almost certainly need a copy of the Adobe Tech note 5012 "The Type 42 Font Format Specification" http://www.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5012.Type42 _Spec.pdf See also ttftotype42: http://www.lcdf.org/type/ But I've never used this and don't know if it will give you the control you will need. If nothign else you can look at the output from it and learn how to make a type 42 font. And: http://www.ctan.org/tex-archive/fonts/utilities/TrueTypeToType42 This one will require you to have a copy of Ghostscript, as it relies on GS to do a lot of the work.
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Postscript output with a unicode font character from a non-built in font idol programmer <idprog@trust.com> - 2014-08-04 14:44 +0100
Re: Postscript output with a unicode font character from a non-built in font ken <ken@spamcop.net> - 2014-08-04 15:14 +0100
Re: Postscript output with a unicode font character from a non-built in font rodd@panix.com (Rod Dorman) - 2014-08-04 20:06 +0000
Re: Postscript output with a unicode font character from a non-built in font ken <ken@spamcop.net> - 2014-08-05 13:28 +0100
Re: Postscript output with a unicode font character from a non-built in font idol programmer <idprog@trust.com> - 2014-08-06 11:30 +0100
csiph-web