pdfluent-cff 0.2.1

A parser for the Compact Font Format (CFF) — extended fork used by PDFluent
Documentation
  • Coverage
  • 27.54%
    19 out of 69 items documented0 out of 22 items with examples
  • Size
  • Source code size: 155.38 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.51 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jasperdew github:pdfluent:maintainers

pdfluent-cff

A CFF (Compact Font Format) parser in pure Rust, with extensions for parsing CFF data embedded in PDF documents.

pdfluent-cff is one of the open-source foundation crates used by the PDFluent commercial Rust PDF SDK. It is published as MIT OR Apache-2.0 so it can also be used standalone.

This crate is a fork of the CFF1 parsing code from ttf-parser by Evgeniy Reizner. The fork adds the parts of the CFF specification that ttf-parser does not need (because ttf-parser only sees CFF wrapped in OpenType), but a PDF parser does.

What this crate gives you

  • Parse CFF Top DICT, name index, string index, charstring index, encoding, charsets, and FDSelect / FDArray (CID-keyed fonts)
  • Standard PostScript glyph names lookup (STANDARD_NAMES)
  • Glyph width helpers (glyph_width_f64)
  • CIDFont font-matrix resolution (glyph_fd_matrix)

What this crate is not:

  • Not a font rasterizer
  • Not an OpenType parser (use ttf-parser for that)
  • Not a font subsetter

Install

[dependencies]
pdfluent-cff = "0.2"

The library re-exports under the cff_parser module path to match the upstream API:

use cff_parser::Cff;

For full PDF font handling (Type 1, CFF, CMap, ToUnicode, Standard 14 fallbacks) use the pdf-font crate or the pdfluent facade.

License

MIT OR Apache-2.0 — preserved from upstream ttf-parser.

Copyright (c) Evgeniy Reizner (ttf-parser CFF code)
Copyright (c) 2026 Innovation Trigger BV (PDFluent fork)

See LICENSE-MIT and LICENSE-APACHE.

Links