Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
reinhat

Animating text from "normal" to "bold" weight?

Recommended Posts

Hi,

Is it possible to animate an existing text weight from regular/normal font weight to bold style? Either in the Actionscript or Javascript version?

I have a sentence where I need to "bolden" a keyword and it would be nice to animate it with an effect rather than just switch.

Thanks, Attila

 

Link to comment
Share on other sites

There isn't a good and smooth way that I'm aware of in ActionScript or JavaScript.

 

In JavaScript you could attempt to tween the fontWeight of an element but that doesn't really work well.

 

See this demo here: http://www.w3schools.com/cssref/playit.asp?filename=playcss_font-weight&preval=bolder

 

You'll see that valid font-weights range from100 to 900 in increments of 100. Selecting the various values with the radio buttons rarely has any affect as its unlikely that a font is going to be available in all those weights. At best you may get a jittery change in fontWeight, but again I don't think its what you are after. 

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.
×