package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.pangocairo/Ocgtk_pangocairo/PangoCairo/Wrappers/Font_map/index.html

Module Wrappers.Font_map

type t = [ `font_map ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val set_resolution : t -> float -> unit

Sets the resolution for the fontmap.

This is a scale factor between points specified in a `PangoFontDescription` and Cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

val set_default : t -> unit

Sets a default `PangoCairoFontMap` to use with Cairo.

This can be used to change the Cairo font backend that the default fontmap uses for example. The old default font map is unreffed and the new font map referenced.

Note that since Pango 1.32.6, the default fontmap is per-thread. This function only changes the default fontmap for the current thread. Default fontmaps of existing threads are not changed. Default fontmaps of any new threads will still be created using func@PangoCairo.FontMap.new.

A value of %NULL for @fontmap will cause the current default font map to be released and a new default font map to be created on demand, using func@PangoCairo.FontMap.new.

val get_resolution : t -> float

Gets the resolution for the fontmap.

See method@PangoCairo.FontMap.set_resolution.

val get_font_type : t -> Ocgtk_cairo.Cairo.fonttype

Gets the type of Cairo font backend that @fontmap uses.