‘W’ Arial text cut off fix for as2 and as3
Three times today while browsing the internet I saw the front part of “W” get cut off in a swf, so I thought I would post one way to deal with this.
All that you need to do is set your TextFormat leftMargin to .6. Not entirely sure why its .6, but I checked and in both as2 and as3 .6 solves it and .5 does not. Most likely it is rounding to 1 pixel, but I have found .6 can be farther to the left than setting it to 1. The reasoning for making it as small as possible is so that you can do it to all TextFormat instances used on dynamic TextFields without shifting text throughout your app to the right.
So in both as2 and as3 -
var tf:TextFormat = new TextFormat();
tf.leftMargin = .6;
textFieldYourUsing.setTextFormat(tf);
Here is an example in as3 -
Here is an example in as2 -
You can grab the not very interesting source code here.