Skip to content

Update to latest Parley version. #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged

Update to latest Parley version. #953

merged 2 commits into from
May 8, 2025

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

@@ -129,7 +129,7 @@ impl Widget for CustomWidget {

// 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