Skip to contents

Wraps FPDFFont_GetFontData. Useful for round-tripping an embedded font from one PDF to another, piping into systemfonts / fontmgr-style introspection, or auditing what's actually been embedded.

Usage

pdf_font_data(font)

Arguments

font

A pdfium_font from pdf_font_load(), pdf_font_load_standard(), or pdf_text_font() (the reader side, which returns the per-text-object font).

Value

Raw vector of font bytes. raw(0) if PDFium reports the font has no embedded data (e.g. a referenced-only standard font).