summaryrefslogtreecommitdiff
path: root/src/cairo_ft.mli
blob: f6eef0a3edc1193146543b1c7ec0bf43d3d7c4d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(** Minimal support for the Fontconfig/Freetype font interface *)

exception FT_Error of int

type ft_library
type ft_face

val init_freetype : unit -> ft_library
external done_freetype : ft_library -> unit = "ml_FT_Done_FreeType"

external new_face : ft_library -> ?index:int -> string -> ft_face
  = "ml_FT_New_Face"
external done_face : ft_face -> unit = "ml_FT_Done_Face"

type fc_pattern
external fc_name_parse : string -> fc_pattern = "ml_FcNameParse"
external fc_name_unparse : fc_pattern -> string = "ml_FcNameUnparse"

external font_create : ft_library -> fc_pattern -> Cairo.font
  = "ml_cairo_ft_font_create"
external font_create_for_ft_face : ft_face -> Cairo.font
  = "ml_cairo_ft_font_create_for_ft_face"
external font_pattern : Cairo.font -> fc_pattern = "ml_cairo_ft_font_pattern"