FontyFruity-0.1.0.4: A true type file format loader

Safe HaskellNone

Graphics.Text.TrueType

Contents

Description

Module in charge of loading fonts.

Synopsis

Functions

decodeFont :: ByteString -> Either String FontSource

Decode a in-memory true type file.

loadFontFile :: FilePath -> IO (Either String Font)Source

Load a font file, the file path must be pointing to the true type file (.ttf)

getStringCurveAtPointSource

Arguments

:: Dpi

Dot per inch of the output.

-> (Float, Float)

Initial position of the baseline.

-> [(Font, PointSize, String)]

Text to draw

-> [[Vector (Float, Float)]]

List of contours for each char

Extract a list of outlines for every char in the string. The given curves are in an image like coordinate system, with the origin point in the upper left corner.

Types

data Font Source

Type representing a font.

type Dpi = IntSource

Express device resolution in dot per inch.

type PointSize = IntSource

Font size expressed in points.