Safe Haskell | None |
---|---|
Language | Haskell2010 |
Infrastructure for parsing & desugaring CSS properties related to fonts.
Synopsis
- data Font' = Font' {
- hbFont :: Font
- pattern :: Pattern
- fontHeight :: Char -> Double
- fontAdvance :: Char -> Double
- fontSize :: Double
- rootEm :: Double
- lineheight :: Double
- rlh :: Double
- vh :: Double
- vw :: Double
- vmax :: Double
- vmin :: Double
- scale :: Double
- placeholderFont :: Font'
- hbUnit :: Double
- pattern2hbfont :: Pattern -> Int -> [Variation] -> Font
- pattern2font :: Pattern -> CSSFont -> Font' -> Font' -> Font'
- data CSSFont = CSSFont {
- cssFontSize :: Unitted
- cssLineheight :: Unitted
- variations :: [Variation]
- weightVariation :: Variation
- widthVariation :: Variation
- slantVariation :: Variation
- opticalSize :: Bool
- variations' :: Double -> CSSFont -> [Variation]
Documentation
A Harfbuzz font with sizing parameters.
Font' | |
|
placeholderFont :: Font' Source #
zero'd Font
` to serve as the root's parent in a font heirarchy.
pattern2hbfont :: Pattern -> Int -> [Variation] -> Font Source #
Convert from FontConfig query result to a Harfbuzz font.
pattern2font :: Pattern -> CSSFont -> Font' -> Font' -> Font' Source #
Convert Parsed CSS to a Font
`.
Includes sizing parameters derived from a root & parent Font
`.
Parsed CSS font properties, excluding the FontConfig query.
CSSFont | |
|
Instances
PropertyParser CSSFont Source # | |
variations' :: Double -> CSSFont -> [Variation] Source #
All font-variations from the parsed CSS properties. | Requires the resolved font-size in case font-optical-sizing is set.