Using full PostScript, not Compact Font Format (CFF)

mattlag's picture

Thanks to TTX and this forum post: http://typophile.com/node/67406 I've been playing around with / trying to learn PostScript. Through some reverse-engineering I've been able to create TTF fonts (Quadratic Bezier Curves... blargh), and even OTF fonts with the Compact Font Format, by editing the CharString entries in the CFFFont table. A little tedious to do by hand, but I like it. All fine so far.

What i'd really like to do is use full PostScript to define characters in the font... for example, using strokes and line widths, which isn't possible with CFF. All the fonts I find seem to be PostScript Level 2 - which I believe means they use CFF.

Is there a font format that uses full PostScript, as opposed to CFF? Can somebody point me to an example file?

I'm learning as I go here, so there is the possibility that my question doesn't make sense. But at any rate, commentary from more knowledgeable individuals would be greatly appreciated.

Thanks!

::Matt

Theunis de Jong's picture

Type 3 fonts can use everything Postscript can (oh, perhaps not issue an "endpage"). But support for these is rapidly dwindling -- if not already entirely gone --, as it requires the font-using software to implement an entire Postscript interpreter.

You are mixing up various parts of font technology, by the way. Postscript fonts do not use "Postscript Level 2"; they use a (very limited) subset of the original Postscript. Not a single Level 2 feature anywhere. The "Type 2" of CharStrings have nothing to do with Postscript levels.

There are good reasons not to use line widths in a font, as a fixed line width would not change with the point size. There is a font Fill type that was meant to have single strokes as font definition, but the problems with these were so great it has also been removed from the official specification years ago.

If all you want is train yourself with Postscript (and not particularly with fonts) , you should find a download of GhostScript. I learned Postscript programming by talking to a LaserWriter using modem software, but its modern variant, Acrobat Distiller, doesn't come with interactive features. If I'm correct, GhostScript still does, meaning you can interactively build up anything you like and see it appear on the screen.

lunde's picture

When people refer to PostScript fonts, they are almost always referring to Type 1 fonts.

If you really want to have fun, I suggest that you reference the Adobe Type 1 Font Format, then use the AFDKO type1 and detype1 tools to compile and decompile Type 1 fonts. You can start by using the AFDKO tx tool to convert one of your existing fonts ("font.cff" in the command line below) into a Type 1 font:

% tx -t1 font.cff font.pfa

Then, use the detype1 tool to decompile the Type 1 font into human-readable/editable form:

% detype1 font.pfa font.txt

Thomas Phinney's picture

So, yes, using the full power of PostScript means using Type 3 fonts, which can only print to a PostScript device, and won't be WYSIWYG on screen, and at best will work in only some apps, and only on the Mac. Not really a good idea in this day and age, unless it's just for fun and you know it will work in the specific operating environment you want to use.

Edit: of course you can also use Type 3 fonts and even get WYSIWYG if you have a NeXT computer. :)

mattlag's picture

Awesome - thank you all for the input. I knew I had some stuff right and some stuff was just off... always helps to ask some experts.

As a result I think i'll stick with the outlining mechanism that the CFF provides.

Thank you!

Té Rowan's picture

Ghostscript. :-þ

Syndicate content Syndicate content