package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Font_family

type t = [ `font_family | `object_ ] Gobject.obj
val list_faces : t -> [ `font_face | `object_ ] Gobject.obj array * int

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 iface@Gio.ListModel interface for enumerating faces.

val is_variable : t -> bool

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 method@Pango.FontDescription.set_variations for more information.

val is_monospace : t -> bool

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. g_unichar_iswide() 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 method@Pango.FontMetrics.get_approximate_digit_width, since the results of method@Pango.FontMetrics.get_approximate_char_width may be affected by double-width characters.

val get_name : t -> string

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.

val get_face : t -> string option -> [ `font_face | `object_ ] Gobject.obj option

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

val get_item_type : t -> Gobject.Type.t

Get property: item-type

val get_n_items : t -> int

Get property: n-items