On Feb 13, 2010, at 6:23 PM, Matt Gushee wrote: > Thanks, but I'm pretty sure I need Freetype. It's not for a GUI app. In > fact, what I am contemplating is a PDF vocabulary. And yes, I'm aware > that there is a libHaru binding in the unsupported tree, so my idea may > be neither necessary nor advisable, but I want to see what I can do. If > nothing else I'll gain a deeper understanding of the PDF file format, > which is one of my goals. > > Anyway, whether I use an existing PDF library or develop my own, the > ability to embed TrueType (and hopefully OpenType) fonts is essential > for the kinds of applications I have in mind. So yes, I'm pretty sure I > need Freetype.
My apologies for assuming you just wanted to render text. For PDF generation, I think you would still be better served by Pango and Cairo. Pango will handle text direction, ligatures, character composition, and other text rendering considerations that you would need to reinvent over Freetype, and Cairo provides a nice vector graphics API that maps very well to the PDF graphics model—I think Cairo even supports PDF as an output target. Both libraries can interface with Freetype for low-level features such as font embedding they don't handle directly You can see Factor's pango bindings in action in ui.text.pango. There are some cairo demos in unmaintained you could look at and maybe resurrect to get a feel for that binding. For general information about Factor's C FFI, typing «"alien" help» in the listener will bring you to the main help article for the C library interface. -Joe ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
