sig
type library
val init : unit -> Ftlow.library
val close : Ftlow.library -> unit
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 : Ftlow.library -> string -> int -> Ftlow.face
val face_info : Ftlow.face -> Ftlow.face_info
val done_face : Ftlow.face -> unit
val get_num_glyphs : Ftlow.face -> int
val set_char_size : Ftlow.face -> int -> int -> int -> int -> unit
val set_pixel_sizes : Ftlow.face -> int -> int -> unit
type charmap = { platform_id : int; encoding_id : int; }
val get_charmaps : Ftlow.face -> Ftlow.charmap list
val set_charmap : Ftlow.face -> Ftlow.charmap -> unit
val get_char_index : Ftlow.face -> int -> int
type render_mode = Render_Normal | Render_Mono
type load_flag = Load_no_scale | Load_no_hinting
val load_glyph : Ftlow.face -> int -> Ftlow.load_flag list -> int * int
val load_char : Ftlow.face -> int -> Ftlow.load_flag list -> int * int
val render_glyph_of_face : Ftlow.face -> Ftlow.render_mode -> unit
val render_glyph :
Ftlow.face ->
int -> Ftlow.load_flag list -> Ftlow.render_mode -> int * int
val render_char :
Ftlow.face ->
int -> Ftlow.load_flag list -> Ftlow.render_mode -> int * int
val set_transform :
Ftlow.face -> int * int * int * int -> int * int -> unit
type bitmap_info = {
bitmap_left : int;
bitmap_top : int;
bitmap_width : int;
bitmap_height : int;
}
val get_bitmap_info : Ftlow.face -> Ftlow.bitmap_info
val read_bitmap : Ftlow.face -> int -> int -> int
type bbox = { xmin : int; ymin : int; xmax : int; ymax : int; }
type bearing_advance = { bearingx : int; bearingy : int; advance : int; }
type glyph_metrics = {
gm_width : int;
gm_height : int;
gm_hori : Ftlow.bearing_advance;
gm_vert : Ftlow.bearing_advance;
}
val get_glyph_metrics : Ftlow.face -> Ftlow.glyph_metrics
type size_metrics = {
x_ppem : int;
y_ppem : int;
x_scale : int;
y_scale : int;
}
val get_size_metrics : Ftlow.face -> Ftlow.size_metrics
type outline_tag = On_point | Off_point_conic | Off_point_cubic
type outline_contents = {
n_contours : int;
n_points : int;
points : (int * int) array;
tags : Ftlow.outline_tag array;
contours : int array;
}
val get_outline_contents : Ftlow.face -> Ftlow.outline_contents
end