package otfm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag
module Tag : sig ... end
type cp = int
type cp_range = cp * cp
val is_cp : int -> bool
type error_ctx = [
  1. | `Offset_table
  2. | `Table of tag
  3. | `Table_directory
]
type error = [
  1. | `Invalid_cp of int
  2. | `Invalid_cp_range of int * int
  3. | `Invalid_offset of error_ctx * int
  4. | `Invalid_postscript_name of string
  5. | `Missing_required_table of tag
  6. | `Unexpected_eoi of error_ctx
  7. | `Unknown_flavour of tag
  8. | `Unknown_version of error_ctx * int32
  9. | `Unsupported_TTC
  10. | `Unsupported_cmaps of (int * int * int) list
]
val pp_error : Format.formatter -> [< error ] -> unit
type src = [
  1. | `String of string
]
type decoder
val decoder : [< src ] -> decoder
val decoder_src : decoder -> src
type flavour = [
  1. | `CFF
  2. | `TTF
]
val flavour : decoder -> [> `Error of error | `Ok of flavour ]
val table_list : decoder -> [> `Error of error | `Ok of tag list ]
val table_mem : decoder -> tag -> [> `Error of error | `Ok of bool ]
val table_raw : decoder -> tag -> [> `Error of error | `Ok of string option ]
val glyph_count : decoder -> [> `Error of error | `Ok of int ]
val postscript_name : decoder -> [> `Error of error | `Ok of string option ]
type glyph_id = int
type map_kind = [
  1. | `Glyph
  2. | `Glyph_range
]
val cmap : decoder -> ('a -> map_kind -> cp_range -> glyph_id -> 'a) -> 'a -> [> `Error of error | `Ok of (int * int * int) * 'a ]
type head = {
  1. head_font_revision : int32;
  2. head_flags : int;
  3. head_units_per_em : int;
  4. head_created : float;
  5. head_modified : float;
  6. head_xmin : int;
  7. head_ymin : int;
  8. head_xmax : int;
  9. head_ymax : int;
  10. head_mac_style : int;
  11. head_lowest_rec_ppem : int;
  12. head_index_to_loc_format : int;
}
val head : decoder -> [> `Error of error | `Ok of head ]
type hhea = {
  1. hhea_ascender : int;
  2. hhea_descender : int;
  3. hhea_line_gap : int;
  4. hhea_advance_width_max : int;
  5. hhea_min_left_side_bearing : int;
  6. hhea_min_right_side_bearing : int;
  7. hhea_xmax_extent : int;
  8. hhea_caret_slope_rise : int;
  9. hhea_caret_slope_run : int;
  10. hhea_caret_offset : int;
}
val hhea : decoder -> [> `Error of error | `Ok of hhea ]
val hmtx : decoder -> ('a -> glyph_id -> int -> int -> 'a) -> 'a -> [> `Error of error | `Ok of 'a ]
type lang = string
val name : decoder -> ('a -> int -> lang -> string -> 'a) -> 'a -> [> `Error of error | `Ok of 'a ]
type os2 = {
  1. os2_x_avg_char_width : int;
  2. os2_us_weight_class : int;
  3. os2_us_width_class : int;
  4. os2_fs_type : int;
  5. os2_y_subscript_x_size : int;
  6. os2_y_subscript_y_size : int;
  7. os2_y_subscript_x_offset : int;
  8. os2_y_subscript_y_offset : int;
  9. os2_y_superscript_x_size : int;
  10. os2_y_superscript_y_size : int;
  11. os2_y_superscript_x_offset : int;
  12. os2_y_superscript_y_offset : int;
  13. os2_y_strikeout_size : int;
  14. os2_y_strikeout_position : int;
  15. os2_family_class : int;
  16. os2_panose : string;
  17. os2_ul_unicode_range1 : int32;
  18. os2_ul_unicode_range2 : int32;
  19. os2_ul_unicode_range3 : int32;
  20. os2_ul_unicode_range4 : int32;
  21. os2_ach_vend_id : int32;
  22. os2_fs_selection : int;
  23. os2_us_first_char_index : int;
  24. os2_us_last_char_index : int;
  25. os2_s_typo_ascender : int;
  26. os2_s_type_descender : int;
  27. os2_s_typo_linegap : int;
  28. os2_us_win_ascent : int;
  29. os2_us_win_descent : int;
  30. os2_ul_code_page_range_1 : int32 option;
  31. os2_ul_code_page_range_2 : int32 option;
  32. os2_s_x_height : int option;
  33. os2_s_cap_height : int option;
  34. os2_us_default_char : int option;
  35. os2_us_break_char : int option;
  36. os2_us_max_context : int option;
}
val os2 : decoder -> [> `Error of error | `Ok of os2 ]
type kern_info = {
  1. kern_dir : [ `H | `V ];
  2. kern_kind : [ `Kern | `Min ];
  3. kern_cross_stream : bool;
}
val kern : decoder -> ('a -> kern_info -> [ `Fold | `Skip ] * 'a) -> ('a -> glyph_id -> glyph_id -> int -> 'a) -> 'a -> [> `Error of error | `Ok of 'a ]
OCaml

Innovation. Community. Security.