bouncing-crusher
Safe HaskellNone
LanguageHaskell2010

TextSizeAnalysis

Synopsis

Documentation

characterSizes :: [(Char, Float)] #

Memorized character widths with Roman font.

defaultCharacterSize :: Float #

Character width for unrecognized characters.

fontHeight :: Float #

Character height with Roman font.

estimateTextSize :: String -> (Float, Float) #

Analyze string and return estimated width and height in pixels.

alignedCenterText :: String -> Picture #

Get picture of text with alignment in center (vertically and horizontally).

setTextSizes :: IO [(Char, Float)] #

Update character sizes for characterSizes. Returns the new version.