~jaro/balkon

7d61f16b92c0af371b08e0c97c50934bfc4b9e4b — Jaro 1 year, 1 month ago e810016
Fix data types in harfbuzz-pure.
2 files changed, 3 insertions(+), 7 deletions(-)

M balkon.cabal
M test/Data/Text/ParagraphLayout/FontLoader.hs
M balkon.cabal => balkon.cabal +1 -1
@@ 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

M test/Data/Text/ParagraphLayout/FontLoader.hs => test/Data/Text/ParagraphLayout/FontLoader.hs +2 -6
@@ 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