Expand description
PDF output backend (handlePdf.ml, on top of pdf-writer): base-14 Type1
fonts, uncompressed content streams, ttf-parser-backed metrics with
CID-keyed TrueType embedding, raster Image XObjects.
Re-exports§
pub use base14::Base14Metrics;pub use cid::render_pdf_ttf;pub use cid::render_pdf_ttf_with;pub use fonts::FontConfigError;pub use fonts::FontFlags;pub use fonts::FontRegistry;pub use fonts::FontSource;pub use ttf::FontError;pub use ttf::TtfFontStore;
Modules§
- base14
- Base-14 Helvetica metrics (advance widths transcribed from the freely redistributable Adobe Core-14 AFM files), covering ASCII 32–126. No font files are parsed — advances come from this fixed table.
- cid
- CID-keyed (Type0/CIDFontType2 for
glyf, Type0/CIDFontType0 for CFF) font embedding, with a requiredToUnicodeCMap sopdftotext-style extraction keeps working. The sibling ofrender_pdf(base-14 Type1): it shares the page geometry / line-layout plumbing but writes Identity-H glyph-index content streams against real embedded font files. - fonts
- Font configuration discovery and resolution: reads a small,
plain-JSON font configuration and turns it into a
TtfFontStoreviaTtfFontStore::load. - ttf
- A
FontMetricsprovider backed by real TrueType/OpenType font files. Loads up to three faces — regular, bold, oblique — mapped onto the existingFontKey(0/1/2)convention frombase14, and measures throughttf-parser’scmap/hmtx/hhea/OS/2tables instead of hardcoded AFM widths.
Enums§
Functions§
- render_
pdf - Serialize typeset pages into a complete PDF document.
imagesis the document-wide image table (DocumentValue::images); pass&[]for a text-only document. - render_
pdf_ with - Same as
render_pdf, but also emits the extras (/Annots,/Dests,/Outlines, per-page deco-graphics underlays) accumulated while evaluating the document (DocumentValue::extras).