From 7d61f16b92c0af371b08e0c97c50934bfc4b9e4b Mon Sep 17 00:00:00 2001 From: Jaro Date: Fri, 31 Mar 2023 02:36:14 +0200 Subject: [PATCH] Fix data types in harfbuzz-pure. --- balkon.cabal | 2 +- test/Data/Text/ParagraphLayout/FontLoader.hs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/balkon.cabal b/balkon.cabal index 7233ebf..9313c1e 100644 --- a/balkon.cabal +++ b/balkon.cabal @@ -148,7 +148,7 @@ library balkon-internal build-depends: base >=4.12 && < 4.16, - harfbuzz-pure >=1.0.2.0 && <1.1, + harfbuzz-pure >=1.0.3.2 && <1.1, text >=2.0.2 && <3, text-icu >=0.8.0.2 && <0.9, unicode-data-scripts >=0.2.0.1 && < 0.3 diff --git a/test/Data/Text/ParagraphLayout/FontLoader.hs b/test/Data/Text/ParagraphLayout/FontLoader.hs index 36d2958..578986a 100644 --- a/test/Data/Text/ParagraphLayout/FontLoader.hs +++ b/test/Data/Text/ParagraphLayout/FontLoader.hs @@ -8,7 +8,6 @@ module Data.Text.ParagraphLayout.FontLoader where import Data.ByteString (readFile) -import Data.Int (Int32) import Data.Text.Glyphize (Font ,FontOptions @@ -20,7 +19,7 @@ import Data.Text.Glyphize ,fontScale ) import Data.Word (Word) -import Prelude (concat, fromIntegral, return, show, ($), (++)) +import Prelude (concat, return, show, ($), (++)) import System.FilePath (FilePath, ()) import System.IO (IO, writeFile) @@ -50,8 +49,5 @@ writeFontInfo outputPath fontPath font = writeFile outputPath info info = concat [fontPath, " ", index, " ", pixelSize, " ", scale, "\n"] index = show $ faceIndex face pixelSize = let (x, y) = fontPPEm font in (show x) ++ "," ++ (show y) - scale = let (x, y) = fontScale font in (show32 x) ++ "," ++ (show32 y) - -- Workaround for: - -- https://todo.argonaut-constellation.org/~alcinnz/harfbuzz-pure/3 - show32 x = show (fromIntegral x :: Int32) + scale = let (x, y) = fontScale font in (show x) ++ "," ++ (show y) face = fontFace font -- 2.30.2