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

优化 RTL 时 underline、strikeout 等绘制方案 #469

Closed
HerbertHe opened this issue Mar 15, 2024 · 1 comment
Closed

优化 RTL 时 underline、strikeout 等绘制方案 #469

HerbertHe opened this issue Mar 15, 2024 · 1 comment

Comments

@HerbertHe
Copy link
Contributor

version

0.9.98

Link to minimal reproduction

No response

Steps to reproduce

#468 在文本绘制方案的 issue 中,由于需要对每行的元素绘制队列进行二次排序,与单元素绘制 underline、strikeout 等产生冲突。

文本绘制方案改为了 按行绘制,而不是 按元素绘制

因为 underline 等样式依赖 elementPosition,因此需要在文本渲染队列重排时,在整行结束的时机触发,对 position 坐标进行重新赋值。因此 underline、strikeout 的绘制也应该在文本重排之后进行实现,需要对其 record 和 render 方法进行重构。

What is expected?

整体绘制方案改为 按行绘制,而非 按元素绘制,否则在单行文本渲染时,会导致不正确的 underline 等坐标的记录,这部分需要进行重构。

What is actually happening?

按行计算出正确的样式坐标,然后在行结束对整行进行绘制

System Info

No response

Any additional comments?

No response

@Hufe921
Copy link
Owner

Hufe921 commented Apr 1, 2024

#428

@Hufe921 Hufe921 closed this as completed Apr 1, 2024
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

No branches or pull requests

2 participants