SVGFonts-1.5.0.0: Fonts from the SVG-Font format

Safe HaskellNone
LanguageHaskell2010

Graphics.SVGFonts.ReadFont

Synopsis

Documentation

data FontData n Source

This type contains everything that a typical SVG font file produced by fontforge contains.

bbox_dy :: RealFloat n => FontData n -> n Source

Difference between highest and lowest y-value of bounding box

bbox_lx :: RealFloat n => FontData n -> n Source

Lowest x-value of bounding box

bbox_ly :: RealFloat n => FontData n -> n Source

Lowest y-value of bounding box

underlinePosition :: RealFloat n => FontData n -> n Source

Position of the underline bar

underlineThickness :: RealFloat n => FontData n -> n Source

Thickness of the underline bar

horizontalAdvance :: RealFloat n => String -> FontData n -> n Source

Horizontal advance of a character consisting of its width and spacing, extracted out of the font data

kernAdvance :: RealFloat n => String -> String -> Kern n -> Bool -> n Source

Change the horizontal advance of two consective chars (kerning)

type OutlineMap n = Map String (Path V2 n) Source

A map of unicode characters to outline paths.

type PreparedFont n = (FontData n, OutlineMap n) Source

A font including its outline map.

loadFont :: (Read n, RealFloat n) => FilePath -> IO (PreparedFont n) Source

Read font data from font file, and compute its outline map.