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


Groups > comp.lang.postscript > #243

Re: Bad glyph causes Adobe distill failure, but works in Preview

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date Tue, 07 Jun 2011 04:37:26 -0500
From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: Bad glyph causes Adobe distill failure, but works in Preview
Date Tue, 7 Jun 2011 10:37:19 +0100
Message-ID <MPG.285801a12fa90bb7989847@usenet.plus.net> (permalink)
References <989b39ed-2a02-4b74-b4ce-e07ec9d70920@z13g2000yqg.googlegroups.com> <MPG.2852ffede6b4aaed989840@usenet.plus.net> <1ecaa8c6-b428-4e2b-aad9-b61bf5fd7ac6@j25g2000vbr.googlegroups.com> <MPG.28541143848b9d7c989841@usenet.plus.net> <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>
Reply-To ken@spamcop.net
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
User-Agent MicroPlanet-Gravity/3.0.4
Lines 49
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-3y5JXYqRgW++p1MAaKGb+/g17HoAwtf2+63eIuqXcVnRf+NXThrG2v9ripYH9QXEuS6VGpKcrnSY038!x6R0JTg3QgRDzPbR8zz09q1fOQArpK+R/CTZUIaJ121pKAZempYywQZmQsddKFtt5wRD1xLlfUfN!e89MOKxsMkBeRBo=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 3838
Xref x330-a1.tempe.blueboxinc.net comp.lang.postscript:243

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar


Thread

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