In Flash 8.If I use a special开发者_如何转开发 font to display a label for dynamic text(the content is updated at runtime) is there a way to automatically install this font if not already installed?
you need to embed you font so itll show up on a computer that doesnt have it installed. if you're using the flash ide, you can select your textfield and click on the embed fint (or embed characters) button beside it. select the characters you want (e.g. only numbers, small letters, basic latin) and you're good to go.
if you're using code only, then you can still do it using the Embed metatag (at least i think so, it's been a while since i used it)
something like
[Embed(source="../someFont.ttf",
fontName = "myFont",
mimeType = "application/x-font",
fontWeight="normal",
fontStyle="normal",
unicodeRange="englishRange",
advancedAntiAliasing="true",
embedAsCFF="false")]
private var myEmbeddedFont:Class
to use it, create a textformat object with the font set to the fontname that you specified above. for more in depth, check out http://divillysausages.com/blog/as3_font_embedding_masterclass
You are using Flash 8, so the code embed suggestion above won't work. You can only embed fonts which selected characters. From what i remember Flash 8 doesn't has a panel to select characters to be embed, in that case, just create a dummy dynamic textfield and fill it with all the characters you need.
Remember not to select use device fonts, any other options will works.
精彩评论