[Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL

Jefferson Heard jefferson.r.heard at gmail.com
Sun Feb 17 20:28:59 EST 2008


Thanks.  that's certainly a thought...  doesn't make the text 3d,
though, does it?  I'd ideally like to have something that turns the
text into geometry, but this'll do in a pinch...

On Sun, Feb 17, 2008 at 8:26 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> On Feb 18, 2008 12:20 AM, Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> wrote:
>  >
>  > On Feb 17, 2008, at 19:13 , Jefferson Heard wrote:
>  >
>  > > In C and in Java, I can use truetype fonts in Haskell using select
>  > > libraries, and I'd like to be able to do the same in Haskell.  Are
>  > > there any portable libraries out there for loading fonts into OpenGL
>  > > geometry for Haskell?  I can use the vector fonts from GLUT is
>  > > absolutely neccessary, but I'd like something that looks a little more
>  > > professional.  Are there any suggestions?
>  >
>  > Can't speak to OpenGL per se, but have a look at:
>  > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/SDL-ttf-0.4.0
>  > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-xft-0.2
>
>  I have an immature, but precise and picky implementation that renders text in
>  a ttf font to an OpenGL texture (using SDL-ttf) here:
>  http://svn.luqui.org/svn/misc/luke/work/code/haskell/frp/Fregl/Draw.hs
>  (It may have some dependencies in the same directory).  Text support is
>  way at the bottom.
>
>  Good Luck,
>
>  Luke
>



-- 
I try to take things like a crow; war and chaos don't always ruin a
picnic, they just mean you have to be careful what you swallow.

-- Jessica Edwards


More information about the Haskell-Cafe mailing list