Skip to content

Update to latest Parley version.#953

Merged
xStrom merged 2 commits intolinebender:mainfrom
xStrom:parley04
May 8, 2025
Merged

Update to latest Parley version.#953
xStrom merged 2 commits intolinebender:mainfrom
xStrom:parley04

Conversation

@xStrom
Copy link
Member

@xStrom xStrom commented May 8, 2025

This is basically the upcoming Parley 0.4.0, but right now pointing towards the latest git rev.

The snapshots have changed because line height layout code improved in Parley.

Fixes #933
Closes #936

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks

// To render text, we first create a LayoutBuilder and set the text properties.
let mut lcx = parley::LayoutContext::new();
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0);
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0, true);
Copy link
Member

Choose a reason for hiding this comment

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

The floating bool parameter here is not great API design...

@xStrom xStrom added this pull request to the merge queue May 8, 2025
Merged via the queue into linebender:main with commit 7d423cb May 8, 2025
18 checks passed
@xStrom xStrom deleted the parley04 branch May 8, 2025 10:48
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.

Each Label::layout pass stacks another text alignment offset additively.

2 participants