2 Replies Latest reply on Sep 21, 2010 9:49 AM by Flex harUI

    Flex Bug? s|global and mx|global conflict with eachother!

    RandomReado Level 1

      I'm trying to set a global font in my application. I've defined some CSS as follows:

       

      /* CSS file */
      @namespace s "library://ns.adobe.com/flex/spark";
      @namespace mx "library://ns.adobe.com/flex/mx";

      @font-face {
           src: url('fonts/daxRegular.ttf');
           fontFamily: Dax;
           embedAsCFF: true;
      }

      @font-face {
           src: url('fonts/daxMedium.ttf');
           fontFamily: Dax;
           fontWeight: bold;
           embedAsCFF: true;
      }

      @font-face {
           src: url('fonts/daxRegular.ttf');
           fontFamily: DaxNoCFF;
           embedAsCFF: false;
      }

      @font-face {
           src: url('fonts/daxMedium.ttf');
           fontFamily: DaxNoCFF;
           fontWeight: bold;
           embedAsCFF: false;
      }

      s|global {
           font-family: Dax;
      }

      mx|global {
           font-family: DaxNoCFF;
      }

       

      So by rights all the Spark components receive the Dax font that has embedAsCFF set to true, and MX with embedAsCFF set to false. However all the Spark components, including those in the main application (Spark) are returning errors as follows:

       

      warning: incompatible embedded font 'DaxNoCFF' specified for spark.components::Label (Label6) . This component requires that the embedded font be declared with embedAsCff=true.

       

      This warning makes no sense since I've specified s|global to use Dax which has embedAsCFF set to true. The MX components are using the Dax font as expected but Spark is defaulting to Times New Roman.

       

      Does anyone know why this is happening? Thanks in advance.