module Cpdftruetype:sig
..end
Parse and subset TrueType fonts
type
t = {
|
flags : |
|
minx : |
|
miny : |
|
maxx : |
|
maxy : |
|
italicangle : |
|
ascent : |
|
descent : |
|
capheight : |
|
stemv : |
|
xheight : |
|
avgwidth : |
|
maxwidth : |
|
firstchar : |
|
lastchar : |
|
widths : |
|
subset_fontfile : |
|
subset : |
|
tounicode : |
}
The type of a single parsed font, including everything needed to build a PDF font.
val parse : subset:int list -> Pdfio.bytes -> Pdftext.encoding -> t list
Parse the given TrueType font file. It will return one or more fonts. The first, a plain Latin font in the given encoding. Others are for the additional characters in the font. You should supply a subset (a list of unicode codepoints whose corresponding glyphs are required).
val cmaps : Pdfio.bytes -> (int * int) list
Return the list of cmaps from a font file (used for PDF/UA verification).