Jason (jcreed) wrote,

Poking around with the little pdf-generation sml library I wrote a while ago. Didn't get a whole lot of anything new done (just added curveto and stroke) Here's a demo anyway. Trying to figure out the right thing to do about fonts is really annoying. On the one hand, PDF supports "Type 3" fonts, which aren't exactly PS Type 3 fonts, but they're the exact PDF analogue: glyphs are arbitrary PDF code. The bad thing is that, as far as I can tell, they only support 8-bit encodings, so I would have to translate all use of unicode into constant codepage-switching. The other option is just to stay with truetype support, which supports (via somewhat evil CIDFont machinery) UTF-8 and has the advantage of making it likely easier to use pre-existing fonts. The only problem there is that you really do need to extract the metrics from the font file to do anything useful. So there either I would shore up my shaky-house-of-cards truetype-parsing code, or else rely on something like fontforge to extract metrics for me. I'm kind of leaning towards the latter. I'm not eager to handle all the zillion special cases of TTF.
Tags: fonts, pdf, programming, sml

  • (no subject)

    Something that's bugged me for a long time is this: How many paths, starting at the origin, taking N steps either up, down, left or right, end up at…

  • (no subject)

    Still sad that SAC seems to end up being as complicated as it is. Surely there's some deeper duality between…

  • (no subject)

    I had already been meaning to dig into JaneSt's "Incremental" library, which bills itself as a practical implementation (in ocaml) of the ideas in…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded