Avoid edge bleeding in small font size ( attempt 2 ) #374
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A second take after #372
This time I'm using premultipliedAlpha and custom blending logic and for colors without an opacity I get much better results when it comes to edge bleeding.
A few examples
Far left is the current Troika, middle is with this PR logic enabled, right is an SVG with equivalent settings.
But if I use some transparency in the fill, the blending doesn't follow the same logic anymore. And while there is no bleeding, it's not the color the user would expect.
You can see it here, white text with 0.5 opacity on red background.

The expected blend result


The blend result of this PR
I'm opening this PR to share with other, so someone might help with the last step or invalidate the idea based on some knowledge I don't have.