Dimchikkk / velo

App for brainstorming & sharing ideas 🦀 Learning Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix text height calculation for proper text alignment

Dimchikkk opened this issue · comments

Currently text height is calculated by amount of lines multiplied by line_height: https://github.com/StaffEngineer/velo/blob/f47f2dc3835475d9162672e2b506701b1e80fbbf/crates/bevy_cosmic_edit/src/lib.rs#L203
This is slightly wrong since one line can be spread across two or more rows, let's calculate real text height to have proper text alignment.