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

settextformat

defaulttextformat

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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -