3 Replies Latest reply on Feb 24, 2012 9:30 AM by Flex harUI

    Font embedding issue with Text Layout Framework

    Patel Bharat Level 2

      Hi Friends,

       

      I am creating an sample application with Spark and MX component combinations. I tried to embed fonts using follwing code. But its nor working with TextFlow.

       

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="library://ns.adobe.com/flex/spark"

      xmlns:mx="library://ns.adobe.com/flex/mx"

      minWidth="955" minHeight="600">

       

       

      <fx:Style>

       

      @namespace s "library://ns.adobe.com/flex/spark";

      @namespace mx "library://ns.adobe.com/flex/mx";

       

      @font-face {

       

           src:url('assets/FUTURAM.TTF');

           font-family:futura;

           font-thickness:100;advancedAntiAliasing:true;

           font-sharpness:100;

           font-weight:normal;

          embedAsCFF: true;

      }

       

      @font-face {

       

           src:url('assets/FUTURAM.TTF');

           font-family:futura1;

           font-thickness:100;advancedAntiAliasing:true;

           font-sharpness:100;

           font-weight:normal;

          embedAsCFF: false;

      }

       

       

      </fx:Style>

       

      <s:TextArea id= "txt" width="200" height="200" text="hello this is demo" fontSize="14" fontFamily="futura" />

      <mx:TextArea id="txt1" width="200" height="200" text="hello this is demo" fontSize="14" fontFamily="futura1" />

      <s:TextArea id="ta1" textAlign="left" width="200" height="200">

                          <s:textFlow>

                                    <s:TextFlow>

                                              <s:p><s:span fontSize="14" fontFamily="futura">hello this is demo</s:span></s:p>

                                    </s:TextFlow>

                          </s:textFlow>

      </s:TextArea>

       

      </s:Application>