-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
DrawText over a BMP 128x64 displays deformed text #134
Comments
Do you have your description correct? The left image is much smoother than the right to me? |
Yes sorry, I updated the description |
Thanks, I’ll have a look! |
This will likely be due to the fact we don't have support for font hinting... which when implemented will potentially require an (at least partially) reimplementation of our current text rasterizer. We currently try and render each glyph as few a times as possible and the hinting might cause us to offset oddly when trying to reuse an earlier raster at a new location (but we might get lucky and it turns out fine). |
I just did a quick test and antialiasing seems to correct most issues. @tocsoft would that be expected for a lack of font hinting? It looks like something is broken with horizontal alignment with either our latest Fonts builds though. This is |
yeah, anti-aliasing hides a lot of sins. |
Thanks, yep. I was just confirming the expected behavior. We wouldn't suggest antialiasing as a workaround for LCD. The only current workaround I would suggest would be to use a different font. We have an issue SixLabors/Fonts#30 that tracks hinting but will need assistance implementing it. |
This is a reasonable request, but we won't be able to make it into 1.0 (see #134 (comment)). |
Hi @josellm I've just pushed an update into the MyGet feed It would be really awesome if you could give that a spin for us and let us know if there are improvements to the output when enable. Thanks! |
Hi @JimBobSquarePants , I'm sorry for being late but we finally stand with System.Drawing using "EnableUnixSupport". With .net7 System.Drawing on linux is not supported anymore and we return to the topic. Currently this is my system configuration:
And with the current code:
Changing HintingMode with HintXY the result is: The first line seems to display better than the second line. |
@josellm Can you try 1.0.0-beta19? I did a lot of work on font hinting in SixLabors/Fonts#295 to improve output. You'll also want |
Description
I need to send a text to a 128x64 LCD display. I need to generate a bmp and draw some text over. I first use System.Drawing but due to problems with windows nano container I migrate the code to SixLabors.ImageSharp.
The resulting text with SixLabors.ImageSharp don't display smoothly like System.Drawing
Removing HorizontalAlignment and VerticalAlignment helps but it still doesn't show it correctly.
At left the version using System.Drawing, at the right using SixLabors.ImageSharp
Steps to Reproduce
System Configuration
ImageSharp.Drawing version:
SixLabors.ImageSharp Version=1.0.3
SixLabors.Fonts Version=1.0.0-beta0013
SixLabors.ImageSharp.Drawing Version=1.0.0-beta11
Other ImageSharp packages and versions: I tested with packages from MyGet with the same result
SixLabors.Fonts Version=1.0.0-beta13.5.1
SixLabors.ImageSharp Version=1.0.3
SixLabors.ImageSharp.Drawing Version=1.0.0-beta11.8
Environment: Windows 10 & Windows Nano Server
.NET Framework version: .Net 5.0
The text was updated successfully, but these errors were encountered: