Skip to content
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

freetype rotation rendering bugfix #630

merged 1 commit into from Nov 23, 2018


None yet
3 participants
Copy link

CAIQT commented Nov 20, 2018

The bug #629 is caused by the mistaken cache key calculation.

@CAIQT CAIQT changed the title Fix issue #629 freetype rotation rendering bug Nov 20, 2018

@CAIQT CAIQT changed the title freetype rotation rendering bug freetype rotation rendering bugfix Nov 21, 2018


dlon approved these changes Nov 22, 2018

Copy link

dlon left a comment

Unrelated: I also found that it segfaults for (large) negative angles, but that happened before as well.

@@ -63,7 +63,7 @@ set_node_key(NodeKey *key, GlyphIndex_t id, const FontRenderMode *mode)
KeyFields *fields = &key->fields;
const FT_UInt16 style_mask = ~(FT_STYLE_UNDERLINE);
const FT_UInt16 rflag_mask = ~(FT_RFLAG_VERTICAL | FT_RFLAG_KERNING);
unsigned short rot = (unsigned short)FX6_TRUNC(mode->rotation_angle);
unsigned short rot = (unsigned short)(((unsigned int)(mode->rotation_angle))>>16);

This comment has been minimized.

Copy link

dlon Nov 22, 2018


Might be cleaner or more consistent to use a macro? #define FX16_TRUNC(x) ((x) >> 16)


This comment has been minimized.

Copy link

illume commented Nov 23, 2018

For the large angles, perhaps we could use a mod function on the angle first.

>>> -10810 % 360

@illume illume merged commit 1306b4b into pygame:master Nov 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@dlon dlon referenced this pull request Mar 23, 2019


1.9.5 release notes. #561

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.