The SVGFonts package

[Tags: bsd3, library]

Native font support for the Diagrams library. The SVG-Font format is easy to parse and was therefore chosen for a font library completely written in Haskell.

You can convert your own font to SVG with http://fontforge.sourceforge.net/ or use the included LinLibertine, Bitstream

Features

XML speed issues can be solved by trimming the svg file to only those characters that are used (or maybe binary xml one day).

Version 1.0 of this library supports texturing which would only make sense in a Diagrams Backend that does rasterization in Haskell.

Example:

  # LANGUAGE NoMonomorphismRestriction #

 import Diagrams.Prelude
 import Diagrams.Backend.Cairo.CmdLine
 import Graphics.SVGFonts.ReadFont (textSVG)


 main = defaultMain (text' "Hello World")

 text'   t = stroke (textSVG t 1) # fc purple # fillRule EvenOdd
 text''  t = stroke (textSVG' $ TextOpts t lin INSIDE_H KERN False 1 1 ) # fillRule EvenOdd
 text''' t =        (textSVG_ $ TextOpts t lin INSIDE_H KERN True  1 1 ) # fillRule EvenOdd

Properties

Versions0.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
Dependenciesattoparsec, base (==4.*), containers (>=0.4 && <0.6), data-default, diagrams-lib (>=0.6), directory (>=1.1), parsec, split, text, tuple, vector, vector-space, xml
LicenseBSD3
AuthorTillmann Vogt
Maintainerdiagrams-discuss@googlegroups.com
CategoryGraphics
Source repositoryhead: git clone https://github.com/tkvogt/SVGFonts.git
Upload dateTue Apr 9 12:54:19 UTC 2013
Uploaded byTillmannVogt
DistributionsNixOS:1.4.0.3
Downloads2319 total (201 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees