packages feed

pango 0.13.0.3 → 0.13.0.4

raw patch · 7 files changed

+29/−29 lines, 7 files

Files

Graphics/Rendering/Pango.chs view
@@ -26,10 +26,10 @@ -- needed, though most of the work on Pango so far has been done in the -- context of the GTK+ widget toolkit. Pango forms the core of text and font -- handling for GTK+-2.x.---  +-- -- Pango is designed to be modular; the core Pango layout engine can be used -- with different font backends. There are three basic backends:---  +-- -- * Client side fonts using the FreeType and fontconfig libraries. -- -- * Native fonts on Microsoft Windows using Uniscribe for complex-text handling.@@ -39,17 +39,17 @@ -- The integration of Pango -- with Cairo <http://cairographics.org/> provides a complete solution with -- high quality text handling and graphics rendering.---  +-- -- Dynamically loaded modules then handle text layout for particular -- combinations of script and font backend. Pango ships with a wide selection -- of modules, including modules for Hebrew, Arabic, Hangul, Thai, and a -- number of Indic scripts. Virtually all of the world's major scripts are -- supported.---  +-- -- As well as the low level layout rendering routines, Pango includes -- 'PangoLayout', a high level driver for laying out entire blocks of text, and -- routines to assist in editing internationalized text.---  +-- -- Pango depends on 2.x series of the GLib library. -- -- This module only re-exports the parts of the Pango library that are relevant for
Graphics/Rendering/Pango/Context.chs view
@@ -27,7 +27,7 @@ -- This module defines 'PangoContext's, -- an environment that provides information on available fonts, -- internationalization and output capabilities of the medium. Given--- such a context, text can be rendered into strings of glyphs (see +-- such a context, text can be rendered into strings of glyphs (see -- 'Graphics.Rendering.Pango.Rendering') or, at a more abstract level, using -- layouts (see 'Graphics.Rendering.Pango.Layout.Layout'). --@@ -153,7 +153,7 @@   makeNewFontDescription fdPtr  foreign import ccall unsafe "pango_font_description_copy"-  pango_font_description_copy :: Ptr FontDescription -> +  pango_font_description_copy :: Ptr FontDescription ->                                  IO (Ptr FontDescription)  -- | Set the default 'Language' of this context.@@ -216,7 +216,7 @@ contextGetMatrix pc = do   matPtr <- {#call unsafe context_get_matrix#} pc   if matPtr==nullPtr then return identity else peek (castPtr matPtr)-  + -- | Sets the transformation matrix that will be applied when rendering with -- this context. Note that any metrics reported by other functions are in user -- space coordinates before the application of the matrix, not device-space@@ -228,6 +228,6 @@ contextSetMatrix :: PangoContext -> Matrix -> IO () contextSetMatrix pc mat   | mat==identity = {#call unsafe context_set_matrix#} pc nullPtr-  | otherwise = with mat $ \matPtr -> +  | otherwise = with mat $ \matPtr ->                 {#call unsafe context_set_matrix#} pc (castPtr matPtr) #endif
Graphics/Rendering/Pango/Font.chs view
@@ -91,14 +91,14 @@ -- | Ask for the different font families that a particular back-end supports. -- -- * The 'FontMap' can be acquired by calling---   'Graphics.Rendering.Pango.Cairo.cairoFontMapGetDefault'. +--   'Graphics.Rendering.Pango.Cairo.cairoFontMapGetDefault'. -- pangoFontMapListFamilies :: FontMap -> IO [FontFamily] pangoFontMapListFamilies fm = alloca $ \arrPtrPtr -> alloca $ \sizePtr -> do   {#call unsafe font_map_list_families#} fm arrPtrPtr sizePtr   arrPtr <- peek arrPtrPtr   size <- peek sizePtr-  ffsPtr <- peekArray (fromIntegral size) +  ffsPtr <- peekArray (fromIntegral size) 	    (castPtr arrPtr::Ptr (Ptr FontFamily)) -- c2hs is wrong here   {#call unsafe g_free#} (castPtr arrPtr)   mapM (makeNewGObject mkFontFamily . return . castPtr) ffsPtr@@ -137,7 +137,7 @@   {#call unsafe font_family_list_faces#} ff arrPtrPtr sizePtr   arrPtr <- peek arrPtrPtr   size <- peek sizePtr-  ffsPtr <- peekArray (fromIntegral size) +  ffsPtr <- peekArray (fromIntegral size) 	    (castPtr arrPtr::Ptr (Ptr FontFace)) -- c2hs is wrong here   {#call unsafe g_free#} (castPtr arrPtr)   mapM (makeNewGObject mkFontFace . return . castPtr) ffsPtr
Graphics/Rendering/Pango/GlyphStorage.chs view
@@ -27,8 +27,8 @@ -- Stability   : provisional -- Portability : portable (depends on GHC) -----  --+-- module Graphics.Rendering.Pango.GlyphStorage (   glyphItemExtents,   glyphItemExtentsRange,@@ -76,7 +76,7 @@ --   the result of this function is the same as if 'glyphItemExtents' --   were called on the sub-string. ---glyphItemExtentsRange :: GlyphItem -> Int -> Int -> +glyphItemExtentsRange :: GlyphItem -> Int -> Int ->                            IO (PangoRectangle, PangoRectangle)  glyphItemExtentsRange (GlyphItem pi@(PangoItem (PangoString uc _ _) _) self)@@ -97,14 +97,14 @@ -- glyphItemIndexToX :: GlyphItem -- ^ the rendered string                     -> Int -- ^ the index into the string-                    -> Bool -- ^ return the beginning (@False@) or the end +                    -> Bool -- ^ return the beginning (@False@) or the end                             -- of the character                     -> IO Double glyphItemIndexToX (GlyphItem (PangoItem ps pir) gs) pos beg =-  withPangoItemRaw pir $ \pirPtr -> alloca $ \intPtr -> +  withPangoItemRaw pir $ \pirPtr -> alloca $ \intPtr ->   withPangoString ps $ \uc l strPtr -> do     {# call unsafe glyph_string_index_to_x #} gs strPtr-      (fromIntegral l) (pangoItemRawAnalysis pirPtr) +      (fromIntegral l) (pangoItemRawAnalysis pirPtr)       (fromIntegral (ofsToUTF pos uc)) (fromBool beg) intPtr     liftM intToPu $ peek intPtr @@ -118,7 +118,7 @@ -- glyphItemXToIndex :: GlyphItem -> Double -> IO (Int, Bool) glyphItemXToIndex (GlyphItem (PangoItem ps pir) gs) pos =-  withPangoItemRaw pir $ \pirPtr -> alloca $ \intPtr -> +  withPangoItemRaw pir $ \pirPtr -> alloca $ \intPtr ->   alloca $ \boolPtr -> withPangoString ps $ \uc l strPtr -> do     {# call unsafe pango_glyph_string_x_to_index #} gs strPtr       (fromIntegral l) (pangoItemRawAnalysis pirPtr) (puToInt pos)@@ -171,7 +171,7 @@     giPtr2 <- withPangoString ps $ \uc l strPtr ->       {#call unsafe pango_glyph_item_split#} giPtr1 strPtr         (fromIntegral (ofsToUTF pos uc))-    if giPtr2==nullPtr then +    if giPtr2==nullPtr then        throwIO (IndexOutOfBounds          ("Graphics.Rendering.Pango.GlyphStorage."++           "glyphItemSplit: cannot split item at index "++show pos)) else do
Graphics/Rendering/Pango/Types.chs view
@@ -37,31 +37,31 @@    module System.Glib.GObject,   PangoContext(PangoContext), PangoContextClass,-  toPangoContext, +  toPangoContext,   mkPangoContext, unPangoContext,   castToPangoContext, gTypePangoContext,   PangoLayoutRaw(PangoLayoutRaw), PangoLayoutRawClass,-  toPangoLayoutRaw, +  toPangoLayoutRaw,   mkPangoLayoutRaw, unPangoLayoutRaw,   castToPangoLayoutRaw, gTypePangoLayoutRaw,   Font(Font), FontClass,-  toFont, +  toFont,   mkFont, unFont,   castToFont, gTypeFont,   FontFamily(FontFamily), FontFamilyClass,-  toFontFamily, +  toFontFamily,   mkFontFamily, unFontFamily,   castToFontFamily, gTypeFontFamily,   FontFace(FontFace), FontFaceClass,-  toFontFace, +  toFontFace,   mkFontFace, unFontFace,   castToFontFace, gTypeFontFace,   FontMap(FontMap), FontMapClass,-  toFontMap, +  toFontMap,   mkFontMap, unFontMap,   castToFontMap, gTypeFontMap,   FontSet(FontSet), FontSetClass,-  toFontSet, +  toFontSet,   mkFontSet, unFontSet,   castToFontSet, gTypeFontSet   ) where
Gtk2HsSetup.hs view
@@ -129,7 +129,7 @@             Just ('.':_)                -> True             Just ('-':n:_) | isNumber n -> True             _                           -> False-        + -- The following code is a big copy-and-paste job from the sources of -- Cabal 1.8 just to be able to fix a field in the package file. Yuck. 
pango.cabal view
@@ -1,5 +1,5 @@ Name:           pango-Version:        0.13.0.3+Version:        0.13.0.4 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -52,7 +52,7 @@         else           build-depends:  base < 4 -        build-tools:    gtk2hsC2hs >= 0.13.11, gtk2hsTypeGen+        build-tools:    gtk2hsC2hs >= 0.13.12, gtk2hsTypeGen          exposed-modules: Graphics.Rendering.Pango                          Graphics.Rendering.Pango.Font