SVGFonts

[ bsd3, graphics, library ] [ Propose Tags ]

parse svg-font files and generate outlines of letters and sentences


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.3, 0.4, 1.0, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.3, 1.3.0.1, 1.3.0.2, 1.4, 1.4.0.1, 1.4.0.2, 1.4.0.3, 1.5.0.0, 1.5.0.1, 1.6.0.0, 1.6.0.1, 1.6.0.2, 1.6.0.3, 1.7, 1.7.0.1, 1.8, 1.8.0.1
Dependencies base, GLUT, haskell98, OpenGL, parsec, xml [details]
License LicenseRef-GPL
Author Tillmann Vogt
Maintainer Tillmann.Vogt@rwth-aachen.de
Category graphics
Uploaded by TillmannVogt at 2009-04-06T23:58:00Z
Distributions LTSHaskell:1.8.0.1, NixOS:1.8.0.1, Stackage:1.8.0.1
Reverse Dependencies 11 direct, 12 indirect [details]
Executables Fonts
Downloads 35495 total (103 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for SVGFonts-0.2

[back to package description]
SVGFonts

This library parses the Font file format SVG fonts which is in XML, so it easy to manipulate by hand.
See http://www.w3.org/TR/SVG/fonts.html
You can convert your favourite font (i.e.  .ttf) into a .svg file with fontforge (the menu item under
"Save All"). If a font converted on your own doesn't work, try the repair options, and if this still
doens't work edit the file by hand or even cooler: help me with a patch to make this library more robust.
Remember that a lot of fonts are not allowed to be distributed freely.

usage:

The main library file ReadFont.hs parses a .svg xml-file containing font data and returns the outline
of the font as a polygon (a list of Float-pairs). Hole outlines in a letter are inserted in the outer
outline. This enables an easy extrusion. But since extrusion is generally a handy operation it is only
in the example and should be part of another graphics library. To use this library in your code look
at the example which uses the functions read_font and get_glyph_polygon.

example:
 Fonts.hs is an OpenGL program that uses .svg-files in src/Test to display a string
 you can navigate around the 3d string with w,a,s,d, + arrows