-
Notifications
You must be signed in to change notification settings - Fork 986
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
Graphics.DrawString result is sometimes (partially) ROT1 shifted #12446
Comments
@mnijholt, Create the project based on your description to reproduce the issue, but get the below error. Could you please modify the attached application or provide reproduce project to help repro this issue? |
Hi @Zheng-Li01 Thank you for looking into this. I am a colleague of @mnijholt . I cannot share the font file publicly. Can I send it by email? |
@baswarmerdam, thanks for your update. please have try to file feedback under https://learn.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022, then attached the reproduce application & font file in the feedback to help us to reproduce the issue. |
Hi @Zheng-Li01 I just submitted the feedback with an attached console application to reproduce the issue. See the comments in the feedback for details. |
@baswarmerdam, got it, thanks for your update, could you please share the feedback link on here. |
@Zheng-Li01 Glad you could reproduce. I am curious if this is indeed a bug in the library. Will wait for an update. |
It looks like it is related to having multiple fonts. If I just use one font for everything, the issue does not seem to occur. |
Description
We create a Bitmap using a Graphics instance that is setuo like this
We then Draw multiple items using the Graphics instance on the image. Most of then are texts using
Graphics.DrawString
. Some of them contain words other numbers or combination of them.Most of the time the result is correct but sometimes the text that is rendered on the image seems ROT1 decoded.
In the image you can see the result of the following text
08 november 2024
. The numbers are always correct but the letters are (as you can see) randomly correct or shifted one letter in the alphabet.I first thought the issue could be related to how the font file was loaded, but when texts are messed up also other texts that are drawn on the image (using the same font) are rendered correct, so that why I assume this isn't the issue. I added this to give a complete picture.
Configuration
NET8.0
Azure App Service (windows)
The text was updated successfully, but these errors were encountered: