package ocgtk

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

Module Wrappers.Font

type t = [ `font | `object_ ] Gobject.obj
val serialize : t -> Glib_bytes.t

Serializes the @font in a way that can be uniquely identified.

There are no guarantees about the format of the output across different versions of Pango.

The intended use of this function is testing, benchmarking and debugging. The format is not meant as a permanent storage format.

To recreate a font from its serialized form, use func@Pango.Font.deserialize.

val has_char : t -> int -> bool

Returns whether the font provides a glyph for this character.

val get_metrics : t -> [ `language ] Gobject.obj option -> [ `font_metrics ] Gobject.obj

Gets overall metric information for a font.

Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.

If @font is %NULL, this function gracefully sets some sane values in the output variables and returns.

val get_font_map : t -> [ `font_map | `object_ ] Gobject.obj option

Gets the font map for which the font was created.

Note that the font maintains a *weak* reference to the font map, so if all references to font map are dropped, the font map will be finalized even if there are fonts created with the font map that are still alive. In that case this function will return %NULL.

It is the responsibility of the user to ensure that the font map is kept alive. In most uses this is not an issue as a `PangoContext` holds a reference to the font map.

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

Gets the `PangoFontFace` to which @font belongs.

val get_coverage : t -> [ `language ] Gobject.obj -> [ `coverage | `object_ ] Gobject.obj

Computes the coverage map for a given font and language tag.

val describe_with_absolute_size : t -> [ `font_description ] Gobject.obj

Returns a description of the font, with absolute font size set in device units.

Use method@Pango.Font.describe if you want the font size in points.

val describe : t -> [ `font_description ] Gobject.obj

Returns a description of the font, with font size set in points.

Use method@Pango.Font.describe_with_absolute_size if you want the font size in device units.