Created
February 2, 2014 01:29
-
-
Save jonashaag/8761779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Diagrams/Backend/Cairo/Internal.hs b/src/Diagrams/Backend/Cairo/Internal.hs | |
index d1de7ef..671f1ae 100644 | |
--- a/src/Diagrams/Backend/Cairo/Internal.hs | |
+++ b/src/Diagrams/Backend/Cairo/Internal.hs | |
@@ -8,6 +8,7 @@ | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE ViewPatterns #-} | |
+{-# LANGUAGE StandaloneDeriving #-} | |
----------------------------------------------------------------------------- | |
-- | | |
@@ -381,6 +382,9 @@ instance Renderable Text Cairo where | |
(refX, refY) <- case al of | |
BoxAlignedText xt yt -> do | |
tExt <- C.textExtents str | |
+ tExt' <- C.textExtents (str++"A") | |
+ liftIO $ print tExt | |
+ liftIO $ print tExt' | |
fExt <- C.fontExtents | |
let l = C.textExtentsXbearing tExt | |
r = C.textExtentsXadvance tExt | |
@@ -392,3 +396,6 @@ instance Renderable Text Cairo where | |
C.showText str | |
C.newPath | |
restore | |
+ | |
+ | |
+deriving instance Show C.TextExtents |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment