0

Ive been looking into this issue for a while and dont seem to be getting anywhere. All the online help ive found leads to this current method, which isnt working.

I'm looping the assets of an FLA and replacing the font face. Id also like to embed the font. The embedding is not working.

if(textElement.textType != "static")
    {
        textElement.embedRanges = "1|2|3|4";
        textElement.embeddedCharacters = "àÀáÁÃóÓúÚíÍãÕõçÇêÊôÔéÉñÑüÜè";
    }

This isn't working for me. Is it meant to add the font into the library?

Thanks!

1 Answers1

1

I'm not 100% sure this is the answer, but I found this a bit interesting if you are using Adobe Flash CS5 and up:

Beginning in Flash Professional CS5, font embedding is controlled at the document level instead of the text object level. Use the fontItem.embeddedCharacters property instead of the text.embeddedCharacters property.

I hope this helps out.

Community
  • 1
  • 1
andrewdoll
  • 146
  • 5
  • Thanks! Definitely on the right track. I cant see how to create a new fontItem though. –  Oct 18 '13 at 00:03
  • fontItem is a subclass of the Item Object. I believe you will have to go through the library from the looks of it. Perhaps if item.itemType == "font" to determine if the item is a font item then use the methods of the fontItem Object on it. – andrewdoll Oct 18 '13 at 01:05
  • yes this may be the best i can do. it looks like library.addnewitem wont accept a font item. so i wont be able to embed fonts, unless i search the library for an existing font item and copy and change the properties. seems a little backwards :/ –  Oct 18 '13 at 19:44