The Older Type 1 Font Programs
Carry a Type 1 font into the document, the format of the older typesetting studios, under a name of your choosing.
See It in a Real PDF
A Page Set in a Font from 1990
A font in Adobe's oldest format, the kind a print shop bought twenty years ago and almost nothing reads any more, cut down to the letters the page draws. Every figure the page states about it was read out of the font itself.
Summary
Computer fonts have had several formats over the years, the way photographs have. A studio that has been working for a long while owns fonts in an older format, bought at the time, and has no wish to buy everything again. Those fonts work here exactly like the newer ones, and nothing in the finished document tells a reader which format it came from.
Technically
Written at the top level of a request, under
"type1_fonts"
type1_fonts carries the Type 1 programs the request transports, base64-encoded, each under the name items set text in it by. Both shapes are read: the raw program and the segmented form a .pfb file holds. Each is embedded as a /Subtype /Type1 font carrying its /FontFile, a /Differences encoding built from the codes actually drawn, and a ToUnicode map. The program is carried cut down to the glyphs the pages draw, and a document claiming the first part of PDF/A names them in /CharSet.
Request Schema
-
type1_fonts— array, optional, empty by default. -
type1_fonts[].name— string, required. The name items set text in this font by. -
type1_fonts[].data— string, required. The bytes of the program, base64-encoded. -
type1_fonts[].metrics— string, optional. The metrics file that comes with the program, an.afm, base64-encoded. Every glyph it names is measured, and stated in the document, on the width it gives; a glyph it does not name keeps the program's own. Absent, every glyph is measured on the program's widths. A metrics file that cannot be read is refused. -
type1_fonts[].windows_metrics— string, optional. The Windows metrics file that comes with the program, a.pfm, base64-encoded, read for its widths and its kerning pairs; never besidemetrics.
The program goes into the document cut down to the glyphs its pages draw. A name declared here is not looked for in the three font sources: the request supplies it itself. It may stand as a link in a font_chains chain.
A Whole Request That Creates a PDF
One name below stands for a font file: put the encoded file in its place, or send the file itself beside the description, as a supplied part of the same call. One page carries a real font already encoded, and its request posts as it stands.
{
"type1_fonts": [
{ "name": "stroke", "data": "PASTE_THE_TYPE1_PROGRAM_BASE64_HERE" }
],
"items": [
{
"type": "text",
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 770 },
"content": ["Set in a Type 1 program"],
"font": "stroke",
"font_size": 18
}
]
}
The fonts
Carrying a Font inside the Document The Fourteen Fonts All Reading Software Owns The Typographic Niceties of a Font A Font Whose Letters You Draw Yourself A Backup Font for the Rarer Signs Fonts Whose Letters Cost One Byte Fonts Whose Signs Come Out in Colour Fonts the Document Names without Carrying A Font Whose Makers Forbid Carrying It Fonts Carried Whole
Where to Go Next
Every JSON key of a request, in one page The other forty-one settings of a request