-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
One extra newline is not added when 2 explicit newlines are specified #434
Comments
Both are rendering as expected. The first new line is negated by the wrapping at the final |
Yes but in the first case, the second newline should cause a blank line. In the second case, the third newline should cause a second blank line. The only reason for wrapping text is that there's not enough room to display the text that you need to render. In the first case, there is enough space to display "- Lorem ipsullll". IMHO the error is that ImageSharp thinks that any wrapping is needed here in the first place. Because there's enough space to render that, it shouldn't wrap, and normal processing should apply for "\n\n", which is two newlines = 1 blank line. |
How about you open a PR. It’s midnight here. |
Sure, I might take a look at the code when I'm less busy. But I thought the idea of a bug report was to establish what the actual and intended behaviour was before making changes. I'm just saying: two newline characters have been explicitly specified. I don't see any circumstance where it makes sense not to render both of them. |
I'm working on this. It's taking a complete rewrite of the line breaking algorithm so might be a few days. |
Prerequisites
DEBUG
andRELEASE
modeFonts version
2.0.7
Other Six Labors packages and versions
SixLabors.ImageSharp 3.1.6, SixLabors.ImageSharp.Drawing 2.1.4
Environment (Operating system, version and so on)
Windows 10
.NET Framework version
.NET 9
Description
After fix #433, another issue has been created; now, a second explicit newline is not added when it should be. See repro program below.
Steps to Reproduce
Images
The text was updated successfully, but these errors were encountered: