textfield embedded font only adjusts according to textfield height
i would just like to ask why is the case that开发者_JAVA百科 when i use embedfonts = true on a textfield, the textfield's text only resizes according to the textfield's height but not the textfield's width. meaning if i make the textfield's height bigger, the text also gets bigger in terms of height, but not width, can't the embedded font maintain aspect ratio according to the textfield height?
I'm only wondering about this because this is not the case when embedfonts= false
There are only two kinds of TextFields you can modify using ActionScript: DYNAMIC and INPUT. Both are intended to react to a change in size by rearranging the characters, but not resizing them. I'm not sure why you are getting this resize effect at all, but I would guess it is related to some problem with the embedded font.
If you want to resize your font characters along with the TextField, i.e. stretch or skew the text, you should either use the scaleX
or scaleY
properties instead of width
and height
, or create a container Sprite, add the TextField as a child to it and resize the entire container instead of the TextField.
精彩评论