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

Fix transparency in ab_glyph renderer #44

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

Friz64
Copy link
Contributor

@Friz64 Friz64 commented Nov 10, 2023

The ab_glyph documentation states:

A coverage value of 0.0 means the pixel is totally uncoverred by the glyph. A value of 1.0 or greater means fully coverred.

On my machine, this currently results in too high of a alpha value in "self-overlapping" areas, as is especially noticeable in the 'x' and 't' in the following screenshot:

image

This PR makes it look correct:

image

@Friz64 Friz64 force-pushed the transparency-ab-glyph branch from 56797cc to 9d9450a Compare November 19, 2023 11:55
@Friz64
Copy link
Contributor Author

Friz64 commented Nov 19, 2023

Couldn't reproduce this on my laptop, even though it uses the same default font as my development box. I don't know why this is the case. Either way, we previously skipped over a detail in ab_glyph, and this PR corrects that.

Copy link
Owner

@PolyMeilex PolyMeilex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

@PolyMeilex PolyMeilex merged commit 35a769a into PolyMeilex:master Nov 20, 2023
6 checks passed
@PolyMeilex
Copy link
Owner

Thanks!

@Friz64 Friz64 deleted the transparency-ab-glyph branch November 20, 2023 07:53
@Friz64 Friz64 mentioned this pull request Nov 27, 2023
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