~alcinnz/CatTrap

55b1018f43f6e8e8f3be0ed947796449d766e418 — Adrian Cochrane 1 year, 6 months ago d4a87f6
Fix fontsize handling.
1 files changed, 2 insertions(+), 2 deletions(-)

M Graphics/Layout/CSS/Font.hs
M Graphics/Layout/CSS/Font.hs => Graphics/Layout/CSS/Font.hs +2 -2
@@ 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 {