Skip to content

Conversation

@taj-p
Copy link
Contributor

@taj-p taj-p commented Dec 9, 2025

Copying Vello's Text Logic to Parley Draw

To kick off implementation of Parley Draw, we're firstly copying over the Vello implementation.

EVERYTHING WILL CHANGE SIGNIFICANTLY (especially APIs!). For now, we're simply copying the code across for the purposes of using it as a foundation to build off and to allow us to start exploring hint aware shaping.

This approach has been OK'd by @dfrg .

Changes made to the copy

  • Added a vello_cpu_render example that uses Parley Draw so that we can keep track of how the API evolves. After we're happy with Parley Draw, I recommend applying it to our other examples.
  • Feature gated vello_cpu's implementation of GlyphRender and ColrRender so that consumers aren't required to use it. However, we still depend on vello_common.
  • We have to pain to Vello's github repository because Pixmap hasn't yet been moved from vello_cpu to vello_common in the latest 0.0.4 release.
  • We pass the GlyphCaches into GlyphRunBuilder instead of having the trait own them. This reflects how we will eventually support sharing the hinting instance cache between the shaper and renderer. But, of course, this is all subject to change.
  • Updated MSRV to 1.88 to use Vello (which has an MSRV of 1.88).

Immediate Follow Ups

  • I decided not to port the tests over at the same time. I suspect we might want to discuss the best way to execute tests for Parley Draw, so I think that's best discussed in a follow up after this is merged. Right now, I'm thinking of moving the existing parley tests out to parley_tests and using Parley Draw for rasterising those tests (alongside additional draw only tests like COLR emoji rasterisation tests).

Example

This is the output of the new example:

vello_cpu_render

Reviews

Since most of this code has already been reviewed in Vello, I suggest we focus the review on the changes listed above.

robertbastian and others added 3 commits December 10, 2025 09:39
Please don't publish a crate called `unicode_data` if it's specific to
your project.
@taj-p taj-p force-pushed the tajp/parley_draw_vello branch from 4537fc3 to f6f6df1 Compare December 9, 2025 23:09
@taj-p taj-p marked this pull request as ready for review December 9, 2025 23:55
@taj-p taj-p requested a review from dfrg December 9, 2025 23:55
Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable as initial version.

However, I think we should eliminate the dependency on vello_common (except when using vello_cpu) sooner rather than later. Looks like it's just being used for the Pixmap type which is mainly being used for png decoding? IMO that doesn't justify the dependency.

Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vello copyright acknowledgement must remain.

taj-p and others added 4 commits December 18, 2025 13:39
Co-authored-by: Kaur Kuut <strom@nevermore.ee>
Co-authored-by: Kaur Kuut <strom@nevermore.ee>
Co-authored-by: Kaur Kuut <strom@nevermore.ee>
Co-authored-by: Kaur Kuut <strom@nevermore.ee>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants