Module Cairo.Ft

A minimal Interface to FreeType/Fontconfig. Functions in this module will raie Unavailable if Cairo has not been compiled with FreeType support (and fonconfig is available). This module is not thread safe.

type face

A FreeType face.

type library

A FreeType library value.

val init_freetype : unit -> library

init_freetype() Initialize a new FreeType library value. In multi-threaded applications it is recommended to use a different library value for each thread.

val face : ?library:library -> ?index:int -> string -> face

face pathname open the face contained in the pathname.

  • parameter index

    See the documentation for face_index.

  • parameter library

    Use the provided library as the "root" of the font.

type flag = [
  1. | `Vertical_layout
  2. | `Force_autohint
]
val create_for_ft_face : ?flags:flag list -> face -> [ `Ft ] Font_face.t

create_for_ft_face face create a new font face for the FreeType font backend from a FreeType face.

val create_for_pattern : ?options:Font_options.t -> string -> [ `Ft ] Font_face.t

create_for_pattern pattern creates a new font face for the FreeType font backend based on a fontconfig pattern (in text form).

val scaled_font_lock_face : [ `Ft ] Scaled_font.t -> face
val scaled_font_unlock_face : [ `Ft ] Scaled_font.t -> unit

scaled_font_unlock_face font releases a face obtained with scaled_font_lock_face.

module Synthesize : sig ... end