SVGFonts alternatives and similar packages
Based on the "Graphics" category.
Alternatively, view SVGFonts alternatives based on common mentions on social networks and blogs.
-
implicit
A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation... -
log-warper
Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SVGFonts or a related project?
README
SVGFonts
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 (e.g. the two characters in "VA" have a shorter distance than in "VV")
- Unicode
- Ligatures
- Text boxes with syntax highlighting
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
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import qualified Graphics.SVGFonts as F
main = do
font <- F.loadFont "/path/to/font.svg"
let
diagram :: Diagram B
diagram =
(F.drop_rect$ F.fit_height 22$ F.svgText def{F.textFont = font} "Hello World!")
# stroke # fc blue # lc blue # bg lightgrey # fillRule EvenOdd # showOrigin
mainWith diagram
Usage
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 doesn't work edit the file by hand or tell me. Remember that a lot of fonts are not allowed to be distributed freely.