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-* 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