Jason (jcreed) wrote,
Jason
jcreed

Here's a funny thing that I didn't necessarily expect would work, but in fact seems to work. Consider the following postscript file:
/Austin findfont
32 scalefont
setfont
100 200 moveto
(Hello, World) show

where Austin is a truetype (notice: TOTALLY NOT POSTSCRIPT) font. Run gv on this, and it's like, wtf, I've never heard of this Austin nonsense, fuck it, I'll display it in courier just to spite you.

However! Run
ps2pdf -sFONTPATH="/path/to/ttfs" /tmp/a.ps
where /path/to/ttfs is a directory containing Austin.ttf, and /tmp/a.ps is the above snippet of postscript, and you get out a pdf file with Austin text.

It's one of those rare circumstances where fiddly file format conversion tools actually behave better than I thought I could reasonably hope them to.
Tags: fonts, pdf, ps
Subscribe

  • (no subject)

    ICFP contest has got me feeling kind of down about programming. I really don't like the problem this year. I had my hopes up that since they had…

  • (no subject)

    Man, can't people just sit still in a class for an hour? I remain mystified by people who continually, for the entire 80 minute duration of class,…

  • I was once your vassal / You were once my castle

    OH EM FUCKING GEE. I finally figured out that yes, the periodic chirping noise coming from the basement is indeed because there's a battery in the…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 17 comments

  • (no subject)

    ICFP contest has got me feeling kind of down about programming. I really don't like the problem this year. I had my hopes up that since they had…

  • (no subject)

    Man, can't people just sit still in a class for an hour? I remain mystified by people who continually, for the entire 80 minute duration of class,…

  • I was once your vassal / You were once my castle

    OH EM FUCKING GEE. I finally figured out that yes, the periodic chirping noise coming from the basement is indeed because there's a battery in the…