Skip to content

avoid overlapping transparent background #3334

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

Merged
merged 5 commits into from
Apr 26, 2025
Merged

Conversation

adipose
Copy link

@adipose adipose commented Apr 12, 2025

The overlap bug caused by italics (see #3288) is a result of breaking the line into words due to the different font style. Each word is separately given an opaque bg and shadow. The thicker the border, the more it overlaps. If the bg is transparent, it will layer and look bad.

What this patch does is attempt to create a single "line" word for purposes of the background drawing, after verifying that the string of words is really a single split line (it assumes this is the case if all the properties match except font decoration--it could possibly be improved to validate the words came from a single split line).

If the creation is successful, it will create a single draw call instead of drawing each word separately. The draw functions are simplified versions of the word ones (possible code reuse, but it is probably not worth refactoring to do it).

Note: this does not solve vertical overlaps.

image

image

@clsid2
Copy link
Owner

clsid2 commented Apr 15, 2025

Should be ok. Will merge after upcoming release to give it some more testing time.

Repository owner deleted a comment from bibsp Apr 16, 2025
@clsid2 clsid2 merged commit 96f7398 into clsid2:develop Apr 26, 2025
@adipose adipose deleted the patch513 branch May 23, 2025 23:21
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.

2 participants