Skip to content
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

text: Calculate character positions during relayout #18259

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Oct 13, 2024

This refactor simplifies existing code and makes it easier to write code related to character positions (evaluating a font each time is not needed anymore).

@kjarosh kjarosh added text Issues relating to text rendering/input A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup labels Oct 13, 2024
Calculate character positions during relayout
and store them in char_end_pos.
Use char_end_pos for calculating character bounds
instead of evaluating the font each time.
This parameter is not needed anymore as character positions are
calculated during relayout and the font doesn't have to be evaluated.
@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup text Issues relating to text rendering/input waiting-on-review Waiting on review from a Ruffle team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants