Jump to content
Search Community

Tweenmax scale gives stuttering fonts

matthy test
Moderator Tag

Go to solution Solved by Carl,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am currently slowly trying to scale a box with a font in it.

 

However on IE, and Chrome, (maybe also other browsers) the font really stutters.

In Firefox, this problem does not occur. 

 

Anyone an idea what causes this and if this is fixable?

 

thanks, 

 

Matthijs

See the Pen aOKQVy by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution

Yeah, this pretty much boils down to how browsers choose to render the text while it is being transformed.

It appears that Chrome is trying to keep the text smooth by rendering it at new positions and scales (and maybe even font sizes) and you are seeing some pixel-snapping in the process.

 

It seems that if you turn backface-visibility to hidden during the animation Chrome will treat the text as a bitmap which results in smoother animation with blurry text.

 

if you choose you can toggle the backface-visibility to visible after the animation which will make the text sharp again – but you will notice a shift

http://codepen.io/GreenSock/pen/pJKQGE

 

I found this helpful demo that shows various approaches to scaling text using CSS animations: http://codepen.io/adahei/pen/fAjwi 

 

I don't think you are going to find a solution that allows for slow, smooth and crisp scaling of text ;(

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...