From c207929bd72f17287910ba5e02403fbbf9c39700 Mon Sep 17 00:00:00 2001 From: Zachary Churchill Date: Wed, 6 Apr 2022 22:01:58 -0400 Subject: [PATCH 1/2] filter non-ttf fonts --- src/Graphics/Text/TrueType/FontFolders.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Graphics/Text/TrueType/FontFolders.hs b/src/Graphics/Text/TrueType/FontFolders.hs index 243a139..9468a27 100644 --- a/src/Graphics/Text/TrueType/FontFolders.hs +++ b/src/Graphics/Text/TrueType/FontFolders.hs @@ -60,6 +60,7 @@ import Graphics.Text.TrueType.Header import Graphics.Text.TrueType.Name import Control.DeepSeq (($!!)) +import Data.List catchAny :: IO a -> (E.SomeException -> IO a) -> IO a catchAny = E.catch @@ -200,7 +201,7 @@ buildFontCache loader = do <*> build rest else do isFile <- doesFileExist n - if isFile then do + if isFile && (".ttf" `isSuffixOf` n) then do f <- loader n case f of Nothing -> build rest From 0593d826d8aa36e4fe7e7b6188f9b872ce917cb1 Mon Sep 17 00:00:00 2001 From: Zachary Churchill Date: Wed, 6 Apr 2022 22:02:13 -0400 Subject: [PATCH 2/2] update gitignore --- .gitignore | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bb092d9..26992e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,25 @@ -dist -.cabal-sandbox -*.swp +*.aux +*.chi +*.chs.h +*.dyn_hi +*.dyn_o +*.eventlog +*.hi +*.hie +*.hp +*.o +*.prof *.swo +*.swp +.HTF/ +.cabal-sandbox/ +.ghc.environment.* +.hpc +.hsenv +.stack-work/ +cabal-dev +cabal.project.local +cabal.project.local~ +cabal.sandbox.config +dist +dist-*