SVGFonts-1.5.0.1: Fonts from the SVG-Font format

Safe HaskellNone
LanguageHaskell2010

Graphics.SVGFonts.ReadFont

Synopsis

Documentation

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

Difference between highest and lowest y-value of bounding box

bbox_lx :: FontData n -> n

Lowest x-value of bounding box

bbox_ly :: FontData n -> n

Lowest y-value of bounding box

underlinePosition :: FontData n -> n

Position of the underline bar

underlineThickness :: FontData n -> n

Thickness of the underline bar

horizontalAdvance :: String -> FontData n -> n

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

Change the horizontal advance of two consective chars (kerning)

type OutlineMap n = Map String (Path V2 n)

A map of unicode characters to outline paths.

type PreparedFont n = (FontData n, OutlineMap n)

A font including its outline map.

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

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