Jump to content
GreenSock

Marcel

Scaling a Flex RichText Component / determine the font size

Recommended Posts

Hi everybody,

 

I'm using the Flex Version of the TransformManager to scale a Spark-RichText-Component. I got the 'contrainScale' property set to true and the 'scaleMode' set to SCALE_NORMAL.

 

The scaling works fine but what I need to determine is the new corresponding font size.

 

I also thought about calculating the font size depending on the components new width or height, with the scaleMode set to SCALE_WIDTH_AND_HEIGHT. Can't figure it out, any help appreciated.

 

Thank you, regards

Marcel

Link to comment
Share on other sites

If your scaleMode is SCALE_NORMAL, wouldn't it be as simple as multiplying the font size by the scale? For example, if the font is 12px and the scale is 2, the actual font size would be 24.

Link to comment
Share on other sites

Thank you very much! It really was that simple. Works perfectly in combination with AlivePDF.

 

Regards

Marcel

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