4 Attachment(s)
Can't get font styles to work
I've added the 'Bembo Std' font into my Library, set the character ranges, the font style and gave it a name:
Attachment 74207
Gave it an AS linkage:
Attachment 74209
Did the same for the Bold version of Bembo Std:
Attachment 74211
Attachment 74213
Now I want to create a textfield using Bembo Std AND use the html bold tag on it. So I'm using this code:
Code:
var textFormat:TextFormat = new TextFormat();
textFormat.bold = true;
textFormat.size = 30;
textFormat.font = "Bembo Std";
this.createTextField("my_txt", 1, 10, 10, 400, 200);
my_txt.html = true;
my_txt.embedFonts = true;
my_txt.setNewTextFormat(textFormat);
my_txt.htmlText = "This is <b>just</b> some text";
Which just gives me a line of text in all regular style characters, no bold.
Then I tried it using this line, to reference to the library font:
Code:
textFormat.font = "BemboRegular";
Same thing, all regular style characters.
Finally I tried:
Code:
textFormat.font = "BemboBold";
This time I'm getting all bold characters.
What am I missing here? What do I have to do to get the Bembo Std embedded font working AND make it use the bold tags? I've tried it with several fonts but the result always is the same. I can't get both regular and bold tags used in the same textfield.
Am I doing something wrong? By the way, I know I could try css, but I'd like to know why it doesn't work like this. As far as I can tell I do everything like it is documented.