views:

24

answers:

0

I've got an application that loads multiple modules and according to this document, styles should be inherited (possibly only if they are in the same ApplicationDomain which they are in my case.)

This seems to hold true, except for embedded fonts. It seems as though I'm unable to use embedded fonts in my modules, when those fonts have been declared in the main application.

Now, it's worth noting that I've had to declare the following style in order to make spark components use cff rendered fonts (while halo components use the old way):

s|global
{
    font-lookup: auto;
    rendering-mode: cff;
}

I've observed a few ways to "fix" this:

  1. Use the fonts in the main application at least once (small initial performance overhead.)
  2. Declare the fonts in each of the modules that are to be loaded (unacceptable per-module file size)
  3. Specify type selector styles instead of global styles, like so:

    s|Label /* Do this for any component that needs to use cff fonts */
    {
        font-lookup: auto;
        rendering-mode: cff;
    }
    

The last method is the most graceful in my opinion, but tedious and error prone. Is there any reason why the global selector shouldn't work?

Note that it doesn't matter if I type global instead of s|global.