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.FontFamily
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]
Exported types
newtype FontFamily Source #
Memory-managed wrapper type.
Constructors
FontFamily (ManagedPtr FontFamily) |
Instances
Eq FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily | |
GObject FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily | |
ManagedPtrNewtype FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily Methods toManagedPtr :: FontFamily -> ManagedPtr FontFamily | |
TypedObject FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily Methods glibType :: IO GType | |
HasParentTypes FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily | |
IsGValue (Maybe FontFamily) Source # | Convert |
Defined in GI.Pango.Objects.FontFamily Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe FontFamily -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe FontFamily) | |
type ParentTypes FontFamily Source # | |
Defined in GI.Pango.Objects.FontFamily type ParentTypes FontFamily = '[Object] |
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
(GObject o, IsDescendantOf FontFamily o) => IsFontFamily o Source # | |
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
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isMonospace, isVariable, listFaces, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getFace, getName, getProperty, getQdata.
Setters
getFace
Arguments
:: (HasCallStack, MonadIO m, IsFontFamily a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe FontFace) | Returns: the |
Gets the PangoFontFace
of family
with the given name.
Since: 1.46
getName
Arguments
:: (HasCallStack, MonadIO m, IsFontFamily a) | |
=> a |
|
-> 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 |
|
-> m Bool | Returns: |
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
[methodpango
.FontMetrics.get_approximate_digit_width], since the
results of [methodpango
.FontMetrics.get_approximate_char_width] may
be affected by double-width characters.
Since: 1.4
isVariable
Arguments
:: (HasCallStack, MonadIO m, IsFontFamily a) | |
=> a |
|
-> m Bool | Returns: |
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
[methodpango
.FontDescription.set_variations] for more information.
Since: 1.44
listFaces
Arguments
:: (HasCallStack, MonadIO m, IsFontFamily a) | |
=> a |
|
-> 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.