SVGFonts: Fonts from the SVG-Font format
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
Complete implementation of the features that fontforge produces (but not the complete SVG format):
Kerning (i.e. the two characters in "VA" have a shorter distance than in "VV")
Unicode
Ligatures
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") <> (rect 8 1) # alignBL ) text' t = stroke (textSVG t 1) # fc purple # fillRule EvenOdd text'' t = stroke (textSVG_ $ TextOpts t lin INSIDE_H KERN 1 1 ) # fc purple # fillRule EvenOdd
[Skip to Readme]
Versions | 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 |
---|---|
Dependencies | attoparsec-text, base (==4.*), containers (==0.4.*), data-default, diagrams-lib, directory (>=1.0 && <1.2), parsec, split, text, tuple, vector, vector-space, xml (==1.3.*) [details] |
License | BSD-3-Clause |
Author | Tillmann Vogt |
Maintainer | tillk.vogt@googlemail.com |
Category | Graphics |
Uploaded | by TillmannVogt at Tue Dec 13 17:44:27 UTC 2011 |
Distributions | NixOS:1.6.0.3 |
Downloads | 14229 total (97 in the last 30 days) |
Rating | (no votes yet) [estimated by rule of succession] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] Hackage Matrix CI |
Modules
[Index]
Downloads
- SVGFonts-1.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)