Cargo Features

[dependencies]
fontdb = { version = "0.16.2", default-features = false, features = ["std", "fs", "memmap", "fontconfig"] }
default = fontconfig, fs, memmap, std

These default features are set whenever fontdb is added without default-features = false somewhere in the dependency tree.

std default fs

Enables std of ttf-parser

fs default fontconfig memmap = std

Allows local filesystem interactions.

memmap default = fs, memmap2

Allows font files memory mapping, greatly improves performance.

fontconfig default = fontconfig-parser, fs

Enables minimal fontconfig support on Linux.
Must be enabled for NixOS, otherwise no fonts will be loaded.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

memmap2 memmap
fontconfig-parser unix not mac android fontconfig