2 Replies Latest reply on Dec 12, 2011 7:29 AM by Rpgccv

    Embedding .ttf font in Spark TextInput “prompt”?

    Rpgccv

      This is what i have:

      Main.mxml:

      <fx:Style source="Main.css"/>
         
      <s:TextInput x="72" y="95" focusColor="#CECB02" prompt="E-mail: "
                  
      skinClass="components.TextInputSkin"/>

      TextInputSkin.mxml:

       <s:RichText id="promptDisplay" includeIn="disabledWithPrompt,normalWithPrompt" x="10" y="7"
             
      color="#666666" fontFamily="Acens" fontSize="15" trackingRight="1"
             
      color.normalWithPrompt="#333333"/>
         
      <s:RichEditableText id="textDisplay" d:userLabel="Text Display" x="10" y="7" width="230"
             
      fontFamily="Acens" fontSize="15" heightInLines="1"
             
      width.normal="282" color.normal="#999999"
             
      tabStops.normal="S0 S50 S100 S150 S200" trackingRight.normal="1"/>

      Main.css

      @font-face
      {
          fontFamily
      : Acens;
          src
      : url("C:\WINDOWS\Fonts\Acens.ttf");
          embedAsCFF
      : true;
      }

      So, the "promptDisplay" in a computer(online) that does not have "Acens.ttf" installed shows the predefined one, but the inputed text is showed correctly with the embeded font!! Any explanation/solution for that!?

      Thanks ;-)