Embedding diacritics problem

Hi,

PROBLEM: I have letters like ľščťž (and others) which i want to EMBEDD in my swf using Tahoma fonts. So i create Tahoma font, Export for AS, Export in the first frame, no bold, no italic, no alias, And when i use it in my textfield (embedFonts=true), It does NOT display those letters mentioned above.

Any suggestions?
Thanks!

I assume you are creating the whole thing in ActionScript, like…

var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Tahoma-Embed"; //or whatever you are calling it

this.createTextField("my_txt", this.getNextHighestDepth(), 50, 50, 160, 120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "ž"; // or unicode "\u017E"
my_txt.setTextFormat(my_fmt);

I was unable to get this to work using pure ActionScript. Some characters would work, like the copyright symbol, but most would not. The only way I could get the desired characters to display was to…

  1. “draw” a dynamic text field on the stage, making sure to give it a name like ‘myText’
  2. choose the font
  3. click the Embed button and select which characters/character sets you want to embed
  4. in ‘actions’ layer, enter 'myText.text = “ľščťž”'
    The characters you select to embed should be exported. I am assuming this because they show up in the size report. I did not test this on another machine without the selected font installed.

I hope that offers some help.

Anyone know how to embed the characters using pure ActionScript?

-Brian

You can make the textfield HTML and then type the equiveket in html markup of the special characters:)

But wouldn’t the HTML be displayed in a system font if the target machine didn’t have the correct font installed?
Displaying special characters isn’t the problem, it’s getting them to display in the correct font.
It seems like there should be a way to embed specific characters or sets via ActionScript…

nope, although the text system got an overhaul in F8, it still lacks a few things. And yes HTML markup in a textfield is not real HTML, it is a way to read tags. You can choose an embedded font for the html and use the specail characters:)

Sorry, I should have stated the “parsed” HTML in my response.

I am confused by which statement is ‘nope’ and which is ‘yes’. Are you saying that the text system in F8 does not include a method of specifying embedded character sets? That is what I think I see.

Also, how would you go about selecting the embedded font for the textfield that will parse the HTML? Would this have to be done using the Embed button while the textfield is selected, or is there another way?

Thanks guys, a great talk, exactly what i like to hear…

tradnairb: Yes, i created those TFs purely with AS as your example shows… and Yes! also tested embedding those special characters manually, into on-stage created TF … which is… sad if you HAVE TO do, IMO. Sad because i imagine being able to do in AS, anything which can be done on-stage and more … :slight_smile: this seems to be opposite. I would welcome some method like my_tf.embeddSpecial = “ľščťž”; or smthng like that :slight_smile: which evidently those on-stage created TFs do have.

defective: you are not. :stuck_out_tongue: but really, thanks for response; HTML markup is OK, only not in my project at the moment. I am building a system which will allow user to easily modify flash add/remove stuff/save changes and also modify external HTML files/VYSIWYG. And the need of using HTML markup language for special chars, that is only additional worry for the user, and that is what i care most to remove from the system. But thanks, didnt think of that :slight_smile: will use somewhere else :wink:

Cheers guys! keep on the good worD :stuck_out_tongue: