Skip to main content
Participant
January 26, 2010
Question

editing ps file for use with opentype font

  • January 26, 2010
  • 1 reply
  • 865 views

Hi all,

I have an old cad software that write some schemas directly in ps files, referencing helvetica font.

I need to use text in central europe language, russian, greek, etc. I have strings in a database, in unicode format.

If I write automatically these strings in ps files, I have to change Helvetica font with MyriadPro (for example) and I could do this with a text substitution.

It works fine if all text is ansi and I find a pdf distilled with myriadpro. But if I insert or paste non-ansi text, the distiller give me an error.

I think that I should convert the text in ansi greek, ansi russian, etc... and then use helvetica Greek, etc.

Is there a chance to use a opentype font?

Thanks, Mario

This topic has been closed for replies.

1 reply

February 17, 2010

You can use OpenType fonts if you encode them as PostScript Type 42 fonts. That means a PostScript dictionary with some font information, including some font metrics, an encoding table and a table giving glyph indexes for various glyph names. The actual OpenType font is included in the dictionary as an array of strings with hexcode data. The strings have to be, due to limitations in older rasterizers, be maximum 64KB each and you can only break the strings at boundaries between SFNT tables or between glyphs. It can support multi byte international fonts by using CID fonts.

If you just have one constant font I suggest you convert it by using a program and then include the result in your CAD software. The open source program Fontforge can for example do this. Writing your own converter is relatively hairy.

Dov Isaacs
Legend
February 17, 2010

Not quite true! Your advice with regards to use of Type 42 is appropriate only if the OpenType font is a "TrueType"-flavoured OpenType font. OpenType CFF fonts (Type 1 outlines) are represented in PostScript as Type 1 fonts.

          - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)