Embedding fonts with TextFormat and component styles
When using an embedded font with a custom TextFormat, remember that the embedFonts property of the text field to which the TextFormat is being applied must be set to true. The property defaults to false, so just setting the format of a TextField to a TextFormat containing an embedded font isn’t sufficient for the embedded font to be used.
For example:
var tfmt = new TextFormat();
tfmt.font = "MyEmbeddedFontSymbol";
myTextField.embedFonts = true; // < -- critical!
myTextField.setTextFormat(tfmt);
This also applies to fonts set through style properties. For example, if we have something like
_global.style.setStyle("fontFamily", "MyEmbeddedFontSymbol");
intended to set the global fontFamily style property for all components to use a custom font symbol, it’s necessary to set the embedFonts property as well:
_global.style.setStyle("embedFonts", true);
Without the above line, the specified font symbol will not be used in components as desired.
