[comp.text.tex] REPOST: Making a small caps font

jv@mh.nl (Johan Vromans) (05/03/91)

Given a downloadable PostScript font (PS and AFM file), is it
possible to create a SmallCaps font for it, by munging the AFM file
only? 

This font must be used by several different applications, so specific
solutions (e.g. TeX virtual fonts), though helpful, are not what we
are looking for.

Any help is appreciated.

	Johan
-- 
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------

rberlin@birdlandEng.Sun.COM (Rich Berlin) (05/04/91)

In article <1991May3.093653.8120@pronto.mh.nl>, jv@mh.nl (Johan Vromans) writes:
|> 
|> Given a downloadable PostScript font (PS and AFM file), is it
|> possible to create a SmallCaps font for it, by munging the AFM file
|> only? 
|> 
|> This font must be used by several different applications, so specific
|> solutions (e.g. TeX virtual fonts), though helpful, are not what we
|> are looking for.
|> 
|> Any help is appreciated.

I don't think you can affect the display of the font by modifying the
AFM file.

It seems to me that the obvious way to implement it is with a
Composite Font with an FMapType of 6.  Unfortunately, that's a Level 2
feature so most printers still don't have it

-- Rich

tinkelman@camb.com (Bob Tinkelman) (05/18/91)

In <1991May3.093653.8120@pronto.mh.nl>, jv@mh.nl (Johan Vromans) writes:
 
> Given a downloadable PostScript font (PS and AFM file), is it
> possible to create a SmallCaps font for it, by munging the AFM file
> only? 

No.

Given the PostScript font, you can create another PostScript font, which
is `small caps'.  It's pretty straight forward.  I did it as one of my
first non-toy PostScript programs several years ago, when the DVI-to-PS we
were using didn't support small-caps.  Since then I've seen other people's
solutions to the same problem (there's now one in every dvi2ps, dvips,
dvitops, etc) and like most of them better than mine.  As I recall there
were a number of small gotchas that I didn't think of the first time
through.  One was ligatures.

You should be able to take the original AFM file and produce a new one
with font metrics based on the original, assuming the small-caps were
produced using a fixed scaling factor (eg. 0.6).  You can also produce
kerning info for the new small-caps by scaling the ones for the big-caps. 
However, I think you're stuck for the big-cap-to-small-cap kerning pairs. 
The old AFM just doesn't have the information you'd need to figure out the
kerning between a big-cap-T and a small-cap-H.
-- 
Bob Tinkelman, Cambridge Computer Associates, Inc., 212-425-5830, bob@camb.com