Weird Stuff with Embedded Fonts
After several hours trying to find why embedded fonts didn't work in my application any more (they were working fine) I found the source, something that looks like a bug.
If I add a spark component, like a textarea, to the display objects list, the embedded fonts don't work in a textFlow / ContainerController / EditorManager setup. The embedded fonts work on all spark components but the sprite container controlled by the TextFlow.
Any Ideas?
BTW, this is how I'm embedding the fonts:
package
{
import flash.text.Font;
import flash.text.engine.RenderingMode;
public class RockwellFont
{
[Embed(source='assets/fonts/rock.ttf', fontName='RockwellV', mimeType='application/x-font', embedAsCFF="true" )]
private static var standardF:Class;
[Embed(source='assets/fonts/rockb.ttf', fontName='RockwellV', fontWeight="bold", mimeType='application/x-font', embedAsCFF="true")]
private static var boldF:Class;
[Embed(source='assets/fonts/rocki.ttf', fontName='RockwellV', fontStyle="italic", mimeType='application/x-font', embedAsCFF="true")]
private static var italicF:Class;
[Embed(source='assets/fonts/rockbi.ttf', fontName='RockwellV', fontWeight="bold", fontStyle="italic", mimeType='application/x-font', embedAsCFF="true")]
private static var bolditalicF:Class;
public function RockwellFont()
{
Font.registerFont( standardF );
Font.registerFont( boldF );
Font.registerFont( italicF );
Font.registerFont( bolditalicF );
}
}
}
