Safe Haskell | None |
---|---|
Language | Haskell2010 |
TextSizeAnalysis
Synopsis
- characterSizes :: [(Char, Float)]
- defaultCharacterSize :: Float
- fontHeight :: Float
- estimateTextSize :: String -> (Float, Float)
- alignedCenterText :: String -> Picture
- setTextSizes :: IO [(Char, Float)]
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.