Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Parser for the Adobe Font Metrics (afm) format
The parser follows version 4.1 of the specification, as described in this document.
There is no attempt to rescue files that depart from this specification.
type header = {
metrics_sets : int option;
font_name : string;
full_name : string option;
family_name : string option;
weight : string option;
font_bbox : float * float * float * float;
version : string option;
notice : string option;
encoding_scheme : string option;
mapping_scheme : int option;
esc_char : int option;
character_set : string option;
characters : int option;
is_base_font : bool option;
vvector : (float * float) option;
is_fixed_v : bool option;
cap_height : float option;
xheight : float option;
ascender : float option;
descender : float option;
stdhw : float option;
stdvw : float option;
}
type char_metrics = {
code : [ `C of int | `CH of string ];
wx : float option;
w0x : float option;
w1x : float option;
wy : float option;
w0y : float option;
w1y : float option;
w : (float * float) option;
w0 : (float * float) option;
w1 : (float * float) option;
vv : (float * float) option;
n : string option;
b : (float * float * float * float) option;
l : (string * string) list;
}
type pairwise_kerning = kerning_pair_info array
type t = {
version : string;
header : header;
writing_directions : writing_direction with_direction option;
char_metrics : char_metrics array option;
track_kerning : track_kerning array option;
pairwise_kerning : pairwise_kerning with_direction option;
composites : composite_character_data array option;
}