gi-pango-1.0.29: Pango bindings

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

GI.Pango.Objects.FontFace

Contents

- Exported types
- Methods
  - describe
  - getFaceName
  - getFamily
  - isSynthesized
  - listSizes

Description

A `PangoFontFace` is used to represent a group of fonts with the same family, slant, weight, and width, but varying sizes.

Synopsis

- newtype FontFace = FontFace (ManagedPtr FontFace)
- class (GObject o, IsDescendantOf FontFace o) => IsFontFace o
- toFontFace :: (MonadIO m, IsFontFace o) => o -> m FontFace
- fontFaceDescribe :: (HasCallStack, MonadIO m, IsFontFace a) => a -> m FontDescription
- fontFaceGetFaceName :: (HasCallStack, MonadIO m, IsFontFace a) => a -> m Text
- fontFaceGetFamily :: (HasCallStack, MonadIO m, IsFontFace a) => a -> m FontFamily
- fontFaceIsSynthesized :: (HasCallStack, MonadIO m, IsFontFace a) => a -> m Bool
- fontFaceListSizes :: (HasCallStack, MonadIO m, IsFontFace a) => a -> m (Maybe [Int32])

# Exported types

newtype FontFace Source #

Memory-managed wrapper type.

Constructors

FontFace (ManagedPtr FontFace) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf FontFace o) => IsFontFace o Source #

Type class for types which can be safely cast to `FontFace`, for instance with `toFontFace`.

#### Instances

Instances details

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

toFontFace :: (MonadIO m, IsFontFace o) => o -> m FontFace Source #

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

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, describe, forceFloating, freezeNotify, getv, isFloating, isSynthesized, listSizes, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getFaceName, getFamily, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## describe

fontFaceDescribe Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFace a) |
=> a | `face`: a `PangoFontFace`
-> m FontDescription | Returns: a newly-created `PangoFontDescription` structure holding the description of the face. Use `fontDescriptionFree` to free the result.

Returns a font description that matches the face.

The resulting font description will have the family, style, variant, weight and stretch of the face, but its size field will be unset.

## getFaceName

fontFaceGetFaceName Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFace a) |
=> a | `face`: a `PangoFontFace`.
-> m Text | Returns: the face name for the face. This string is owned by the face object and must not be modified or freed.

Gets a name representing the style of this face.

Note that a font family may contain multiple faces with the same name (e.g. a variable and a non-variable face for the same style).

## getFamily

fontFaceGetFamily Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFace a) |
=> a | `face`: a `PangoFontFace`
-> m FontFamily | Returns: the `PangoFontFamily`

Gets the `PangoFontFamily` that `face` belongs to.

Since: 1.46

## isSynthesized

fontFaceIsSynthesized Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFace a) |
=> a | `face`: a `PangoFontFace`
-> m Bool | Returns: whether `face` is synthesized

Returns whether a `PangoFontFace` is synthesized.

This will be the case if the underlying font rendering engine creates this face from another face, by shearing, emboldening, lightening or modifying it in some other way.

Since: 1.18

## listSizes

fontFaceListSizes Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFace a) |
=> a | `face`: a `PangoFontFace`.
-> m (Maybe [Int32]) |

List the available sizes for a font.

This is only applicable to bitmap fonts. For scalable fonts, stores `Nothing` at the location pointed to by `sizes` and 0 at the location pointed to by `nSizes`. The sizes returned are in Pango units and are sorted in ascending order.

Since: 1.4