From 5df992eaaa44bc5660c49ec47c1398dedf111d47 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 3 Feb 2023 10:48:40 +1300 Subject: [PATCH] Propagate bugfixes to Harfbuzz-Pure. --- src/Typograffiti/Store.hs | 6 ------ src/Typograffiti/Text.hs | 1 - typograffiti.cabal | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Typograffiti/Store.hs b/src/Typograffiti/Store.hs index da15980..d296ef0 100644 --- a/src/Typograffiti/Store.hs +++ b/src/Typograffiti/Store.hs @@ -40,12 +40,6 @@ import Typograffiti.Cache import Typograffiti.Text (GlyphSize(..), drawLinesWrapper, SampleText(..)) import Typograffiti.Rich (RichText(..)) --- Since HarfBuzz language bindings neglected to declare these itself. -deriving instance Eq HB.Variation -deriving instance Ord HB.Variation -deriving instance Eq FontOptions -deriving instance Ord FontOptions - -- | Stored fonts at specific sizes. data FontStore n = FontStore { fontMap :: TMVar (Map (FilePath, GlyphSize, Int, FontOptions) Font), diff --git a/src/Typograffiti/Text.hs b/src/Typograffiti/Text.hs index fd2ce5e..2454c84 100644 --- a/src/Typograffiti/Text.hs +++ b/src/Typograffiti/Text.hs @@ -199,7 +199,6 @@ drawLinesWrapper indent lineheight cb RichText {..} = do splitFeatures (offset + toEnum n) features' lines' processLine :: Text -> Text - processLine "" = " " -- Prevent Harfbuzz from throwing errors. processLine cs = expandTabs 0 cs -- monospace tabshaping, good enough outside full line-layout. expandTabs n cs = case Txt.break (== '\t') cs of diff --git a/typograffiti.cabal b/typograffiti.cabal index 3b4bcb6..5014997 100644 --- a/typograffiti.cabal +++ b/typograffiti.cabal @@ -35,7 +35,7 @@ library Typograffiti.Rich build-depends: base >=4.12 && <4.13, linear>=1.20, containers >= 0.6, freetype2 >= 0.2, gl >= 0.8, mtl >= 2.2, stm >= 2.5, text, - vector >= 0.12, harfbuzz-pure >= 1.0.1, bytestring >= 0.10 + vector >= 0.12, harfbuzz-pure >= 1.0.2, bytestring >= 0.10 hs-source-dirs: src default-language: Haskell2010 -- 2.30.2