sig
type tag
module Tag :
sig
type t = Otfm.tag
val cmap : Otfm.tag
val head : Otfm.tag
val hhea : Otfm.tag
val hmtx : Otfm.tag
val maxp : Otfm.tag
val name : Otfm.tag
val os2 : Otfm.tag
val post : Otfm.tag
val cvt : Otfm.tag
val fpgm : Otfm.tag
val glyf : Otfm.tag
val loca : Otfm.tag
val prep : Otfm.tag
val cff : Otfm.tag
val vorg : Otfm.tag
val ebdt : Otfm.tag
val eblc : Otfm.tag
val ebsc : Otfm.tag
val dsig : Otfm.tag
val gasp : Otfm.tag
val hdmx : Otfm.tag
val kern : Otfm.tag
val ltsh : Otfm.tag
val pclt : Otfm.tag
val vdmx : Otfm.tag
val vhea : Otfm.tag
val vmtx : Otfm.tag
val base : Otfm.tag
val gdef : Otfm.tag
val gpos : Otfm.tag
val gsub : Otfm.tag
val jstf : Otfm.tag
val of_bytes : string -> Otfm.tag
val to_bytes : Otfm.tag -> string
val to_int32 : Otfm.tag -> int32
val of_int32 : int32 -> Otfm.tag
val compare : Otfm.tag -> Otfm.tag -> int
val pp : Format.formatter -> Otfm.tag -> unit
end
type cp = int
type cp_range = Otfm.cp * Otfm.cp
val is_cp : int -> bool
type error_ctx = [ `Offset_table | `Table of Otfm.tag | `Table_directory ]
type error =
[ `Invalid_cp of int
| `Invalid_cp_range of int * int
| `Invalid_offset of Otfm.error_ctx * int
| `Invalid_postscript_name of string
| `Missing_required_table of Otfm.tag
| `Unexpected_eoi of Otfm.error_ctx
| `Unknown_flavour of Otfm.tag
| `Unknown_version of Otfm.error_ctx * int32
| `Unsupported_TTC
| `Unsupported_cmaps of (int * int * int) list ]
val pp_error : Format.formatter -> [< Otfm.error ] -> unit
type src = [ `String of string ]
type decoder
val decoder : [< Otfm.src ] -> Otfm.decoder
val decoder_src : Otfm.decoder -> Otfm.src
type flavour = [ `CFF | `TTF ]
val flavour :
Otfm.decoder -> [> `Error of Otfm.error | `Ok of Otfm.flavour ]
val table_list :
Otfm.decoder -> [> `Error of Otfm.error | `Ok of Otfm.tag list ]
val table_mem :
Otfm.decoder -> Otfm.tag -> [> `Error of Otfm.error | `Ok of bool ]
val table_raw :
Otfm.decoder ->
Otfm.tag -> [> `Error of Otfm.error | `Ok of string option ]
val glyph_count : Otfm.decoder -> [> `Error of Otfm.error | `Ok of int ]
val postscript_name :
Otfm.decoder -> [> `Error of Otfm.error | `Ok of string option ]
type glyph_id = int
type map_kind = [ `Glyph | `Glyph_range ]
val cmap :
Otfm.decoder ->
('a -> Otfm.map_kind -> Otfm.cp_range -> Otfm.glyph_id -> 'a) ->
'a -> [> `Error of Otfm.error | `Ok of (int * int * int) * 'a ]
type head = {
head_font_revision : int32;
head_flags : int;
head_units_per_em : int;
head_created : float;
head_modified : float;
head_xmin : int;
head_ymin : int;
head_xmax : int;
head_ymax : int;
head_mac_style : int;
head_lowest_rec_ppem : int;
head_index_to_loc_format : int;
}
val head : Otfm.decoder -> [> `Error of Otfm.error | `Ok of Otfm.head ]
type hhea = {
hhea_ascender : int;
hhea_descender : int;
hhea_line_gap : int;
hhea_advance_width_max : int;
hhea_min_left_side_bearing : int;
hhea_min_right_side_bearing : int;
hhea_xmax_extent : int;
hhea_caret_slope_rise : int;
hhea_caret_slope_run : int;
hhea_caret_offset : int;
}
val hhea : Otfm.decoder -> [> `Error of Otfm.error | `Ok of Otfm.hhea ]
val hmtx :
Otfm.decoder ->
('a -> Otfm.glyph_id -> int -> int -> 'a) ->
'a -> [> `Error of Otfm.error | `Ok of 'a ]
type lang = string
val name :
Otfm.decoder ->
('a -> int -> Otfm.lang -> string -> 'a) ->
'a -> [> `Error of Otfm.error | `Ok of 'a ]
type os2 = {
os2_x_avg_char_width : int;
os2_us_weight_class : int;
os2_us_width_class : int;
os2_fs_type : int;
os2_y_subscript_x_size : int;
os2_y_subscript_y_size : int;
os2_y_subscript_x_offset : int;
os2_y_subscript_y_offset : int;
os2_y_superscript_x_size : int;
os2_y_superscript_y_size : int;
os2_y_superscript_x_offset : int;
os2_y_superscript_y_offset : int;
os2_y_strikeout_size : int;
os2_y_strikeout_position : int;
os2_family_class : int;
os2_panose : string;
os2_ul_unicode_range1 : int32;
os2_ul_unicode_range2 : int32;
os2_ul_unicode_range3 : int32;
os2_ul_unicode_range4 : int32;
os2_ach_vend_id : int32;
os2_fs_selection : int;
os2_us_first_char_index : int;
os2_us_last_char_index : int;
os2_s_typo_ascender : int;
os2_s_type_descender : int;
os2_s_typo_linegap : int;
os2_us_win_ascent : int;
os2_us_win_descent : int;
os2_ul_code_page_range_1 : int32 option;
os2_ul_code_page_range_2 : int32 option;
os2_s_x_height : int option;
os2_s_cap_height : int option;
os2_us_default_char : int option;
os2_us_break_char : int option;
os2_us_max_context : int option;
}
val os2 : Otfm.decoder -> [> `Error of Otfm.error | `Ok of Otfm.os2 ]
type kern_info = {
kern_dir : [ `H | `V ];
kern_kind : [ `Kern | `Min ];
kern_cross_stream : bool;
}
val kern :
Otfm.decoder ->
('a -> Otfm.kern_info -> [ `Fold | `Skip ] * 'a) ->
('a -> Otfm.glyph_id -> Otfm.glyph_id -> int -> 'a) ->
'a -> [> `Error of Otfm.error | `Ok of 'a ]
end