Hi - We are in the situation where in embedded fonts are not working for TLF. We embed the fonts in the css file with embedAsCFF as false. It shows the fonts fine in the mx combobox component but not in TLF.
We tried to do a AS way of embeding font as below in the initial mxml, so that it gets available when textregion is created dynamically.
[Embed(source="/assets/fonts/font1.ttf", mimeType="application/x-font-truetype", fontName="CrownRoman",
public static const font1:Class;
But this is not helping either. Fonts are not getting embedded.
I tried to use(as explained in one of the solutions in the internet)
var uic:UIComponent = UIComponent(FlexGlobals.topLevelApplication);
textFlow.flowComposer.swfContext = ISWFContext(uic.getFontContext(textLayoutFormat.fontFamily, false, false, true));
but it gives me complier error "Attempted access of inaccessible method getFontContext through a reference with static type mx.core:UIComponent"
Pls help me in solving this. Its very critical. Any help is appreciated. Can anyone share some example.
Let me know if you need more details.
Add import mx.core.mx_internal at the END of your imports
then call getFontContext like this: mx_internal::getFontContext(textLayoutFormat.fontFamily, false, false, true);