Groups | Blog | Home
all groups > flash actionscript > july 2007 >

flash actionscript : How to use an embeded font in an input field


MCR
7/16/2007 4:40:34 PM
I've embed a font called Bliss 2 Light in my library and it has a linkeage name
of bliss_light. I have an input field on the stage and in the font pull down
menu it shows the font as bliss_light* But when run on a pc without this font
it defaults to a times roman style font.

What stage have I missed out to make the input filed use this font at runtime?

TIA

Kevin
dzedward
7/16/2007 4:49:10 PM
MCR
7/16/2007 5:26:07 PM
dzedward
7/16/2007 5:46:12 PM
MCR
7/16/2007 6:30:50 PM
kglad
7/16/2007 6:38:00 PM
either use actionscript to embed your font or use the authoring environment to
embed the font. you're using a mixture of both and can expect failure.

which way do you want to do it, code or authoring environment?
dzedward
7/16/2007 6:40:50 PM
where in your original post do you state that you embedded the font first, then
created the text field on stage? "Can't recall exactly but sure the fonts
where already embedded." this is like a double negative, first you say you cant
recall which you did first, then you say you're sure you did.. you can see how
this becomes confusing to help. try: //my_txt is instance name
tfor = new TextFormat();
tfor.font = "bliss_light";
my_txt.embedFonts = true;
my_txt.setTextFormat(tfor);
MCR
7/16/2007 7:04:05 PM
In my original message I said

"I've embed a font called Bliss 2 Light in my library "

But semantics to one side it's the fact that the font is embedded in the
library as it is used both in code, for several components use, and by text
fields placed on the stage at authoring level. SO I need to understand why the
input text field is not picking up the embedded font.



dzedward
7/16/2007 7:12:19 PM
kglad
7/16/2007 7:18:47 PM
MCR
7/19/2007 12:00:00 AM
Hi dzedward,

I don't want to use code for my field as it's a large programme with many text
fields and is to be mainly maintained by designers who can't handle these kind
of elements in code form so I'm trying to use the author level interface.

Then kglad states "you can't use an embedded font in the library in a text
field placed at authoring time". I think this is wrong as Flash shows the font
in the pull-down menu for the properties of the text field and adds a * to the
name to denote it is embed in the library.

So I'm still trying to understand why a feature mentioned in the flash help
and several books I've read on the subject over the years is not working.
AddThis Social Bookmark Button