Skip to content

swr text layout: divide instead of counting lines one by one - #12952

Open
tronical wants to merge 1 commit into
masterfrom
simon/div-fix
Open

swr text layout: divide instead of counting lines one by one#12952
tronical wants to merge 1 commit into
masterfrom
simon/div-fix

Conversation

@tronical

Copy link
Copy Markdown
Member

max_lines_that_fit added up line heights in a loop because TextShaper::Length had no length by length division: euclid's Length / Length gives a Scale, not a number. Add a small LengthDiv trait for that, with impls for f32, i16 and any euclid Length whose primitive implements it, and do a single division.

max_lines_that_fit added up line heights in a loop because TextShaper::Length
had no length by length division: euclid's Length / Length gives a Scale, not a
number. Add a small LengthDiv trait for that, with impls for f32, i16 and any
euclid Length whose primitive implements it, and do a single division.
@tronical
tronical enabled auto-merge (rebase) August 19, 2026 14:33
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.

1 participant