ANNOUNCE: FreeType 2 Bindings

I'm excited to announce the immediate availability of FreeType 2 bindings on hackage. These bindings are based off the 2.4.4 release of FreeType 2 and use the BSD licensing option for FreeType 2. This package should be of interest to OpenGL users as it provides a way to get nice looking fonts into your OpenGL programs. This binding is still in its infancy, hence version 0.0.1, but enough of the API is exposed that I was able to convert the example1.c program in the FreeType tutorial to Haskell. Here are a few relevant links: * What is FreeType: http://www.freetype.org/freetype2/index.html * Example program and tutorial: * http://www.freetype.org/freetype2/docs/tutorial/step1.html * http://www.freetype.org/freetype2/docs/tutorial/example1.c * Haskell version of tutorial: * https://github.com/dagit/freetype2/blob/cabalization/Main.hs * Example program output (yes, their tutorial example really does draw the bitmap as a grid of text, scroll around to find the word "blah"), more interesting examples to come later: * http://hpaste.org/45239/aoeu The current API level is "raw" and makes no attempts to present a good Haskell-like interface to the library. My plan is to build a higher level interface on top once a sufficient portion of the API is available to Haskell. You can find the source on github in the cabalization branch: * https://github.com/dagit/freetype2 Patches welcome! Thanks, Jason

On Sun, Apr 3, 2011 at 4:21 PM, Jason Dagit
I'm excited to announce the immediate availability of FreeType 2 bindings on hackage. These bindings are based off the 2.4.4 release of FreeType 2 and use the BSD licensing option for FreeType 2. This package should be of interest to OpenGL users as it provides a way to get nice looking fonts into your OpenGL programs.
I almost forgot to mention: An import feature of my cabalization of freetype2 is that NO external libraries are needed. Just install it with cabal or cabal-dev on linux, osx, or windows and you're ready to go. Jason

Hi Jason Good luck - I worked on a binding a couple of years ago, but decided that FreeType is really a framework rather than a library. Thus, I felt it would be more pragmatic to write a intermediate C library doing exactly what you need and bind to that rather than bind directly to FreeType. Naturally, I'm not suggesting that you should agree with my analysis - but I would flag a caution that FreeType is very problematic to bind to. The abandoned code is in Copperbox: http://code.google.com/p/copperbox/source/checkout path in the trunk: libs/graphics/FreeType Best wishes Stephen
participants (2)
-
Jason Dagit
-
Stephen Tetley