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

Underline is coming over the text #888

Open
KingJS416 opened this issue May 10, 2024 · 10 comments
Open

Underline is coming over the text #888

KingJS416 opened this issue May 10, 2024 · 10 comments

Comments

@KingJS416
Copy link

In the latest version 2024.3.3 & 2024.3.4, when using the Underline getting the line bottom close to the text and it seems like the underline is bolded.

new

If I go back to 2023.12.6, the Underline is working correctly with correct thickness

oldversion

Could you please help in fixing this

@screwyourshelf
Copy link

i have noticed this to - also. i'm not able to assign other color to the underline.

@MarcinZiabek
Copy link
Member

Would you please share what font you are using? Specific fonts do not contain information regarding underline decoration position and thickness. Legacy QuestPDF attempted to use a reasonable default configuration. The new text-rendering algorithm, based on Skia SkParagraph (the same one used in Flutter), is more strict in following various standards. I am happy to investigate though what could be done.

@screwyourshelf
Copy link

screwyourshelf commented May 11, 2024

@MarcinZiabek in my case - i didnt specify decorationcolor of my underline, when i did that the line below was correctly displayed (color) /thanks

@KingJS416
Copy link
Author

Tahoma, Arial & TimesNewRoman were the fonts I used, and for all these 3 I have the issue

@MarcinZiabek
Copy link
Member

What runtime and operating system are you using?

@KingJS416
Copy link
Author

i'm using Windows 11.

Also as mentioned, if i go back to 2023.12.6, the underline is working fine.

@KingJS416
Copy link
Author

Hi, is there any update on this?

@MarcinZiabek
Copy link
Member

Okay, it was much simpler than I thought. All I needed was a fresh look at the problem. It turns out that the library used double underline thickness by default. Starting from the 2024.3.9 release, everything should be as expected.

Could you please test the new version? Thank you for the collaboration!

@199621616
Copy link

@MarcinZiabek 我的需求,可能比上面这些要稍复杂一些。希望可通过Underline(true)方法增加参数,或者使用另外的方法,可控制下画线与字符行的距离。至少,下划线与字符行的距离可再增大,可起到“修饰”作用,使整体状态可更美观,而不仅仅是“下划线”。

@MarcinZiabek
Copy link
Member

@199621616 Thank you for your suggestion. Each font declares the appropriate underline position and thickness, which are chosen by its author for visual clarity and consistency. The library currently relies on these default values and does not offer a way to modify them. While providing this option could be an interesting feature, it is not on the current roadmap at this time.

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

4 participants