-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance, Memory and Cleanup Improvements (#5)
* Improve performance, ergonomics, and memory usage. * Improves `get_font_stack` by using `spawn_blocking`. * Adjusts `get_font_stack` to take `font_names` as a `&[&str]` instead of `Vec<String>`. * Improves `load_glyphs` by using `spawn_blocking` instead of async file operations. * Improves memory usage of `combine_glyphs` by eliminating most copies. * Fixes a bug in `combine_glyphs` where the end and start of the range was the same. * Move to Edition 2021 and bump dependencies and version. * Bump `sdf_glyph_renderer` dependency.
- Loading branch information
1 parent
e8ca842
commit 6e6634e
Showing
3 changed files
with
57 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "pbf_font_tools" | ||
version = "1.0.2" | ||
authors = ["Ian Wagner <[email protected]>"] | ||
version = "2.0.0" | ||
authors = ["Ian Wagner <[email protected]>", "Luke Seelenbinder <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
repository = "https://github.com/stadiamaps/pbf_font_tools" | ||
readme = "README.md" | ||
description = "Tools for working with SDF font glyphs encoded in protobuf format." | ||
keywords = ["sdf", "protobuf", "fonts"] | ||
categories = ["encoding", "parsing", "rendering::data-formats"] | ||
edition = "2018" | ||
edition = "2021" | ||
|
||
[features] | ||
freetype = ["freetype-rs", "sdf_glyph_renderer/freetype"] | ||
|
@@ -18,21 +18,20 @@ futures = "0.3.14" | |
protobuf = "2.22.1" | ||
|
||
[dependencies.tokio] | ||
version = "1.5.0" | ||
features = ["fs", "io-util"] | ||
version = "1.12.0" | ||
|
||
[build-dependencies] | ||
glob = "0.3.0" | ||
protobuf-codegen-pure = "2.22.1" | ||
|
||
[dev-dependencies.tokio] | ||
version = "1.5.0" | ||
version = "1.12.0" | ||
features = ["fs", "io-util", "macros", "rt"] | ||
|
||
[dependencies.freetype-rs] | ||
version = "0.27.0" | ||
version = "0.28.0" | ||
optional = true | ||
|
||
[dependencies.sdf_glyph_renderer] | ||
version = "0.1.3" | ||
version = "0.2.0" | ||
optional = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters