On Sat, 13 Feb 2010 18:46 -0800, "Joe Groff" <[email protected]> wrote:
> 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.
> 
> My apologies for assuming you just wanted to render text. For PDF

Don't apologize. I'm sure that's what most people want to do.

> 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.

That thought has occurred to me, and I certainly haven't ruled out using
those libraries (and yes, you're right--Cairo does support PDF output).
There are a couple of reasons I might still want to use Freetype
directly:

 * I'm thinking in terms of Web apps that generate PDF. AFAIK, Cairo and
 Pango aren't normally found on Web servers, though one could certainly
 put them there if one wished.

 * I want to use--and develop if need be--not just a simple PDF
 generator, but a complete PDF processing solution. You see, my ambition
 knows no bounds ;-) Seriously, though: to make a long story short, my
 day job is in the printing industry (broadly defined), and while I like
 printing and publishing in general, my particular job is tedious and
 rather dead-endish, and I need to do something about my career. On the
 other hand, I see on a day-to-day basis a lot of really half-assed
 software, involving a lot of missed opportunities to improve
 productivity and quality, and I want to do something about that.

Sorry, that's getting a bit off-topic. Just wanted to explain that if I
seem a bit stubborn, it's because I want to gain a thorough
understanding of the problem space. So I still want to see what I can do
with Freetype, even though I might well end up using a higher-level API.

With that said, I still stubbornly want to know how to use Freetype.
Maybe the answer to the following will be enough to get me going:

 * I think I need to start by calling FT_Init_FreeType, right? Well,
   that has a stack effect of ( library -- FT_Error ). What I don't
   get is, where does the 'library' argument come from? I tried 

     "freetype" "/usr/lib/libfreetype.so.6" "cdecl" add-library
     "freetype" load-library

   and got
 
     DLL" /usr/lib/libfreetype.so.6"

   on the stack, but apparently that's not the right type of object,
   because if I then call

     FT_Init_FreeType

   I get an error saying

     Generic word underlying>> does not define a method for the dll
     class. Dispatching on object: DLL" /usr/lib/libfreetype.so.6"

   [ this is on linux-x86-32, by the way ]
   So .... ?

Thanks for all the good info.

-- 
Matt Gushee
[email protected]

------------------------------------------------------------------------------
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

Reply via email to