[HOpenGL] Re: [Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL

Claus Reinke claus.reinke at talk21.com
Fri Feb 22 10:13:46 EST 2008


[cc-ed to hopengl list; are there many haskell opengl users
 not on that list, btw?]

a standard package for easy-to-use, high-quality, portable 
font support would make a great addition to haskell's 
otherwise nice opengl bindings! 

is there a reason for going directly to freetype? from the
old opengl font survey at 

http://www.opengl.org/resources/features/fontsurvey/

i got the impression that accessing freetype2 via ftgl
might make things slightly easier, while also offering
more options (geometry instead of texture fonts), or 
did I misread?

http://ftgl.wiki.sourceforge.net/

the source doesn't seem to have changed since the
end of 2004, which might imply some issues with
newer compilers, etc?

has anyone tried to bind to ftgl? any comments on
that route?

and to what extent to the haskell gui libs with opengl
support allow their fonts to be used for text geometry
or textures in opengl?

claus

----- Original Message ----- 
From: "Bit Connor" <bit at mutantlemon.com>
To: "Jeremy Shaw" <jeremy at n-heptane.com>
Cc: "Haskell-cafe Cafe" <haskell-cafe at haskell.org>
Sent: Friday, February 22, 2008 2:42 PM
Subject: Re: [Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL


>I also have made haskell bindings to FreeType, including support for
> extracting glyph outlines.
> 
> I haven't had time to publish it yet. Hopefully I'll get around to it soon.
> 
> On Mon, Feb 18, 2008 at 5:07 AM, Jeremy Shaw <jeremy at n-heptane.com> wrote:
>> At Mon, 18 Feb 2008 01:26:17 +0000,
>>
>> Luke Palmer wrote:
>>
>>  > 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.
>>
>>  Along the same lines, I have an imcomplete, but direct binding to
>>  freetype and an incomplete binding to GLX which can be used to draw
>>  text to opengl textures:
>>
>>  http://n-heptane.com/nhlab/repos/haskell-freetype/
>>  http://n-heptane.com/nhlab/repos/haskell-glx/
>>
>>  This file contains an example of drawing text using GLX+FreeType:
>>
>>  http://n-heptane.com/nhlab/repos/haskell-freetype/FreeTypeTest.hs
>>
>>  This code has not been touched in a few years, so it probably needs
>>  some updates to work with ghc 6.8. Also, I believe the X11 package now
>>  has builtin support for ClientMessage, so that module can go away.
>>
>>  j.
>>
>>
>> _______________________________________________
>>  Haskell-Cafe mailing list
>>  Haskell-Cafe at haskell.org
>>  http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the HOpenGL mailing list