type ('a, 'b) refbox = { cont : 'a; ref : 'b ref; }
val float_of_intfrac : int -> int -> float
val intfrac_of_float : int -> float -> int
val intfrac6_of_float : float -> int
val float_of_intfrac6 : int -> float
val intfrac16_of_float : float -> int
val float_of_intfrac16 : int -> float
module Freetype1 : sig
type bbox = { xmin : float; ymin : float; xmax : float; ymax : float; }
and small_glyph_metrics = {
small_bbox : bbox;
small_bearingx : float;
small_bearingy : float;
small_advance : float;
}
and bearing_advance = {
bearingx : float;
bearingy : float;
advance : float;
}
and glyph_metrics = {
bbox : bbox;
hori : bearing_advance;
vert : bearing_advance;
}
and engine = (Ftlow.engine, unit) refbox
val init : unit -> (Ftlow.engine, unit) refbox
type face = (Ftlow.face, engine) refbox
and face_properties =
Ftlow.face_properties = {
num_glyphs : int;
num_max_points : int;
num_max_contours : int;
num_charmaps : int;
num_names : int;
num_faces : int;
has_horizontal : bool;
has_vertical : bool;
}
val close_face : (Ftlow.face, 'a) refbox -> unit
val open_face :
(Ftlow.engine, 'a) refbox ->
string -> (Ftlow.face, (Ftlow.engine, 'a) refbox) refbox
val get_face_properties :
(Ftlow.face, 'a) refbox -> Ftlow.face_properties
type instance = (Ftlow.instance, face) refbox
val open_instance :
(Ftlow.face, 'a) refbox ->
(Ftlow.instance, (Ftlow.face, 'a) refbox) refbox
val set_instance_resolutions :
(Ftlow.instance, 'a) refbox -> int -> int -> unit
val set_instance_charsizes :
(Ftlow.instance, 'a) refbox -> float -> float -> unit
val set_instance_pixelsizes :
(Ftlow.instance, 'a) refbox -> int -> int -> float -> unit
type glyph = (Ftlow.glyph, face) refbox
val open_glyph :
(Ftlow.face, 'a) refbox ->
(Ftlow.glyph, (Ftlow.face, 'a) refbox) refbox
val load_glyph :
(Ftlow.instance, 'a) refbox ->
(Ftlow.glyph, 'b) refbox -> int -> bool -> bool -> unit
type outline = (Ftlow.outline, glyph) refbox
val get_glyph_outline :
(Ftlow.glyph, 'a) refbox ->
(Ftlow.outline, (Ftlow.glyph, 'a) refbox) refbox
val transform_outline :
(Ftlow.outline, 'a) refbox -> float -> float -> float -> float -> unit
val rotate_outline : (Ftlow.outline, 'a) refbox -> float -> unit
val translate_outline :
(Ftlow.outline, 'a) refbox -> float -> float -> unit
val get_maximum_bbox : (Ftlow.face, 'a) refbox -> bbox
val get_glyph_small_metrics :
(Ftlow.glyph, 'a) refbox -> small_glyph_metrics
val get_glyph_metrics : (Ftlow.glyph, 'a) refbox -> glyph_metrics
type instance_metrics = {
x_ppem : int;
y_ppem : int;
x_scale : float;
y_scale : float;
}
val get_instance_metrics :
(Ftlow.instance, 'a) refbox -> instance_metrics
type pixmap = (Ftlow.pixmap, unit) refbox
val open_pixmap : int -> int -> (Ftlow.pixmap, unit) refbox
val clear_pixmap : (Ftlow.pixmap, 'a) refbox -> unit
val read_pixmap : (Ftlow.pixmap, 'a) refbox -> int -> int -> int
val get_outline_pixmap :
(Ftlow.engine, 'a) refbox ->
(Ftlow.outline, 'b) refbox -> (Ftlow.pixmap, 'c) refbox -> unit
val get_outline_bbox : (Ftlow.outline, 'a) refbox -> bbox
val get_glyph_pixmap :
(Ftlow.glyph, 'a) refbox ->
(Ftlow.pixmap, 'b) refbox -> float -> float -> unit
type charmap = (Ftlow.charmap, face) refbox
val get_charmap_ids : (Ftlow.face, 'a) refbox -> (int * (int * int)) list
val get_charmap :
(Ftlow.face, 'a) refbox ->
int -> (Ftlow.charmap, (Ftlow.face, 'a) refbox) refbox
val char_index : (Ftlow.charmap, 'a) refbox -> int -> int
val get_num_glyphs : (Ftlow.face, 'a) refbox -> int
val find_charmap_unicode :
(Ftlow.face, 'a) refbox ->
(Ftlow.charmap, (Ftlow.face, 'a) refbox) refbox
val find_charmap :
(Ftlow.face, 'a) refbox ->
(Ftlow.charmap, (Ftlow.face, 'a) refbox) refbox
type outline_tag = Ftlow.outline_tag = Off_point | On_point
and outline_contents = {
n_contours : int;
n_points : int;
points : (float * float) array;
tags : outline_tag array;
contours : int array;
}
val get_outline_contents : (Ftlow.outline, 'a) refbox -> outline_contents
end
type t = Freetype1.engine val init : unit -> (Ftlow.engine, unit) refbox
type matrix = { ft_xx : float; ft_xy : float; ft_yx : float; ft_yy : float; }
and vector = { ft_x : float; ft_y : float; }
val matrix_rotate : float -> matrix
type map = {
mutable curw : int;
mutable curh : int;
mutable map : Freetype1.pixmap;
mutable curxmin : int;
mutable curymax : int;
}
and face = {
face : Freetype1.face;
the_instance : Freetype1.instance;
the_glyph : Freetype1.glyph;
the_map : map;
mutable the_charmap : Freetype1.charmap;
mutable the_matrix : matrix;
mutable the_vector : vector;
}
and 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;
}
and bbox =
Freetype1.bbox = {
xmin : float;
ymin : float;
xmax : float;
ymax : float;
}
and bearing_advance =
Freetype1.bearing_advance = {
bearingx : float;
bearingy : float;
advance : float;
}
and glyph_metrics = {
gm_width : float;
gm_height : float;
gm_hori : bearing_advance;
gm_vert : bearing_advance;
}
val create_map : int -> int -> map
val set_map : map -> int -> int -> int -> int -> unit
val mapbbox : float -> float -> bbox -> int * int * int * int * float * float
val new_face : Freetype1.engine -> string -> int -> face * face_info
val get_num_glyphs : face -> int
type char_index = int val int_of_char_index : 'a -> 'a val char_index_of_int : 'a -> 'a val set_char_size : face -> float -> float -> int -> int -> unit val set_pixel_sizes : face -> int -> int -> unit
type charmap = { platform_id : int; encoding_id : int; }
val get_charmaps : face -> charmap list
val set_charmap : face -> charmap -> unit
val get_char_index : face -> int -> int
val get_glyph_metrics : face -> glyph_metrics
type size_metrics =
Freetype1.instance_metrics = {
x_ppem : int;
y_ppem : int;
x_scale : float;
y_scale : float;
}
val get_size_metrics : face -> Freetype1.instance_metrics
type load_flag = Load_no_scale | Load_no_hinting val load_glyph : face -> int -> load_flag list -> float * float val load_char : face -> int -> load_flag list -> float * float val engine_of_face : face -> Freetype1.engine val render_glyph_of_face : face -> unit val render_glyph : face -> int -> load_flag list -> float * float val render_char : face -> int -> load_flag list -> float * float val set_transform : face -> matrix -> vector -> unit
type bitmap_info = {
bitmap_left : int;
bitmap_top : int;
bitmap_width : int;
bitmap_height : int;
}
val get_bitmap_info : face -> bitmap_info
val read_bitmap : face -> int -> int -> int
type outline_tag = Freetype1.outline_tag = Off_point | On_point
and outline_contents =
Freetype1.outline_contents = {
n_contours : int;
n_points : int;
points : (float * float) array;
tags : outline_tag array;
contours : int array;
}
val get_outline_contents : face -> Freetype1.outline_contents
Go to the first, previous, next, last section, table of contents.