On Aug 22, 8:43 pm, "John Smith (not my name)" <j...@hotmail.com>
wrote:
> Hi all,
>
> I am working on a program that outputting PostScript to printers. In the
>   Postscript output, the program encodes true type fonts into multiple
> type 42 fonts with a composite type 0 as parent. the program works fine
> on single-byte charsets, however, it does not work well if the font
> contains CJK characters, even on some quite new printers.
>
> It seems that PostScript interpreters have problems dealing with large
> glyphs (>64K in size), even we encode the data into multiple strings in
> /sfnt array.
>
> I am considering converting true type to type3 and it seems working
> except that I am not sure how to convert the encoding. Our goal is not
> to touch other part of the code, just encode true type fonts into type3.
>
> Can anybody show a PostScript source code about this? I tried a couple
> of encoding choices, but failed to get one to work. I started to suspect
> if it is even possible in this case.
>
> Your help is greatly appreciated.
>
> John

John,

With large glyphs it may be your font cache is too small and the
interpreter is just very
slow. Does it error or appear to hang? If it's the hang set your
MaxFontCache higher or query
it to see if it's full.

If I understand your question you have have converted your TTF to
Type3 but am not sure
about the encoding. Type3 fonts only support 256 characters per
encoding but you can
include more characters in the font (CharProcs) and then re-encode to
use more than 256.

The below fragment shows you how to change one character from the
standard Encoding called
John but you can have 256 of whatever you want. Change John to what
was in your TTF.

10 dict
 begin
 /FontType 3 def
 /FontName /MyFont def
 /Encoding StandardEncoding 256 array copy dup 128 /John put def
 /BuildChar { 1 index /Encoding get exch get
 1 index /BuildGlyph get exec} bind def
 /BuildGlyph { exch /CharProcs get exch
    2 copy known not
   { pop /.notdef } if
   get exec } bind def

 /CharProcs 100 dict def
   CharProcs begin
    /.notdef {} def
/John {
 % define glyph here
} def
% then rest of chars

Ed