Skip to content

Commit

Permalink
Enable the fontconfig feature by default.
Browse files Browse the repository at this point in the history
Closes #56
  • Loading branch information
RazrFalcon committed Oct 1, 2023
1 parent da742a8 commit 3fdac6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ fontconfig-parser = { version = "0.5", optional = true, default-features = false
env_logger = { version = "0.9", default-features = false } # 0.10 requires Rust 1.60+

[features]
default = ["fs", "memmap", "std"]
fontconfig = ["fontconfig-parser", "fs"]
fs = ["std"] # allows local filesystem interactions
memmap = ["fs", "memmap2"] # allows font files memory mapping, greatly improves performance
default = ["std", "fs", "memmap", "fontconfig"]
std = ["ttf-parser/std"]
# Allows local filesystem interactions.
fs = ["std"]
# Allows font files memory mapping, greatly improves performance.
memmap = ["fs", "memmap2"]
# Enables minimal fontconfig support on Linux.
# Must be enabled for NixOS, otherwise no fonts will be loaded.
fontconfig = ["fontconfig-parser", "fs"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ impl Database {
}
}

// Linux.
#[cfg(all(
unix,
feature = "fontconfig",
Expand Down

0 comments on commit 3fdac6c

Please sign in to comment.