Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Downloading a CID font to PostScript

Community Beginner ,
Aug 22, 2009 Aug 22, 2009

Can anyone provide me with a PostScript file that shows all the dictionaries and/or resources that are necessary to download a CID font into a PostScript printer?

I've read all the documents I can find about it. Of course, there's not much written about PostScript anymore - everything is about PDF now.

I've seen the Type 42 example for a single-byte font but that doesn't apply at all to double-byte fonts.  They have to be downloaded as CID fonts.

A file that downloads a single glyph used for a character greater than 255 would do the job.

There seems to be no example for a CID font out there.

Allan.

TOPICS
Programming
38.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 24, 2009 Aug 24, 2009

Allan,

I have never used a Type11 font but a search turns up:

https://bug90385.bugzilla.mozilla.org/attachment.cgi?id=74275

Ed

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 24, 2009 Aug 24, 2009

I was looking for some actual PostScript code - dictionary element definitions, etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 24, 2009 Aug 24, 2009

The PostScript that goes with the output of the last link:

https://bug90385.bugzilla.mozilla.org/attachment.cgi?id=74252

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 24, 2009 Aug 24, 2009

Ed,

This is what I was looking for.  However, the printer doesn't like the font.

I guess there's probably some byte in the HEX data that's not correct.

The message, as usual, is very uninformative:

ERROR: invalidfont

OFFENDING COMMAND: show

STACK: ( '' ), ( '' ), 51200, --dict--, --dict--, --string--,

Thanks,

    Allan.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 25, 2009 Aug 25, 2009

Allan,

The error message is saying there is a problem with the font but not what the problem is. The file worked fine with ghostscript but also failed on an

Adobe printer for me but with a different error. Next a Type 11 font was created with fontforge from the public domain font Tuffy. This is included

below other than comments and some areas SNIP'ed out. However just the font (without a show) errors in the Adobe RIP but not ghostscript.

One other place to look it create a file using a 2 byte font and print to PostScript with a print driver.

Ed

%!PS-Adobe-3.0 Resource-CIDFont
/CIDInit /ProcSet findresource begin

16 dict begin
  /FontName /Tuffy def
  /CIDFontType 2 def
  /FontType 11 def
  /CIDFontName /Tuffy def
  /CIDSystemInfo 3 dict dup begin
    /Registry (Adobe) def
    /Ordering (Identity) def
    /Supplement 0 def
  end def

  /FontMatrix [1 0 0 1 0 0] def
  /PaintType 0 def
  /FontBBox {-0.0581055 -0.219238 0.76416 0.973145 }readonly def
  /FontInfo 11 dict dup begin
/FullName (Tuffy Regular) readonly def
/FamilyName (Tuffy) readonly def
/Weight (Medium) readonly def
/FSType 0 def
/ItalicAngle 0 def
/isFixedPitch false def
/UnderlinePosition -0.0366211 def
/UnderlineThickness 0.0244141 def
/ascent 1597 def
end readonly def
  /sfnts [
<
  0001000000080080000300004646544D491AC87600003A800000001C637674
<SNIP>
  00
>
<
  0000000100000000C5780F9E00000000C1AD8AB900000000C1F52E1E
  00
>
  ] def
  /CIDMap 194 dict dup begin
    0 0 def
    32 3 def
<SNIP>
    8223 195 def
    8364 196 def
  end readonly def
  /GDBytes 2 def
  /CIDCount 8365 def
currentdict end dup /CIDFontName get exch /CIDFont defineresource pop
end

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 25, 2009 Aug 25, 2009

Thanks Ed.

It seems as though CID font support in PostScript is just not ready for primetime.

Nothing seems to work with a real printer. GhostScript is the only consumer that can deal with CID fonts.

The printer I'm using is a HP-2605dn which contains PostScript level 3.  Therefore, it should have support for CID fonts, if any version of PostScript has.

I guess PostScript just doesn't get used for double-byte fonts.

Thanks again for your help.

Allan.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 30, 2009 Aug 30, 2009

Ed,

Do you think that CID fonts work at all in PostScript?

For every example I find there seems to be a note saying that it works in ghostscript but fails on a PostScript printer.

I've never found a file that contains an embedded CID font AND prints on a PostScript printer.

Thanks,

    Allan.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 31, 2009 Aug 31, 2009

Allan,

I do believe they would work as Adobe has always is usually very good at testing everything.

When problems occur it is often that the spec was not followed.

The original post I believe asked about a Type 11 example which did error on an Adobe RIP

after working with gs. Below are some CID examples where one font did not error when sent

to an Adobe RIP.

ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/

I know a fair amount about fonts but not 2 byte fonts so can't help out much more.

Ed

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 31, 2009 Aug 31, 2009
LATEST

Thanks Ed.

I'm not convinced that CID fonts have ever worked in PostScript. 

Adobe's support for PostScript seems to have become almost non-existent in favor of PDF.  I guess it's not too surpising though considering PDF's popularity.

Thanks again,

    Allan.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines