packages feed

FontyFruity 0.5.1.1 → 0.5.2

raw patch · 4 files changed

+25/−5 lines, 4 filesdep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers

API changes (from Hackage documentation)

Files

FontyFruity.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                FontyFruity-version:             0.5.1.1+version:             0.5.2 synopsis:            A true type file format loader description:              A haskell Truetype file parser.@@ -28,7 +28,7 @@ Source-Repository this     Type:      git     Location:  https://github.com/Twinside/FontyFruity.git-    Tag:       v0.5.1.1+    Tag:       v0.5.2  library   exposed-modules: Graphics.Text.TrueType@@ -53,7 +53,7 @@   build-depends: base       >= 4.5   && < 4.9                , binary     >= 0.5                , bytestring >= 0.10-               , containers >= 0.4.2 && < 0.6+               , containers >= 0.5 && < 0.6                , vector     >= 0.9                , directory                , text
changelog view
@@ -1,5 +1,9 @@ -*-change-log-*- ++v0.5.2 August 2015+ * Fix: GHC 7.4 compilation+ v0.5.1.1 April 2015  * Fix: compilation on older compilers 
src/Graphics/Text/TrueType.hs view
@@ -317,7 +317,7 @@         (glyph, _):_ -> toPixel . _glfXMin $ _glyphHeader glyph      (width, yMini, yMaxi) =-        foldl' go (- xMini, 0, 0) glyphs+        foldl' go (0, 0, 0) glyphs      toPixel :: Integral a => a -> Float     toPixel = toPixelCoord font size dpi
src/Graphics/Text/TrueType/FontFolders.hs view
@@ -16,6 +16,15 @@ import Control.Applicative( (<*>), (<$>) ) #endif +#if !MIN_VERSION_base(4,6,0)+import Control.Monad( guard )+import Control.Exception( tryJust )+import System.IO.Error( isDoesNotExistError )+import System.Environment( getEnv )+#else+import System.Environment( lookupEnv )+#endif+ import Control.Monad( when, replicateM ) import System.Directory( getDirectoryContents                        , getHomeDirectory@@ -32,7 +41,6 @@                       , putWord32be                       , putByteString ) import qualified Data.Map.Strict as M-import System.Environment( lookupEnv ) import System.FilePath( (</>) ) {- import Text.XML.HXT.Core( runX@@ -66,6 +74,14 @@             >>> multi (isElem >>> hasName "dir" >>> getChildren >>> getText))  -- -}+#if !MIN_VERSION_base(4,6,0)+lookupEnv :: String -> IO (Maybe String)+lookupEnv varName = do+  v <- tryJust (guard . isDoesNotExistError) $ getEnv varName+  case v of+    Left _ -> return Nothing+    Right val -> return $ Just val+#endif  loadUnixFontFolderList :: IO [FilePath] loadUnixFontFolderList =