actionscript 3 - AIR Mobile Embedded Font -
i trying change default font of text field in air mobile app.
dos first embed font using line:
[embed(source='c:/windows/fonts/arial.ttf', fontname="_arial", mimetype="application/x-font-truetype")] after that, create textformat font: style.font = "_arial"; , set text field: tf.settextformat(style);
sadly, font not change.
knows doing wrong?
you need use:
tf.defaulttextformat = style; there differenced between defaulttextformat , settextformat
update:
not sure why not working have there, managed make working, replace font embedding line this:
[embed(systemfont="arial", fontname="_arial", mimetype="application/x-font-truetype", embedascff="false")]
Comments
Post a Comment