gi-pango-1.0.30: 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.FontFamily

Contents

- Exported types
- Methods
  - getFace
  - getName
  - isMonospace
  - isVariable
  - listFaces
- Properties
  - isMonospace
  - isVariable
  - itemType
  - nItems
  - name

Description

A `PangoFontFamily` is used to represent a family of related font faces.

The font faces in a family share a common design, but differ in slant, weight, width or other aspects.

Synopsis

- newtype FontFamily = FontFamily (ManagedPtr FontFamily)
- class (GObject o, IsDescendantOf FontFamily o) => IsFontFamily o
- toFontFamily :: (MonadIO m, IsFontFamily o) => o -> m FontFamily
- fontFamilyGetFace :: (HasCallStack, MonadIO m, IsFontFamily a) => a -> Maybe Text -> m (Maybe FontFace)
- fontFamilyGetName :: (HasCallStack, MonadIO m, IsFontFamily a) => a -> m Text
- fontFamilyIsMonospace :: (HasCallStack, MonadIO m, IsFontFamily a) => a -> m Bool
- fontFamilyIsVariable :: (HasCallStack, MonadIO m, IsFontFamily a) => a -> m Bool
- fontFamilyListFaces :: (HasCallStack, MonadIO m, IsFontFamily a) => a -> m [FontFace]
- getFontFamilyIsMonospace :: (MonadIO m, IsFontFamily o) => o -> m Bool
- getFontFamilyIsVariable :: (MonadIO m, IsFontFamily o) => o -> m Bool
- getFontFamilyItemType :: (MonadIO m, IsFontFamily o) => o -> m GType
- getFontFamilyNItems :: (MonadIO m, IsFontFamily o) => o -> m Word32
- getFontFamilyName :: (MonadIO m, IsFontFamily o) => o -> m Text

# Exported types

newtype FontFamily Source #

Memory-managed wrapper type.

Constructors

FontFamily (ManagedPtr FontFamily) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf FontFamily o) => IsFontFamily o Source #

Type class for types which can be safely cast to `FontFamily`, for instance with `toFontFamily`.

#### Instances

Instances details

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

toFontFamily :: (MonadIO m, IsFontFamily o) => o -> m FontFamily Source #

Cast to `FontFamily`, 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, forceFloating, freezeNotify, getv, isFloating, isMonospace, isVariable, itemsChanged, listFaces, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getFace, getItem, getItemType, getNItems, getName, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getFace

fontFamilyGetFace Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFamily a) |
=> a | `family`: a `PangoFontFamily`
-> Maybe Text | `name`: the name of a face. If the name is `Nothing`, the family's default face (fontconfig calls it "Regular") will be returned.
-> m (Maybe FontFace) | Returns: the `PangoFontFace`, or `Nothing` if no face with the given name exists.

Gets the `PangoFontFace` of `family` with the given name.

Since: 1.46

## getName

fontFamilyGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFamily a) |
=> a | `family`: a `PangoFontFamily`
-> m Text | Returns: the name of the family. This string is owned by the family object and must not be modified or freed.

Gets the name of the family.

The name is unique among all fonts for the font backend and can be used in a `PangoFontDescription` to specify that a face from this family is desired.

## isMonospace

fontFamilyIsMonospace Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFamily a) |
=> a | `family`: a `PangoFontFamily`
-> m Bool | Returns: `True` if the family is monospace.

A monospace font is a font designed for text display where the the characters form a regular grid.

For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells. `unicharIswide` returns a result that indicates whether a character is typically double-width in a monospace font.

The best way to find out the grid-cell size is to call `fontMetricsGetApproximateDigitWidth`, since the results of `fontMetricsGetApproximateCharWidth` may be affected by double-width characters.

Since: 1.4

## isVariable

fontFamilyIsVariable Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFamily a) |
=> a | `family`: a `PangoFontFamily`
-> m Bool | Returns: `True` if the family is variable

A variable font is a font which has axes that can be modified to produce different faces.

Such axes are also known as _variations_; see `fontDescriptionSetVariations` for more information.

Since: 1.44

## listFaces

fontFamilyListFaces Source #

Arguments

:: (HasCallStack, MonadIO m, IsFontFamily a) |
=> a | `family`: a `PangoFontFamily`
-> m [FontFace] |

Lists the different font faces that make up `family`.

The faces in a family share a common design, but differ in slant, weight, width and other aspects.

Note that the returned faces are not in any particular order, and multiple faces may have the same name or characteristics.

`PangoFontFamily` also implemented the `ListModel` interface for enumerating faces.

# Properties

## isMonospace

Is this a monospace font

Since: 1.52

getFontFamilyIsMonospace :: (MonadIO m, IsFontFamily o) => o -> m Bool Source #

Get the value of the “`is-monospace`” property. When overloading is enabled, this is equivalent to

    get fontFamily #isMonospace

## isVariable

Is this a variable font

Since: 1.52

getFontFamilyIsVariable :: (MonadIO m, IsFontFamily o) => o -> m Bool Source #

Get the value of the “`is-variable`” property. When overloading is enabled, this is equivalent to

    get fontFamily #isVariable

## itemType

The type of items contained in this list.

getFontFamilyItemType :: (MonadIO m, IsFontFamily o) => o -> m GType Source #

Get the value of the “`item-type`” property. When overloading is enabled, this is equivalent to

    get fontFamily #itemType

## nItems

The number of items contained in this list.

getFontFamilyNItems :: (MonadIO m, IsFontFamily o) => o -> m Word32 Source #

Get the value of the “`n-items`” property. When overloading is enabled, this is equivalent to

    get fontFamily #nItems

## name

The name of the family

Since: 1.52

getFontFamilyName :: (MonadIO m, IsFontFamily o) => o -> m Text Source #

Get the value of the “`name`” property. When overloading is enabled, this is equivalent to

    get fontFamily #name