Skip to content

Commit 58074d4

Browse files
committed
Scale font size when transform is a uniform scale
Don't expose Skrifa public API + use norm coords slice Hardcode NonZero fill text rendering Add disclaimer to layout_glyphs Disable hinting for rotated, skewed text Prevent allocating a new path for each glyph Set no features on bytemuck clippy Add test for scaled glyphs Improve doco Use unscaled outlines . Parley example . more clippy Minor Make GlypRun members private Use &str Move bytemuck::cast_slice Update Parley deps Remove roboto Add unit tests for tiling (linebender#881) It would be nice to also add some tests for how it behaves at tile boundaries, but since at least from my experiments we do not seem to produce ideal results for those cases (yet?), I've left them out for now. Remove the SDL2 example (linebender#886) If someone cares to work out why it doesn't compile and then brings it back, then they can do. But I don't care to, and we need CI to be working. Use Wasm for text example . . . . . .
1 parent bf95b85 commit 58074d4

File tree

20 files changed

+1132
-61
lines changed

20 files changed

+1132
-61
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
FEATURES_DEPENDING_ON_STD: "std,default"
2020
# List of packages that can not target Wasm.
2121
# `vello_tests` uses `nv-flip`, which doesn't support Wasm.
22-
NO_WASM_PKGS: "--exclude vello_tests --exclude simple_sdl2"
22+
NO_WASM_PKGS: "--exclude vello_tests"
2323
# The files stored in LFS the tests need to access, in JSON format
2424
LFS_FILES: '["vello_tests/snapshots/*.png", "sparse_strips/vello_cpu/snapshots/*.png"]'
2525

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ This release has an [MSRV][] of 1.85.
2929

3030
The crates were switched to edition 2024 of Rust.
3131

32+
- The example which uses sdl2 has been removed.
33+
The sdl2 crates no longer compile, and this example previously existing shows that it was possible. ([#886][] by [@DJMcNab][])
34+
3235
## [0.4.1][] - 2025-03-10
3336

3437
This release has an [MSRV][] of 1.82.
@@ -257,6 +260,7 @@ This release has an [MSRV][] of 1.75.
257260
[#796]: https://github.com/linebender/vello/pull/796
258261
[#803]: https://github.com/linebender/vello/pull/803
259262
[#841]: https://github.com/linebender/vello/pull/841
263+
[#886]: https://github.com/linebender/vello/pull/886
260264

261265
<!-- Note that this still comparing against 0.4.0, because 0.4.1 is a cherry-picked patch -->
262266
[Unreleased]: https://github.com/linebender/vello/compare/v0.4.0...HEAD

Cargo.lock

Lines changed: 114 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ members = [
1010
"examples/run_wasm",
1111
"examples/scenes",
1212
"examples/simple",
13-
"examples/simple_sdl2",
1413
"examples/with_winit",
1514

1615
"sparse_strips/vello_api",
@@ -28,8 +27,7 @@ members = [
2827
#
2928
# NOTE: When bumping this, remember to also bump the aforementioned other packages'
3029
# version in the dependencies section at the bottom of this file.
31-
# Additionally, bump the Vello dependency version in the 'simple'
32-
# and `simple_sdl2` examples.
30+
# Additionally, bump the Vello dependency version in the 'simple' example.
3331
version = "0.4.0"
3432

3533
edition = "2024"

sparse_strips/vello_api/src/glyph.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2025 the Vello Authors
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+
//! Types for glyphs.
5+
6+
/// Positioned glyph.
7+
#[derive(Copy, Clone, Default, Debug)]
8+
pub struct Glyph {
9+
/// The font-specific identifier for this glyph.
10+
///
11+
/// This ID is specific to the font being used and corresponds to the
12+
/// glyph index within that font. It is *not* a Unicode code point.
13+
pub id: u32,
14+
/// X-offset in run, relative to transform.
15+
pub x: f32,
16+
/// Y-offset in run, relative to transform.
17+
pub y: f32,
18+
}

sparse_strips/vello_api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ pub use peniko;
1212
pub use peniko::color;
1313
pub use peniko::kurbo;
1414
pub mod execute;
15+
pub mod glyph;
1516
pub mod paint;

0 commit comments

Comments
 (0)