I realize this topic is over discussed , but I have searched the
archives and the documentation and could not find anything usefull. It
seems to me embeding is a little bit problematic?
I have manage to use my embeded fonts within the htmlText property
and use them with the setStyle method. When I use my embeded fonts
within htmlText , I can use only embeded fonts , otherwise ,if i also
use system fonts , my text gets rendered with a standard font or
vanishes.
When I try to use a TextFormat object with a TextField , it doesn't
work at all. (embedFonts is set to true)
for example :
...........
[Embed(mimeType='application/x-font', source='path/FOO.TTF',
fontName='My Custom Font')]
private var myCustomFont:Class;
var label:UITextField = new UITextField();
label.embedFonts = true;
label.autoSize = TextFieldAutoSize.LEFT;
label.background = true;
label.border = true;
label.text = "Some test";
var format:TextFormat = new TextFormat();
format.font = My Custom Font";
format.color = 0xFF0000;
format.size = 10;
label.defaultTextFormat = format;
addChild(label);
...........
This piece of code displays standard text , but if I create a label
and I do something like:
lbl2.setStyle( 'fontFamily','My Custom Font');
lbl2.setStyle('fontSize','64');
.. It works.
The embeding examples in the documentation show how to use the
fonts with setStyle aproach , but I have found no valid example(or
missed) in the documentation about how to do this without the setStyle
method. The TextField and TextFormat API look like embeding is not a
problem and it is available ... but , it is not ?
Regards.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/