sig
type t
val init : unit -> Freetype.t
type face
type face_info = {
num_faces : int;
num_glyphs : int;
family_name : string;
style_name : string;
has_horizontal : bool;
has_vertical : bool;
has_kerning : bool;
is_scalable : bool;
is_sfnt : bool;
is_fixed_width : bool;
has_fixed_sizes : bool;
has_fast_glyphs : bool;
has_glyph_names : bool;
has_multiple_masters : bool;
}
val new_face :
Freetype.t -> string -> int -> Freetype.face * Freetype.face_info
val get_num_glyphs : Freetype.face -> int
val set_char_size : Freetype.face -> float -> float -> int -> int -> unit
val set_pixel_sizes : Freetype.face -> int -> int -> unit
type charmap = { platform_id : int; encoding_id : int; }
type char_index
val int_of_char_index : Freetype.char_index -> int
val char_index_of_int : int -> Freetype.char_index
val get_charmaps : Freetype.face -> Freetype.charmap list
val set_charmap : Freetype.face -> Freetype.charmap -> unit
val get_char_index : Freetype.face -> int -> Freetype.char_index
type render_mode = Render_Normal | Render_Mono
type load_flag = Load_no_scale | Load_no_hinting
val load_glyph :
Freetype.face ->
Freetype.char_index -> Freetype.load_flag list -> float * float
val load_char :
Freetype.face -> int -> Freetype.load_flag list -> float * float
val render_glyph_of_face : Freetype.face -> Freetype.render_mode -> unit
val render_glyph :
Freetype.face ->
Freetype.char_index ->
Freetype.load_flag list -> Freetype.render_mode -> float * float
val render_char :
Freetype.face ->
int -> Freetype.load_flag list -> Freetype.render_mode -> float * float
type matrix = {
ft_xx : float;
ft_xy : float;
ft_yx : float;
ft_yy : float;
}
type vector = { ft_x : float; ft_y : float; }
val set_transform :
Freetype.face -> Freetype.matrix -> Freetype.vector -> unit
val matrix_rotate : float -> Freetype.matrix
type bitmap_info = {
bitmap_left : int;
bitmap_top : int;
bitmap_width : int;
bitmap_height : int;
}
val get_bitmap_info : Freetype.face -> Freetype.bitmap_info
val read_bitmap : Freetype.face -> int -> int -> int
type bbox = { xmin : float; ymin : float; xmax : float; ymax : float; }
type bearing_advance = {
bearingx : float;
bearingy : float;
advance : float;
}
type glyph_metrics = {
gm_width : float;
gm_height : float;
gm_hori : Freetype.bearing_advance;
gm_vert : Freetype.bearing_advance;
}
val get_glyph_metrics : Freetype.face -> Freetype.glyph_metrics
type size_metrics = {
x_ppem : int;
y_ppem : int;
x_scale : float;
y_scale : float;
}
val get_size_metrics : Freetype.face -> Freetype.size_metrics
type outline_tag = On_point | Off_point_conic | Off_point_cubic
type outline_contents = {
n_contours : int;
n_points : int;
points : (float * float) array;
tags : Freetype.outline_tag array;
contours : int array;
}
val get_outline_contents : Freetype.face -> Freetype.outline_contents
end