Skip to content
Draft
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
The table of contents is too big for display.
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ target
.vscode
tools/build-*
**/diffs
**/diffs-hinted
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SVGinOT = "SVGinOT"

# Match Inside a Word - Case Insensitive
[default.extend-words]
wdth = "wdth"

[files]
# Include .github, .cargo, etc.
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ This changelog also contains important changes in dependencies.

This release has an MSRV of 1.87.0 for `usvg` and `resvg` and the C API.

### Added

- Hinting support for text rendering with configurable settings via CSS custom properties
(`-resvg-hinting-target`, `-resvg-hinting-mode`, `-resvg-hinting-engine`,
`-resvg-hinting-symmetric`, `-resvg-hinting-preserve-linear-metrics`).
- Variable font support with avar-aware axis normalization for correct rendering.
- LRU cache for glyph outlines with full parameter support (hinting settings, variations, ppem).
Dramatically improves performance for text-heavy documents with repeated glyphs.
- Cache statistics tracking (`CacheStats`) for monitoring outline cache hits/misses/evictions.
- Cache management methods: `outline_cache_stats()`, `clear_outline_cache()`,
`resize_outline_cache()`, `outline_cache_len()`, `outline_cache_capacity()`.

### Changed

- Port text rendering from `ttf-parser`/`rustybuzz` to `skrifa`/`harfrust`.
- Vendor `fontdb` 0.23.0 as a workspace crate, ported from `ttf-parser` to `skrifa`.
This eliminates the `ttf-parser` dependency entirely.
- Move span-uniform fields (`variations`, `font_optical_sizing`, `hinting`) from
`PositionedGlyph` to `Span` for reduced memory usage and better cache efficiency.
- Unify three outline extraction code paths (simple/variable/hinted) into single cached lookup.

### Fixed

- Remove empty `--drop-tables` flag from README.
- Fix potential panics on empty slices in font fallback.
- Add empty path check in `path_length()`.
- Add ASCII validation for font variation tags.
- Fix incorrect safety comment on mmap in fontdb.

## [0.46.0]

This release has an MSRV of 1.87.0 for `usvg` and `resvg` and the C API.
Expand Down
178 changes: 132 additions & 46 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
Loading