We have a large flash site which is translated into 11 languages. We have a font loading system whereby all the characters required to display the site in each language are embedded in external swfs (so 11 swfs).
A recent update to the site requires us to use the Text Layout Framework (TLF) for one area of text display, which of course only supports fonts embedded in the new CFF format. I've attempted to embed a second instance of the font using the tag embedAsCFF="true"
, and after loading in the font SWF I can see this font is correctly registered as it shows up in the array returned by Font.enumerateFonts
.
The TextFlow instance I am using has the following properties set:
textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
textFlow.renderingMode = RenderingMode.CFF;
textFlow.fontFamily = "HeadingFontCFF";
However the text that is displayed is not finding the embedded font. It is displayed in the Times New Roman device font. I'm pretty sure I have the TLF set up correct, as when I put the [Embed]
tag in the same class (i.e. embedding in same SWF) as my TLF code, the font is displayed correctly. So it seems to relate just to fonts loaded in external SWFs.
I think this problem is related to the one listed here: Example of using embedded fonts loaded at runtime Flex 4 runtime loaded modules, although this post refers to a Flex 4 build whereas ours is a pure Flash 10 build.