cpdf-source/cpdftruetype.mli

25 lines
610 B
OCaml
Raw Normal View History

2022-09-11 15:52:08 +02:00
(* Parse a TrueType font *)
type t =
{flags : int;
minx : int;
miny : int;
maxx : int;
maxy : int;
italicangle : int;
ascent : int;
descent : int;
capheight : int;
stemv : int;
xheight : int;
avgwidth : int;
maxwidth : int;
firstchar : int;
lastchar : int;
widths : int array;
subset : Pdfio.bytes}
(* Parse the font, given the list of Unicode codepoints required for the subset
and optionally their PDF codepoint too. Returns the information required for
embedding this font in a PDF. *)
val parse : ?subset:(int * int option) list -> Pdfio.bytes -> t