views:

292

answers:

0

I am just programming a language learning app in Flex for various Asian languages. As some of these languages have very big font sizes (e.g. Chinese), I do not want to load all these fonts into the app. at once but was thinking to put them into different modules and then load only the specific module (depending on which language is chosen in the main app). For this I moved the style part from the main app:

<mx:Style>
@font-face 
    {
    font-family:DedicatedFont;
 src: url('assets/fonts/cma.ttf');
    fontStyle: normal;
    font-weight: normal;
    }
</mx:Style>

into the different modules. Above one is e.g. for the Chinese font (cma.ttf).

The modules are created and I can also use the fontstyle (DedicatedFont) in the module itself, but I can not access it from my main application.

Could anybody pls tell me how I can load this module into my main app and then use the DedicatedFont style in my main app.