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

PR: Disable font hinting to mitigate tremulous spinning to some extent #203

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

kumattau
Copy link
Contributor

Hi @dalthviz.

This PR is to mitigate #39 to some extent.

As #202 (comment), the method using QRawFont and QPainterPath does not support all fonts supported by QFont.
So, I think the method is optional.

Even if QFont is used, by disabling font hinting, the tremulous spinning seems to be mitigated to some extent.
So, I think it is better that the font hinting is disabled as default when animation.

left: default (enable) hinting, right: disable hinting
Animation

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kumattau for keep checking into this! I left a comment to add a reference to the issue here. Otherwise this LGTM 👍

@@ -140,7 +140,10 @@ def _paint_icon(self, iconic, painter, rect, mode, state, options):
if animation is not None:
animation.setup(self, painter, rect)

painter.setFont(iconic.font(prefix, draw_size))
font = iconic.font(prefix, draw_size)
if animation is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment here referencing the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the comment "Disable font hinting to mitigate tremulous spinning to some extent".
Is it as expected?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good 👍 it's just missing the addition of something like See spyder-ide/qtawesome#39 at the end

Copy link
Contributor Author

@kumattau kumattau Feb 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more See spyder-ide/qtawesome#39 at the end.

@dalthviz dalthviz added this to the v1.2.0 milestone Feb 28, 2022
@dalthviz dalthviz changed the title [PR] Disable font hinting to mitigate tremulous spinning to some extent PR: Disable font hinting to mitigate tremulous spinning to some extent Feb 28, 2022
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kumattau !

@dalthviz dalthviz merged commit 9af5b13 into spyder-ide:master Feb 28, 2022
@kumattau kumattau deleted the nohinting branch February 28, 2022 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants