I’ve asked about this before and have found many posts. I am going to ask again because i still don’t understand this. Please keep in mind i am developing for a stand alone kiosk computer, so I am not concerned about fonts on another user’s machine or download time.
I want multiple fonts and font sizes/styles in a dynamic textfield using an embeded font. The text field uses a drop shadow filter.
Heres what I’m doing:
-
Created dynamic tf in a movie clip. The movie clip is on the stage of the main timeline. (btnsLoader_mc.header_txt).
-
Created a font symbol in library (Arial Rounded MT Bold, linkage id: “Arial-Rounded-Bold-24”)
-
Using following code:
btnsLoader_mc.header_txt.autoSize = true;
btnsLoader_mc.header_txt.html = true;
var header1:TextFormat = new TextFormat();
header1.font = "Arial-Rounded-Bold-24";
btnsLoader_mc.header_txt.embedFonts = true;
btnsLoader_mc.header_txt.htmlText = "<font size = '12'>Activities</font> At This Park";
btnsLoader_mc.header_txt.setTextFormat(header1);
Now, this only works if i add at least a “space” to the textfield in the authoring environment. If i don’t add a space or some letters, it doesn’t work. Adding “dummy” text fields to the main timeline off stage with type in them doesn’t work either.
Furthermore, this forces the entire text field to be one font.
I guess my first question is: Why the f… is this so complicated? Does this even get worse when i throw CSS into the equation?
Do i really need to have a font symbol in the library?
Does it matter whether I have the font “Arial Rounded MT Bold” versus “Arial-Rounded-Bold-24” selected from the font drop down in the properties for the textfield?
Is there a definitative tutorial (or post) on this subject (embedded fonts + dynamic textfield + html + css) somewhere??