pdfluent-cff 0.2.2

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: 157.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s 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

This crate is a fork. It began as ttf-parser and is maintained separately here. Upstream is actively developed and is the better choice if you do not need the changes made for PDFluent. Licensed as upstream (MIT OR Apache-2.0); see NOTICE and THIRD_PARTY_LICENSES.txt for the full attribution.

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 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.

If you do not need the PDF-specific additions, upstream cff-parser — the crate this one is tracked against in docs/UPSTREAM_FORKS.toml, and the one you could switch to — is the better choice: we are only slightly ahead of it.

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