@@ 63,7 63,7 @@ pattern2font pat styles parent root = Font' {
height' (Just x) = fromIntegral $ HB.height x
height' Nothing = fontSize'
lineheight' | snd (cssLineheight styles) == "normal",
- Just extents <- fontHExtents font' = (fromIntegral $ lineGap extents)/scale'
+ Just extents <- fontHExtents font' = (fromIntegral $ lineGap extents)/hbUnit
| otherwise = lowerLength' (cssLineheight styles) parent
fontSize' = lowerLength' (cssFontSize styles) parent
lowerLength' a = lowerLength (fontSize parent) . finalizeLength a
@@ 75,7 75,7 @@ pattern2font pat styles parent root = Font' {
Just (font:_, _) -> fontRenderPrepare' q font
_ -> error "TODO: Set fallback font!"
font' = pattern2hbfont font (round scale') $ variations' fontSize' styles
- scale' = hbUnit -- Better way of handling this?
+ scale' = fontSize' * hbUnit
-- | Parsed CSS font properties, excluding the FontConfig query.
data CSSFont = CSSFont {