# subsetter

> Reduces the size and coverage of OpenType fonts.

Source: https://talira.ai/catalog/subsetter-5mg54ff0
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / fonts / subsetting](https://talira.ai/categories/libraries/fonts/subsetting), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1][^2]
- Pricing: Free and open source[^1][^2]
- Free tier: yes[^1][^2]
- Self-hostable: yes[^2]
- Backed by: [Typst](https://talira.ai/orgs/typst.md)

subsetter is a Rust crate from the Typst project that cuts an OpenType font down to the glyphs a document uses, for embedding in a PDF. It handles fonts with TrueType (glyf) or CFF outlines and removes everything a PDF doesn't need, so the subsets are very small. That focus is deliberate: the README says the output will most likely be unusable anywhere but a PDF, and points to skera in Google's fontations for general-purpose subsetting. It forbids unsafe code and depends only on `rustc-hash`.

## Links

- GitHub: https://github.com/typst/subsetter
- Docs: https://docs.rs/subsetter

## Problems it solves

- embed only the glyphs my document uses so generated PDFs stay small
- my Rust PDF output is megabytes because whole CJK fonts get embedded
- subset a CFF-flavoured OpenType font for PDF embedding without shelling out to fontTools
- shrink TrueType fonts to the used glyph IDs before writing them into a PDF from Rust
- font subsetting with no C dependencies and no unsafe code for a Rust document generator
- remap glyph IDs after subsetting so my PDF content streams point at the right glyphs

## Features

- subsets OpenType fonts with TrueType (glyf) or CFF outlines
- removes tables and data a PDF doesn't need for very small subsets
- glyph remapping so content streams can use the new glyph IDs
- unsafe code forbidden; a single dependency (rustc-hash)

## Limitations

- Doesn't make subsets usable outside PDFs: it strips data that other uses of a font need, on purpose[^1]
- Doesn't instance variable fonts at chosen variation coordinates: listed only as possible future work[^1]

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.38 out of 1.
Signals: maintenance 0.63, adoption 0.36, momentum 0.10, community 0.34, backing 0.30, extensibility 0.00.

- last commit yesterday
- 5 commits in the last 90 days
- latest release v0.2.6 5 months ago
- 61 GitHub stars
- 6 contributors
- backed by Typst

## Sources

[^1]: https://github.com/typst/subsetter/blob/main/README.md (checked 20 Nov 2026)
[^2]: https://crates.io/crates/subsetter (checked 20 Nov 2026)
