package camlimages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module FtlowSource

Almost all of the functions are just interpretation of functions of the freetype library. See the documents of the freetype library.

Sourcetype library
Sourceval init : unit -> library
Sourceval close : library -> unit
Sourcetype face
Sourcetype face_info = {
  1. num_faces : int;
  2. num_glyphs : int;
  3. family_name : string;
  4. style_name : string;
  5. has_horizontal : bool;
  6. has_vertical : bool;
  7. has_kerning : bool;
  8. is_scalable : bool;
  9. is_sfnt : bool;
  10. is_fixed_width : bool;
  11. has_fixed_sizes : bool;
  12. has_fast_glyphs : bool;
  13. has_glyph_names : bool;
  14. has_multiple_masters : bool;
}
Sourceval new_face : library -> string -> int -> face
Sourceval face_info : face -> face_info
Sourceval done_face : face -> unit
Sourceval get_num_glyphs : face -> int
Sourceval set_char_size : face -> int -> int -> int -> int -> unit
Sourceval set_pixel_sizes : face -> int -> int -> unit
Sourcetype charmap = {
  1. platform_id : int;
  2. encoding_id : int;
}
Sourceval get_charmaps : face -> charmap list
Sourceval set_charmap : face -> charmap -> unit
Sourceval get_char_index : face -> int -> int
Sourcetype render_mode =
  1. | Render_Normal
    (*

    default

    *)
  2. | Render_Mono
Sourcetype load_flag =
  1. | Load_no_scale
  2. | Load_no_hinting
Sourceval load_glyph : face -> int -> load_flag list -> int * int
Sourceval load_char : face -> int -> load_flag list -> int * int
Sourceval render_glyph_of_face : face -> render_mode -> unit
Sourceval render_glyph : face -> int -> load_flag list -> render_mode -> int * int
Sourceval render_char : face -> int -> load_flag list -> render_mode -> int * int
Sourceval set_transform : face -> (int * int * int * int) -> (int * int) -> unit
Sourcetype bitmap_info = {
  1. bitmap_left : int;
  2. bitmap_top : int;
  3. bitmap_width : int;
  4. bitmap_height : int;
}
Sourceval get_bitmap_info : face -> bitmap_info
Sourceval read_bitmap : face -> int -> int -> int
Sourcetype bbox = {
  1. xmin : int;
    (*

    26.6

    *)
  2. ymin : int;
    (*

    26.6

    *)
  3. xmax : int;
    (*

    26.6

    *)
  4. ymax : int;
    (*

    26.6

    *)
}

glyph metrics

Sourcetype bearing_advance = {
  1. bearingx : int;
    (*

    26.6

    *)
  2. bearingy : int;
    (*

    26.6

    *)
  3. advance : int;
    (*

    26.6

    *)
}
Sourcetype glyph_metrics = {
  1. gm_width : int;
    (*

    26.6

    *)
  2. gm_height : int;
    (*

    26.6

    *)
  3. gm_hori : bearing_advance;
  4. gm_vert : bearing_advance;
}
Sourceval get_glyph_metrics : face -> glyph_metrics
Sourcetype size_metrics = {
  1. x_ppem : int;
  2. y_ppem : int;
  3. x_scale : int;
    (*

    16.16

    *)
  4. y_scale : int;
    (*

    16.16

    *)
}

size metrics

Sourceval get_size_metrics : face -> size_metrics
Sourcetype outline_tag =
  1. | On_point
  2. | Off_point_conic
  3. | Off_point_cubic

outline info

Sourcetype outline_contents = {
  1. n_contours : int;
  2. n_points : int;
  3. points : (int * int) array;
  4. tags : outline_tag array;
  5. contours : int array;
}
Sourceval get_outline_contents : face -> outline_contents
OCaml

Innovation. Community. Security.