2 Replies Latest reply on Aug 27, 2010 1:09 AM by untemps

    Font randomly loaded

    untemps

      Hi,

       

      In my application, I load fonts like this :

       

       

      <fx:Style> 
                      @namespace mx "library://ns.adobe.com/flex/mx"; 
                      @font-face { 
                              src: url("..\docs\fonts\arial.ttf"); 
                              fontFamily: "Arial"; 
                              unicodeRange:"U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U 
      +005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+20AC-U+20AC,U+00A3-U 
      +00A3,U+00B2-U+00B2,U+00F9-U+00F9,U+00E0-U+00F6,U+00A9"; 
                              embedAsCFF: false; 
                              advancedAntiAliasing: true; 
                      } 
                      @font-face { 
                              src: url("..\docs\fonts\arialbi.ttf"); 
                              fontFamily: "Arial"; 
                              fontWeight: bold; 
                              fontStyle: italic; 
                              unicodeRange:"U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U 
      +005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+20AC-U+20AC,U+00A3-U 
      +00A3,U+00B2-U+00B2,U+00F9-U+00F9,U+00E0-U+00F6,U+00A9"; 
                              embedAsCFF: false; 
                              advancedAntiAliasing: true; 
                      } 
                      @font-face { 
                              src: url("..\docs\fonts\ariali.ttf"); 
                              fontFamily: "Arial"; 
                              fontStyle: italic; 
                              unicodeRange:"U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U 
      +005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+20AC-U+20AC,U+00A3-U 
      +00A3,U+00B2-U+00B2,U+00F9-U+00F9,U+00E0-U+00F6,U+00A9"; 
                              embedAsCFF: false; 
                              advancedAntiAliasing: true; 
                      } 
                      @font-face { 
                              src: url("..\docs\fonts\arialbd.ttf"); 
                              fontFamily: "Arial"; 
                              fontWeight: bold; 
                              unicodeRange:"U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U 
      +005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+20AC-U+20AC,U+00A3-U 
      +00A3,U+00B2-U+00B2,U+00F9-U+00F9,U+00E0-U+00F6,U+00A9"; 
                              embedAsCFF: false; 
                              advancedAntiAliasing: true; 
                      } 
                      @font-face { 
                              src: url("..\docs\fonts\arialbd.ttf"); 
                              fontFamily: "Arial"; 
                              fontWeight: normal; 
                              unicodeRange:"U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U 
      +005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+20AC-U+20AC,U+00A3-U 
      +00A3,U+00B2-U+00B2,U+00F9-U+00F9,U+00E0-U+00F6,U+00A9"; 
                              embedAsCFF: false; 
                              advancedAntiAliasing: true; 
                      } 
      </fx:Style>
      
      

       

       

      Everything works great except for the bold version of my font which is randomly loaded: for about ten compilations, the font is correctly loaded, then not for the next ten ones, ...

       

      Is anybody has a explanation ? May it be a problem with my .ttf file ?

       

      Thanks.

       

      Vincent.