-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
fixes #175 - Text gets chopped when rotated >60 degrees. #191
fixes #175 - Text gets chopped when rotated >60 degrees. #191
Conversation
The glyph size is not rendered with enough space when rotated, this fixes the issue at all rotation angles
Thanks for this! I tried to push some fixes to your tests but Git LFS and GitHub don't work well together and won't let me do so. I'll comment with the required changes instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't really comment on the fix but have spotted some issues with the tests which are causing the offset your seeing. I've commented with the fixes.
src/ImageSharp.Drawing/Processing/Processors/Text/DrawTextProcessor{TPixel}.cs
Show resolved
Hide resolved
@replaysMike Can you please do me a favor and update the following reference image? There's an invisible to the eye (0.0001%) diff being reported on our Windows CI build for this image and I can't get GitHub to let me make the change in your fork. Once that's updated and we have running tests I'll get this merged. Thanks! |
will do thanks! I was just re-looking into this issue glad you already found the problem. |
…ttps://github.com/replaysMike/ImageSharp.Drawing into bugs/mbrown/issue175-text-gets-chopped-when-rotated
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
=====================================
Coverage 70% 70%
=====================================
Files 87 87
Lines 5116 5116
Branches 1062 1062
=====================================
+ Hits 3593 3595 +2
+ Misses 1308 1307 -1
+ Partials 215 214 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Let's get this merged! Thanks again! |
The glyph size is not rendered with enough space when rotated, this fixes the issue at all rotation angles
Prerequisites
Description
The font glyph isn't rendered with enough space to allow for text rotations. I modified the code that adjusts for that as part of the offset. Tested with a large range of fonts at varying rotations, and added appropriate tests for comparing expected output.
These tests will likely need to be modified when a fix is present for why rotated text gets offset shifted horizontally.