Cargo Features

[dependencies]
rust-fontconfig = { version = "4.2.0", default-features = false, features = ["std", "multithreading", "parsing", "ffi", "cache", "async-registry"] }

Feature layout as of v4.1:

  • std is now always enabled; keeping the feature gate around is a no-op so existing features = ["std"] declarations keep working. The no_std build path was dropped when FcFontCache moved to an Arc<RwLock<_>> shared-state design that requires std::sync.
  • All other features compose on top of std.
default = std

The std feature is set by default whenever rust-fontconfig is added without default-features = false somewhere in the dependency tree.

std default async-registry? cache? ffi? parsing? = mmapio

Affects rust-fontconfig::config, rust-fontconfig::FontBytes, utils::is_font_file, rust-fontconfig::FastCoverage, rust-fontconfig::FcParseFontFaceFast, rust-fontconfig::FcCountFontFaces, rust-fontconfig::FcParseFontBytes

multithreading = rayon
parsing async-registry? ffi? = allsorts, std

Affects rust-fontconfig::FastCoverage, rust-fontconfig::FcParseFontFaceFast, rust-fontconfig::FcCountFontFaces, rust-fontconfig::FcParseFontBytes

ffi = async-registry, parsing, std

Affects rust-fontconfig::ffi

cache = bincode, dirs, serde, std

Affects rust-fontconfig::disk_cache

async-registry ffi? = parsing, std

Affects ffi::fc_registry_get_render_config, ffi::fc_registry_new, ffi::fc_registry_spawn, ffi::fc_registry_request_fonts, ffi::fc_registry_chains_free, ffi::fc_registry_is_scan_complete, ffi::fc_registry_is_build_complete, ffi::fc_registry_shutdown, ffi::fc_registry_free, ffi::fc_registry_query, ffi::fc_registry_list_fonts, ffi::fc_registry_resolve_font_chain, ffi::fc_registry_get_font_path, ffi::fc_registry_get_metadata, ffi::fc_registry_snapshot, rust-fontconfig::scoring, rust-fontconfig::registry, rust-fontconfig::multithread

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

allsorts parsing?

Enables allsorts-azul

serde cache?
bincode cache?

Enables bincode ^1

dirs cache?
mmapio not wasm std
rayon not wasm multithreading?