Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/copyright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# -g "!src/special_directory"

# Check all the standard Rust source files
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Resvg Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.{rs,c,cpp,h}" .)
# Exclude vendored fontdb (has its own copyright from original author)
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Resvg Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.{rs,c,cpp,h}" -g "!crates/fontdb/*" .)

if [ -n "$output" ]; then
echo -e "The following files lack the correct copyright header:\n"
Expand Down
139 changes: 92 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"crates/c-api",
"crates/fontdb",
"crates/resvg",
"crates/usvg",
"crates/usvg/codegen",
Expand Down
34 changes: 34 additions & 0 deletions crates/fontdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "fontdb"
version = "0.23.0"
authors = ["Yevhenii Reizner <razrfalcon@gmail.com>"]
edition = "2024"
rust-version = "1.87.0"
license = "MIT"
description = "A simple, in-memory font database with CSS-like queries. Vendored for resvg with skrifa backend."
repository = "https://github.com/linebender/resvg"
documentation = "https://docs.rs/fontdb/"
keywords = ["font", "db", "css", "truetype", "opentype"]
categories = ["text-processing"]

[dependencies]
slotmap = "1.0"
tinyvec = { version = "1.8", features = ["alloc"] }
skrifa = "0.40"
log = "0.4"

memmap2 = { version = "0.9", optional = true }
fontconfig-parser = { version = "0.5.8", optional = true }

[features]
default = ["std", "fs", "system-fonts", "memmap"]
# Enables standard library support (always on for this vendored version).
std = []
# Enables file system operations (loading fonts from files/directories).
fs = ["std"]
# Enables system fonts loading.
system-fonts = ["fs", "fontconfig"]
# Enables fontconfig support on Linux.
fontconfig = ["fontconfig-parser"]
# Enables font files memory mapping for faster loading.
memmap = ["fs", "memmap2"]
Loading