Embedded font works in AIR but not SWF
I have one code base, which my AIR and web application both use. In the AIR app, the font is used and rendered as expected. In the web app, the font is not the same as the AIR application's font. Why is this, since they are using the same code base and assets?
The embedded font is in a external SWF and is embedded via a CSS file, example:
@11220649-face {
src: url("/../assets/flash/EducationFonts.swf");
fontFamily: TimesDF4;
embeddAsCFF: true;
}
And the AIR and web application both output the same message from this function:
private function enumerateFont():void
{
var myEmbeddedFonts:Array = Font.enumerateFonts(false);
var f:Font;
for (var i:int=0; i<myEmbeddedFonts.length; i++)
{
f = myEmbeddedFonts;
trace (i+"---"+f.fontName+"---normal/normal = "+FontDescription.isFontCompatible(f.fontName, "normal", "normal"));
trace (i+"---"+f.fontName+"---normal/italic = "+FontDescription.isFontCompatible(f.fontName, "normal", "italic"));
trace (i+"---"+f.fontName+"---bold/normal = "+FontDescription.isFontCompatible(f.fontName, "bold", "normal"));
trace (i+"---"+f.fontName+"---bold/italic = "+FontDescription.isFontCompatible(f.fontName, "bold", "italic"));
trace("");
}
}
