Skip to content

Conversation

@u1in
Copy link
Contributor

@u1in u1in commented Dec 30, 2025

之前在 #1313 pr反馈过空格折行会触发行塌陷的问题,现在发现下划线折行也会触发行塌陷。
应该是因为下划线的上升高度为负数,作者原来的判断===没有进入,作者修改的是curRow.ascent,没有更新新行的ascent导致。
尝试修复了一下,做为抛砖引玉。

修复前(官网版本):
image

修复后:
image

Add logic to handle cases where character ascent is negative (e.g., underscores) or zero (e.g., spaces) by setting a minimum ascent value based on font metrics. This ensures proper row height calculation and prevents visual collapse of rows containing such characters.
@u1in u1in closed this Jan 5, 2026
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