Re: [Haskell-cafe] design question/font metrics

2010-06-03 Thread Christopher Done
Maybe you could check out the FTGL package for inspiration on using the freetype as a conventional C library. I was going to try to write a Hackage package but realised I know nothing about typography and had to start reading the intro. on Freetype's homepage (which is pretty good, actually).

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Anthony Cowley
On Tue, Jun 1, 2010 at 10:30 AM, Gery Debongnie gery.debong...@gmail.com wrote: 3. Perform a reading of the font metrics file in the main program, put the results into some FontMetrics object, and give that to stringWidth :: FontMetrics - Font - String - Double.  Pros : allow me to avoid

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Stephen Tetley
Hi Gery There probably isn't a library to help - I've looked at extracting TrueType font metrics myself but abandoned it - TrueType fonts have a very complicated file format, and the spec is inadequate to code an implementation. TeX font metrics are probably simpler but obviously tied to TeX.

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Brandon S. Allbery KF8NH
On Jun 1, 2010, at 10:53 , Stephen Tetley wrote: There probably isn't a library to help - I've looked at extracting TrueType font metrics myself but abandoned it - TrueType fonts have a very complicated file format, and the spec is inadequate to code an The saner way to do this is to write a

Re: [Haskell-cafe] design question/font metrics

2010-06-01 Thread Stephen Tetley
Hi Brandon Even that's not simple - freetype is essentially a framework for writing font processors rather than a conventional C library[*]. Saner perhaps is to write a C program using freetype to do the exact job you have in mind, then bind to your C program. Best wishes Stephen [*} Probably