Files
pdfcraft/vendor/vello_common
c02341f6c0 M2: a wide stroke of a path with y curves is drawn, not dropped (vello_common patch 4) (#6526)
A cubic whose second control point is its end point (as the `y` operator builds,
ISO 32000-2 8.5.2.1 Table 58) has a zero derivative at its end. kurbo 0.13.1's
offset curve looks for cusps with a root search on the curvature, which grows
without bound towards that end; at some widths the search stops on the end point
and normalising the zero tangent there gives NaN. vello_common's fill drops any
outline with NaN, so the whole stroke vanished (a two-curve `y` path drew nothing
at 16, 32 and 63 pt; a PDFBox tracker file lost its 32 pt "XX" outline).

The NaN fallback that #4913 added to `flatten::stroke` now also moves such a
control point the stroke tolerance towards the previous control point before
stroking again (the curve moves by at most 4/9 of the tolerance). Outlines that
come back finite take the old path unchanged. The vendor ledger row also gets
back #4913's entry, which a merge had dropped.


Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA

Co-authored-by: mtlcl410 <chuanlin@niar.org.tw>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:31:00 +08:00
..

Vello Common

Shared data structures

Latest published version. Documentation build status. Apache 2.0 or MIT license.
Linebender Zulip chat. GitHub Actions CI status. Dependency staleness status.

This crate includes common geometry representations, tiling logic, and other fundamental components used by both Vello CPU and Vello Hybrid.

Usage

This crate should not be used on its own, and you should instead use one of the renderers which use it. At the moment, only Vello CPU is published, and you probably want to use that.

We also develop Vello, which makes use of the GPU for 2D rendering and has higher performance than Vello CPU. Vello CPU is being developed as part of work to address shortcomings in Vello. Vello does not use this crate.

Features

  • std (enabled by default): Get floating point functions from the standard library (likely using your target's libc).
  • libm: Use floating point implementations from libm.
  • png (enabled by default): Allow loading Pixmaps from PNG images. Also required for rendering glyphs with an embedded PNG. Implies std.

At least one of std and libm is required; std overrides libm.

Contents

  • Shared data structures for paths, tiles, and strips
  • Geometry processing utilities
  • Common logic for rendering stages

This crate acts as a foundation for vello_cpu and vello_hybrid, providing essential components to minimize duplication.

Minimum supported Rust Version (MSRV)

This version of Vello Common has been verified to compile with Rust 1.92 and later.

Future versions of Vello Common might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.

Click here if compiling fails.

As time has passed, some of Vello Common's dependencies could have released versions with a higher Rust requirement. If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.

# Use the problematic dependency's name and version
cargo update -p package_name --precise 0.1.1

Community

Discussion of Vello Common development happens in the Linebender Zulip, specifically the #vello channel. All public content can be read without logging in.

Contributions are welcome by pull request. The Rust code of conduct applies.

License

Licensed under either of

at your option.