Skip to content

Conversation

ramelen
Copy link

@ramelen ramelen commented Aug 31, 2025

A VelloTextSection must currently be added to an entity and spawned in the world to be rendered, unlike impl Shape which can be encoded to a scene at any time. This has made it difficult to use text in my immediate mode application.

This PR changes the visibility of the render function on a VelloFont from pub(crate) to pub. As far as I am aware this change doesn't cause any problems, and should work as part of the API without any modifications.

PS: This is my first ever pull request, so if anything here is a faux pas I would appreciate the feedback.

@RobertBrewitz
Copy link
Member

RobertBrewitz commented Sep 1, 2025

I don't see any problem making it pub.

Now if you could figure out the pipeline errors that would be superb! 🤔

Edit: An alternative would just be to copy-paste the function, the only reference to self is the font family name :) Actually the font context is not public :(

PS: Need to update the CHANGELOG.md as well.
DS: Do not change any versions, we do that in a separate PR.

@ramelen
Copy link
Author

ramelen commented Sep 2, 2025

I notice that the lint still fails even when I revert my changes... I can get the tests to pass on my own fork, but since the errors don't seem to be caused by my change I'm wondering if that's an issue for a separate PR. Let me know what I should do.

* Reinstate `pub` marker without fixing lints

* Merge nested ifs

* Ignore dead code warning in `prepare`
@ramelen
Copy link
Author

ramelen commented Sep 11, 2025

Unfortunately, the lints pass now, but when I use my fork as a dependency in my project, it fails to compile with the error "let expressions in this position are unstable". I don't know why this doesn't come up in the GitHub checks but a build error is definitely worse than an unfixed clippy lint.

@RobertBrewitz
Copy link
Member

Unfortunately, the lints pass now, but when I use my fork as a dependency in my project, it fails to compile with the error "let expressions in this position are unstable". I don't know why this doesn't come up in the GitHub checks but a build error is definitely worse than an unfixed clippy lint.

I don't have any issues when using Rust 1.89 stable nor 1.91 nightly here running cargo check using this as a dependency. Shouldn't be any problem bumping the MSRV.

@ramelen
Copy link
Author

ramelen commented Sep 13, 2025

It turns out my rustc version was 1.86 stable and updating to 1.89 fixed the issue for me. Should be all good now.

@RobertBrewitz
Copy link
Member

@simbleau should the MSRV be bumped in this PR?

@simbleau
Copy link
Member

Yeah I'd be fine with that

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.

3 participants