`sig
type type3_glpyhs = {
fontbbox : float * float * float * float;
fontmatrix : Pdftransform.transform_matrix;
charprocs : (string * Pdf.pdfobject) list;
type3_resources : Pdf.pdfobject;
}
type simple_fonttype =
Type1
| MMType1
| Type3 of Pdftext.type3_glpyhs
| Truetype
type fontfile = FontFile of int | FontFile2 of int | FontFile3 of int
type fontdescriptor = {
ascent : float;
descent : float;
avgwidth : float;
maxwidth : float;
flags : int;
fontbbox : float * float * float * float;
italicangle : float;
capheight : float;
xheight : float;
stemv : float;
fontfile : Pdftext.fontfile option;
charset : string list option;
tounicode : (int, string) Stdlib.Hashtbl.t option;
}
type differences = (string * int) list
type encoding =
ImplicitInFontFile
| StandardEncoding
| MacRomanEncoding
| WinAnsiEncoding
| MacExpertEncoding
| CustomEncoding of Pdftext.encoding * Pdftext.differences
| FillUndefinedWithStandard of Pdftext.encoding
type fontmetrics = float array
type simple_font = {
fonttype : Pdftext.simple_fonttype;
basefont : string;
firstchar : int;
lastchar : int;
widths : int array;
fontdescriptor : Pdftext.fontdescriptor option;
fontmetrics : Pdftext.fontmetrics option;
encoding : Pdftext.encoding;
}
type standard_font =
TimesRoman
| TimesBold
| TimesItalic
| TimesBoldItalic
| Helvetica
| HelveticaBold
| HelveticaOblique
| HelveticaBoldOblique
| Courier
| CourierBold
| CourierOblique
| CourierBoldOblique
| Symbol
| ZapfDingbats
type cid_system_info = {
registry : string;
ordering : string;
supplement : int;
}
type composite_CIDfont = {
cid_system_info : Pdftext.cid_system_info;
cid_basefont : string;
cid_fontdescriptor : Pdftext.fontdescriptor;
cid_widths : (int * float) list;
cid_default_width : int;
}
type cmap_encoding = Predefined of string | CMap of int
type font =
StandardFont of Pdftext.standard_font * Pdftext.encoding
| SimpleFont of Pdftext.simple_font
| CIDKeyedFont of string * Pdftext.composite_CIDfont *
Pdftext.cmap_encoding
val string_of_standard_font : Pdftext.standard_font -> string
val standard_font_of_name : string -> Pdftext.standard_font option
val string_of_font : Pdftext.font -> string
val read_font : Pdf.t -> Pdf.pdfobject -> Pdftext.font
val write_font : ?objnum:int -> Pdf.t -> Pdftext.font -> int
val is_unicode : string -> bool
val is_identity_h : Pdftext.font -> bool
val codepoints_of_utf8 : string -> int list
val utf8_of_codepoints : int list -> string
val codepoints_of_utf16be : string -> int list
val utf16be_of_codepoints : int list -> string
val utf8_of_pdfdocstring : string -> string
val pdfdocstring_of_utf8 : string -> string
val pdfdocstring_of_codepoints : int list -> string
val codepoints_of_pdfdocstring : string -> int list
val simplify_utf16be : string -> string
type text_extractor
val text_extractor_of_font :
Pdf.t -> Pdf.pdfobject -> Pdftext.text_extractor
val text_extractor_of_font_real : Pdftext.font -> Pdftext.text_extractor
val codepoints_of_text : Pdftext.text_extractor -> string -> int list
val glyphnames_of_text : Pdftext.text_extractor -> string -> string list
val charcode_extractor_of_font :
?debug:bool -> Pdf.t -> Pdf.pdfobject -> int -> int option
val charcode_extractor_of_font_real :
?debug:bool -> Pdftext.font -> int -> int option
val table_of_encoding : Pdftext.encoding -> (int, string) Stdlib.Hashtbl.t
val reverse_table_of_encoding :
Pdftext.encoding -> (string, int) Stdlib.Hashtbl.t
end`