Fix: ensure stroke is applied to all lines in multiline text with emojis #45
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.
In the original implementation, there was logic that set
stroke_width
to 0 during the text rendering process in the getmask2 function call. This caused subsequent lines of text to lose their stroke, as the stroke width was effectively disabled after the first line.The fix involved removing the part where stroke_width was set to 0 after the stroke was applied. By doing this, the stroke_width parameter is preserved across all lines of the multiline text, ensuring that each line has its proper stroke.
Additionally, the
stroke_width
argument was removed from thegetmask2
call. This ensures that the stroke is applied consistently throughout all iterations when rendering the text. Instead of resetting the stroke for each line, the value of stroke_width remains intact, allowing the stroke to be applied uniformly to each line of text, including those that come after the first line.This change ensures that the stroke is not lost when processing multiple lines of text, which was the core issue when rendering multiline text with emojis.
Summary by Sourcery
Bug Fixes: