Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #243
| From | ken <ken@spamcop.net> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: Bad glyph causes Adobe distill failure, but works in Preview |
| Date | 2011-06-07 10:37 +0100 |
| Message-ID | <MPG.285801a12fa90bb7989847@usenet.plus.net> (permalink) |
| References | (4 earlier) <ad4e9d97-66b9-4613-9891-43345de2440c@h7g2000yqa.googlegroups.com> <MPG.28568a2e3e9e72fb989842@usenet.plus.net> <ac02462d-913c-43da-a15e-dbc55132fc9e@j25g2000vbr.googlegroups.com> <MPG.2857da9dd92da7d2989845@usenet.plus.net> <a49fe40c-a67d-4b0b-ab3e-c8c3b6031196@h7g2000yqa.googlegroups.com> |
In article <a49fe40c-a67d-4b0b-ab3e-c8c3b6031196 @h7g2000yqa.googlegroups.com>, jdawiseman@gmail.com says... > of each good font on the system. For fonts for which a glyph is > broken, I want to show what can be shown, and certainly not terminate > the whole job without output. Well, for base fonts you'll need the Type 1 font specification, the CFF font specification, the TrueType font specification (for type 42 fonts) and you'll also want to read the sections of the PostScript Language Reference Manual dealing with fonts. Then you'll need the CIDFont specification and the CMap specification for CIDFonts. I'm assuming you aren't going to check type 3 fonts. I'm also assuming that you are allowing the interpreter to instantiate the font, rather than checking the validity of the font file on disk yourself. You seem to be most interested in checking the validity of the glyph program rather than the font. So you can pass up a bunch of other checks on the presence/absence of various font elements, if they aren't valid the interpreter won't load the font (but it may well generate an error). Type 0 = composite (probably CID but maybe OCF) fonts. Either way you'll need to check the type 0 font for correctness, then each of the descendants. For CIDFonts with PostScript outlines you'll need to pick the glyphs for glyphshow using a CID rather than a glyph name, but that's not a problem. Enumerating the CharStrings shoul dbe adequate. Type 1 & Type 2 are the same, in effect, CFF is just a more compact representation. You can simply enumerate the CharStrigns dictionary for both I believe. Type 42 fonts are TrueType fonts, so you need to extract the sfnts data, and then decode the various TrueType tables (checking them for validity), then take the GLYF table and (using the LOCA table to locate each glyph program) check each of the glyphs in turn. Note that you will need to apply the CVT and FPGM table data to each glyph, and the application of that data can render the glyph invalid, so essentially you will need a full TrueType interpreter. For CIDFonts with TrueType outlines you will need to use the same type 42 interpreter. Its a lot of work, and not work that I would be keen to take on in PostScript personally. Ken
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-03 01:46 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-03 01:46 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview ken <ken@spamcop.net> - 2011-06-03 15:28 +0100
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-03 11:45 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview ken <ken@spamcop.net> - 2011-06-04 10:54 +0100
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-05 04:15 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview ken <ken@spamcop.net> - 2011-06-06 07:55 +0100
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-06 14:49 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview ken <ken@spamcop.net> - 2011-06-07 07:50 +0100
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-07 02:00 -0700
Re: Bad glyph causes Adobe distill failure, but works in Preview ken <ken@spamcop.net> - 2011-06-07 10:37 +0100
Re: Bad glyph causes Adobe distill failure, but works in Preview jdaw1 <jdawiseman@gmail.com> - 2011-06-07 16:56 -0700
csiph-web