gi-pango-1.0.23: Pango bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Pango.Objects.Fontset

Contents

- Exported types
- Methods
  - Overloaded methods
  - foreach
  - getFont
  - getMetrics

Description

A `Fontset` represents a set of `Font` to use when rendering text. It is the result of resolving a `FontDescription` against a particular `Context`. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset.

Synopsis

- newtype Fontset = Fontset (ManagedPtr Fontset)
- class (GObject o, IsDescendantOf Fontset o) => IsFontset o
- toFontset :: (MonadIO m, IsFontset o) => o -> m Fontset
- fontsetForeach :: (HasCallStack, MonadIO m, IsFontset a) => a -> FontsetForeachFunc -> m ()
- fontsetGetFont :: (HasCallStack, MonadIO m, IsFontset a) => a -> Word32 -> m Font
- fontsetGetMetrics :: (HasCallStack, MonadIO m, IsFontset a) => a -> m FontMetrics

# Exported types

newtype Fontset Source #

Memory-managed wrapper type.

Constructors

Fontset (ManagedPtr Fontset) |

#### Instances

Instances details

Eq Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset Methods (==) :: Fontset -> Fontset -> Bool # (/=) :: Fontset -> Fontset -> Bool #
GObject Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset
TypedObject Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset Methods glibType :: IO GType Source #
ManagedPtrNewtype Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset Methods toManagedPtr :: Fontset -> ManagedPtr Fontset Source #
IsGValue Fontset Source # | Convert `Fontset` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Pango.Objects.Fontset Methods toGValue :: Fontset -> IO GValue Source # fromGValue :: GValue -> IO Fontset Source #
HasParentTypes Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset
type ParentTypes Fontset Source # |
Instance details Defined in GI.Pango.Objects.Fontset type ParentTypes Fontset = '[Object]

class (GObject o, IsDescendantOf Fontset o) => IsFontset o Source #

Type class for types which can be safely cast to `Fontset`, for instance with `toFontset`.

#### Instances

Instances details

(GObject o, IsDescendantOf Fontset o) => IsFontset o Source # |
Instance details Defined in GI.Pango.Objects.Fontset

toFontset :: (MonadIO m, IsFontset o) => o -> m Fontset Source #

Cast to `Fontset`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

## Overloaded methods

## foreach

fontsetForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontset a) |
=> a | `fontset`: a `Fontset`
-> FontsetForeachFunc | `func`: Callback function
-> m () |

Iterates through all the fonts in a fontset, calling `func` for each one. If `func` returns `True`, that stops the iteration.

Since: 1.4

## getFont

fontsetGetFont Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontset a) |
=> a | `fontset`: a `Fontset`
-> Word32 | `wc`: a Unicode character
-> m Font | Returns: a `Font`. The caller must call g_object_unref when finished with the font.

Returns the font in the fontset that contains the best glyph for the Unicode character `wc`.

## getMetrics

fontsetGetMetrics Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontset a) |
=> a | `fontset`: a `Fontset`
-> m FontMetrics | Returns: a `FontMetrics` object. The caller must call `fontMetricsUnref` when finished using the object.

Get overall metric information for the fonts in the fontset.