|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
ps2writeLooking for some advice or ideas....
From bug 690012, a TrueType font with a very large number of glyphs doesn't work correctly when output using ps2write. My last comment on the thread: -------------------------------------------------------------------------- It looks like this is a limitation of the PostScript prolog for ps2write, abetted by architectural limitations in PostScript. If we select the pdfwrite device we can see that a valid working PDF file is produced. ps2write basically writes out the contents of a PDF file, with a prolog (opdfread) which defines a number of PostScript procedures so that the emittted 'PDF' file will work. It appears that the font handling simply cannot cater for a font of this size, it attempts to manipulate array indices above 64K, which is an architectural limit. I'm not sure its possible to overcome this, any ideas anyone ? ---------------------------------------------------------------------- I haven't identified exactly where the invalidaccess and rangecheck errors are coming from, but they always seem to occur with CharStrings on the stack, so I infer this is a font problem. They also seem to have very large integers (one case > 80,000, another > 111,000) which appear to be indices to 'put' or to 'getinterval' (these are the operators signalling the error). If anyone (but especially Alex) has any ideas, I'm open to suggestions. Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TASK: Shoot yourself in the foot. Occam You shoot both your feet with several guns at once. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ps2write xefitraKen,
My old idea is to re-index glyphs when creating a font subset. Note it may need to adjust subglyph indices in composite glyphs. IMO it worth to do even for pdfwrite to create smaller fonts. Leo. ----- Original Message ----- From: "Ken Sharp" <ken.sharp@...> To: <gs-devel@...> Sent: Tuesday, August 12, 2008 7:17 PM Subject: [gs-devel] ps2write > Looking for some advice or ideas.... > > From bug 690012, a TrueType font with a very large number of glyphs > doesn't work correctly when output using ps2write. My last comment on the > thread: > > -------------------------------------------------------------------------- > It looks like this is a limitation of the PostScript prolog for ps2write, > abetted by architectural limitations in PostScript. If we select the > pdfwrite device we can see that a valid working PDF file is produced. > > ps2write basically writes out the contents of a PDF file, with a prolog > (opdfread) which defines a number of PostScript procedures so that the > emittted 'PDF' file will work. > > It appears that the font handling simply cannot cater for a font of this > size, it attempts to manipulate array indices above 64K, which is an > architectural limit. > > I'm not sure its possible to overcome this, any ideas anyone ? > ---------------------------------------------------------------------- > > I haven't identified exactly where the invalidaccess and rangecheck errors > are coming from, but they always seem to occur with CharStrings on the > stack, so I infer this is a font problem. They also seem to have very > large integers (one case > 80,000, another > 111,000) which appear to be > indices to 'put' or to 'getinterval' (these are the operators signalling > the error). > > If anyone (but especially Alex) has any ideas, I'm open to suggestions. > > > > Ken > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > TASK: Shoot yourself in the foot. > Occam You shoot both your feet with several guns at once. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > _______________________________________________ > gs-devel mailing list > gs-devel@... > http://www.ghostscript.com/mailman/listinfo/gs-devel > _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ps2write xefitraAt 19:53 12/08/2008 +0400, Leonardo wrote:
>My old idea is to re-index glyphs when creating a font subset. >Note it may need to adjust subglyph indices in composite glyphs. >IMO it worth to do even for pdfwrite to create smaller fonts. Thanks Leo, I was guessing this would be at least a partial solution. I suppose if we have too many glyphs in a single subset we should convert to multiple subsets ? I don't know if that's a good idea for pdfwrite as we will end up emitting multiple fonts for CJKV languages ? Sounds like a big job unfortunately. Ken _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ps2write xefitraKen,
You don't need to divide into smaller font subsets, because it is not useful for CID fonts and is already done for non-CID fonts. All what you need here is a local change to pdfwrite : just call a new function immediately before writing a TT font out (and after the conversion of a Type 42 into CIDFontType 11 if necessary). The new function (1) compacts 'loca' and (2) updates composite glyphs before writing the font. Note for subset we always re-generate loca. Leo. ----- Original Message ----- From: "Ken Sharp" <ken.sharp@...> To: "Leonardo" <leonardo@...> Cc: <gs-devel@...> Sent: Tuesday, August 12, 2008 8:57 PM Subject: Re: [gs-devel] ps2write xefitra > At 19:53 12/08/2008 +0400, Leonardo wrote: > > >>My old idea is to re-index glyphs when creating a font subset. >>Note it may need to adjust subglyph indices in composite glyphs. >>IMO it worth to do even for pdfwrite to create smaller fonts. > > Thanks Leo, I was guessing this would be at least a partial solution. I > suppose if we have too many glyphs in a single subset we should convert to > multiple subsets ? I don't know if that's a good idea for pdfwrite as we > will end up emitting multiple fonts for CJKV languages ? > > Sounds like a big job unfortunately. > > Ken > > _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ps2write xefitraAt 22:58 12/08/2008 +0400, Leonardo wrote:
>You don't need to divide into smaller font subsets, >because it is not useful for CID fonts and is already done >for non-CID fonts. Yes of course, I had forgotten that... I suspect the problem only exists with TreuType fonts, but I'll need to check. >if necessary). The new function >(1) compacts 'loca' and (2) updates composite glyphs >before writing the font. Note for subset we always >re-generate loca. That sounds good, thanks for the input I'll look at it as my next task. Ken _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
| Free Forum Powered by Nabble | Forum Help |