Fontsize + viewport + trim
Posted: 2012-04-11T08:37:12-07:00
Hey guys,
I have a problem. I'm trying to create a picture using a user's text and font size. Unfortunately, I don't know the font size, font type and text length before creating a picture.
So I have to predefine somehow "-size" and "option:distort:viewport" options. But how? How to determine the width and height of the image I will need for this picture?
For example, I have text "I love you", font "Aactionman" and font size 50. What's next? I don't want to create a very big image since "-trim" option for some reason doesn't trim animations. If I would know the width and height of each letter in a font I would calculate image dimensions, but I don't know...
I have a problem. I'm trying to create a picture using a user's text and font size. Unfortunately, I don't know the font size, font type and text length before creating a picture.
So I have to predefine somehow "-size" and "option:distort:viewport" options. But how? How to determine the width and height of the image I will need for this picture?
For example, I have text "I love you", font "Aactionman" and font size 50. What's next? I don't want to create a very big image since "-trim" option for some reason doesn't trim animations. If I would know the width and height of each letter in a font I would calculate image dimensions, but I don't know...