From f68556183c80c7ae18c8c583ebcaaf7b2c151f28 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 15 Mar 2023 17:29:17 +1300 Subject: [PATCH] Enforce harfbuzz scaling to be of Double type. --- Graphics/Layout/CSS/Internal.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Graphics/Layout/CSS/Internal.hs b/Graphics/Layout/CSS/Internal.hs index b61f660..1dd0a14 100644 --- a/Graphics/Layout/CSS/Internal.hs +++ b/Graphics/Layout/CSS/Internal.hs @@ -84,8 +84,9 @@ data Font' = Font' { scale :: Double } placeholderFont = Font' undefined [] (const 0) (const 0) 0 0 0 0 0 0 0 0 1 +hbScale :: Font' -> Double hbScale f = fontSize f*hbUnit -hbUnit = 64 +hbUnit = 64 :: Double pattern2hbfont :: Pattern -> Int -> [Variation] -> Font pattern2hbfont pat scale variations = createFontWithOptions options face -- 2.30.2