6 Replies Latest reply on Sep 10, 2009 5:36 PM by bmilesp

    Flex4 embedding fonts for a spark textInput not working

    bmilesp Level 1

      i can get embedded fonts to work with mx:labels but not for spark textInputs. any ideas? component code:

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/halo"
           width="275" height="107" xmlns:local="*"
           initialize="group1_initializeHandler(event)">
           <s:layout>
                <s:BasicLayout/>
           </s:layout>
           <fx:Style>
           @namespace components "components.*";
           @namespace mx "library://ns.adobe.com/flex/halo";
           @namespace p "*";
           @namespace s "library://ns.adobe.com/flex/spark";
                
           @font-face {
              src:url("../fonts/verdanab.ttf");
                   fontFamily: verdanaBold;
                   advancedAntiAliasing: true;
                   fontWeight: Bold;
                   unicodeRange:
                      U+0041-005A, /* Upper-Case [A..Z] */
                      U+0061-007A, /* Lower-Case a-z */
                      U+0030-0039, /* Numbers [0..9] */
                      U+002E-002E, /* Period [.] */
                      U+002D-002D, /*  [-] */
                      U+0040-0040; /*  [@] */
                }
                
                @font-face {
                 src:url("../fonts/verdanab.ttf");
                   fontFamily: verdanaBoldSpark;
                   advancedAntiAliasing: true;
                   fontWeight: Bold;
                   cff: true;
                   unicodeRange:
                      U+0041-005A, /* Upper-Case [A..Z] */
                      U+0061-007A, /* Lower-Case a-z */
                      U+0030-0039, /* Numbers [0..9] */
                      U+002E-002E, /* Period [.] */
                      U+002D-002D, /*  [-] */
                      U+0040-0040; /*  [@] */
                }
                
                .myBold {
                   fontSize: 12;
                   fontFamily: verdanaBold;
                       fontWeight: bold;
                }
                
                .myBoldSpark {
                   fontSize: 12;
                   fontFamily: verdanaBoldSpark;
                       fontWeight: bold;
                }
           
           
           </fx:Style>
           <s:Group id="front">
                <local:MailingListFront/>
                <mx:Label x="10" y="34" text="first name" styleName="myBold"/>
                <s:TextInput id="fname" width="81" x="10" y="52" styleName="myBoldSpark" />
                <mx:Label x="95" y="34" text="last name" styleName="myBold"/>
                <s:TextInput  id="lname" width="81" x="95" y="52" styleName="myBoldSpark"/>
                <mx:Label x="10" y="77" text="email" styleName="myBold"/>
                <s:TextInput id="email" width="167" x="10" y="95" styleName="myBoldSpark"/>
                <mx:Label x="181" y="77" text="zip" styleName="myBold"/>
                <s:TextInput id="zip" width="48" x="181" y="95" styleName="myBoldSpark"/>
                <local:SubmitButton id="submit_maillist" x="235" y="86" />
           </s:Group>
           <local:MailingListBack id="back" visible="false"/>      
      
      </s:Group>