|
Graphics.UI.Gtk.Pango.Rendering | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
Functions to run the rendering pipeline.
- The Pango rendering pipeline takes a string of Unicode characters
and converts it into glyphs. The functions described in this module
accomplish various steps of this process.
|
|
Synopsis |
|
|
|
Documentation |
|
data PangoContext |
Instances | |
|
|
contextListFamilies :: PangoContext -> IO [FontFamily] |
Retrieve a list of all available font families.
- A font family is the name of the font without further attributes
like slant, variant or size.
|
|
contextGetMetrics :: PangoContext -> FontDescription -> Language -> IO FontMetrics |
Load a font.
contextLoadFont :: PangoContext -> FontDescription -> Language ->
IO (Maybe Font)
contextLoadFont pc fd l = do
fsPtr <- {} pc fd l
if fsPtr==nullPtr then return Nothing else
liftM Just $ makeNewGObject mkFont (return fsPtr)
Load a font set.
contextLoadFontSet :: PangoContext -> FontDescription -> Language ->
IO (Maybe FontSet)
contextLoadFontSet pc fd l = do
fsPtr <- {} pc fd l
if fsPtr==nullPtr then return Nothing else
liftM Just $ makeNewGObject mkFontSet (return fsPtr)
Query the metrics of the given font implied by the font description.
|
|
data FontMetrics |
The characteristic measurements of a font.
- All values are measured in pixels.
| Constructors | FontMetrics | | ascent :: Rational | The ascent is the distance from the baseline to the logical top
of a line of text. (The logical top may be above or below the
top of the actual drawn ink. It is necessary to lay out the
text to figure where the ink will be.)
| descent :: Rational | The descent is the distance from the baseline to the logical
bottom of a line of text. (The logical bottom may be above or
below the bottom of the actual drawn ink. It is necessary to
lay out the text to figure where the ink will be.)
| approximateCharWidth :: Rational | The approximate character width. This is merely a
representative value useful, for example, for determining the
initial size for a window. Actual characters in text will be
wider and narrower than this.
| approximateDigitWidth :: Rational | The approximate digit widt. This is merely a representative
value useful, for example, for determining the initial size for
a window. Actual digits in text can be wider and narrower than
this, though this value is generally somewhat more accurate
than approximateCharWidth.
|
|
|
|
|
contextSetFontDescription :: PangoContext -> FontDescription -> IO () |
Set the default FontDescription of this context.
|
|
contextGetFontDescription :: PangoContext -> IO FontDescription |
Get the current FontDescription of this context.
|
|
contextSetLanguage :: PangoContext -> Language -> IO () |
Set the default Language of this context.
|
|
contextGetLanguage :: PangoContext -> IO Language |
Get the current Language of this context.
|
|
contextSetTextDir :: PangoContext -> TextDirection -> IO () |
Set the default text direction of this context.
|
|
contextGetTextDir :: PangoContext -> IO TextDirection |
Get the current text direction of this context.
|
|
data TextDirection |
Is the text written from left to right or the awkward way?
| Constructors | TextDirNone | | TextDirLtr | | TextDirRtl | |
| Instances | |
|
|
Produced by Haddock version 0.7 |