by Alex Harui and Gordon Smith
Level 201
Deeptika writes:
If I put a chart and an embedded font used by that chart into a module, it doesn't work. It works fine with everything is in the main app. I noticed that SystemManager.isFontEmbedded() returns false when the font and chart are in a module. Isn't that a bug?
Ah yes, the wonders of embedded fonts in Flex. Flex has a fancy-shmancy embedded fonts infrastructure designed to handle just about every case imaginable, but it can often trip you up on simpler things. Sort of like the microwave oven in the break room. It knows how to defrost seven different kinds of foods, but I'll be darned if I can figure out how to heat something for twenty seconds instead of a minute.
That's what you get for eating junk that goes in a microwave. Anyway, after we covered ApplicationDomains in the last article, one might believe that everything related to modules relates to ApplicationDomains, but there's an exception to every rule.
Even the rule that there’s an exception to every rule?
Sigh. So far, there's been no exception to the rule that your office stays messier than mine. Anyway, it turns out that fonts are the exception to the ApplicationDomain rule. Fonts aren't represented by classes, and instead are part of the legacy text APIs in the Flash Player that still use the DefineFont tags in the SWF.
Read more of this article by buying Flex Authority Volume 2 Issue 2!