Embedded font on Spark Button

I am using an embedded font for all spark labels. It works fine.
However, the font is not applied to the button label. If I switch the font to Comic Sans MS then the font is used on the button.
I can't figure out why this particular embedded font works in all labels, except the button label.
Any help would be greatly appreciated.
gkx

I'm seconding Robs reply here... I had a very similar issue and ended up having to set the fontWeight and fontStyle to match the embedded font. In my case it was normal and normal using a Futura family font.
So, my overall embed was:
@font-face {
                              src: url("assets/fonts/Futura_Book_BT.ttf");
                              fontFamily: "FuturaCFF";
                              embedAsCFF: true;
                    @font-face {
                              src: url("assets/fonts/Futura_Book_BT.ttf");
                              fontFamily: "Futura";
                              embedAsCFF: false;
Then my buttons looked like
<s:Button fontFamily="Futura"  fontWeight="normal" label="Select"  click="hubSelectionHandler(event)" />

Similar Messages

  • Problems with embedded font on spark RichText control

    « Hide
    I have an embedded font that appears correctly when used with Halo components, but when associated with the spark RichText component, it is not recognized.
    The embedded font is defined in css file, my css file
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/halo";
    @font-face {
    src:url("assets/fonts.swf");
    fontFamily: "Helvetica Neue";
    @font-face {
    src:url("assets/fonts.swf");
    fontFamily:"Helvetica Neue";
    fontWeight: bold;
    global{
    color:#333333;
    fontFamily: "Helvetica Neue";
    fontSize:12px;
    The embedded font it used in the following manner:
    <mx:Label styleName="panelTitle" text="Hello There"  width="263" x="21" y="11"/>
    <s:Group width="410" x="38" y="52" height="50">
    <s:RichText styleName="panelTitle" text="Hello There" fontFamily="Helvetica Neue"  width="263" x="21" y="11"/>
    </s:Group>
    The Label shows the embedded font correctly while the RichText control does not. It does not matter if the fontFamily is specified explicitly on the control or not.
    I created a bug SDK-22137, but since I'd need to get this working soon any help would be appreciated.

    Just a friendly reminder. Many of the examples on that site are fairly old and havent been updated to use the latest APIs. For example, "cff" has recently been renamed to "embedAsCFF". In fact, here's a better example:
    <?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/halo">
        <s:layout>
            <s:VerticalLayout paddingLeft="20" paddingTop="20" />
        </s:layout>
        <fx:Style>
            @namespace mx "library://ns.adobe.com/flex/halo";
            @namespace s "library://ns.adobe.com/flex/spark";
            /* DefineFont3 (embedAsCFF == false) */
            @font-face {
                src: url("assets/georgia.TTF");
                fontFamily: embGeorgia;
                fontWeight: normal;
                embedAsCFF: false;
            @font-face {
                src: url("assets/georgiab.TTF");
                fontFamily: embGeorgia;
                fontWeight: bold;
                embedAsCFF: false;
            /* DefineFont4 (embedAsCFF == true) */
            @font-face {
                src: url("assets/georgia.TTF");
                fontFamily: embGeorgiaCFF;
                fontWeight: normal;
                embedAsCFF: true;
            @font-face {
                src: url("assets/georgiab.TTF");
                fontFamily: embGeorgiaCFF;
                fontWeight: bold;
                embedAsCFF: true;
            mx|Label {
                fontFamily: embGeorgia;
            s|RichText {
                fontFamily: embGeorgiaCFF;
                fontLookup: embeddedCFF;
        </fx:Style>
        <mx:Label text="Halo Label" />
        <mx:Label text="Halo Label (bold)" fontWeight="bold" />
        <s:RichText text="Spark RichText" />
        <s:RichText text="Spark RichText (bold)" fontWeight="bold" />
    </s:Application>
    Also, depending on what you're trying to do, this may help you: http://blog.flexexamples.com/2009/06/14/using-a-cff-embedded-font-with-a-halo-label-contro l-in-flex-4/. Basically, you can set the textFieldClass style on certain Halo controls and have them use the mx.core.UITLFTextFieldClass (instead of the default mx.core.UITextFieldClass) so they can take advantage of the new CFF fonts.
    In fact, here's the same example as above, but with the single embedded font:
    <?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/halo">
        <s:layout>
            <s:VerticalLayout paddingLeft="20" paddingTop="20" />
        </s:layout>
        <fx:Style>
            @namespace mx "library://ns.adobe.com/flex/halo";
            @namespace s "library://ns.adobe.com/flex/spark";
            /* DefineFont4 (embedAsCFF == true) */
            @font-face {
                src: url("assets/georgia.TTF");
                fontFamily: embGeorgiaCFF;
                fontWeight: normal;
                embedAsCFF: true;
            @font-face {
                src: url("assets/georgiab.TTF");
                fontFamily: embGeorgiaCFF;
                fontWeight: bold;
                embedAsCFF: true;
            mx|Label {
                fontFamily: embGeorgiaCFF;
                textFieldClass: ClassReference("mx.core.UITLFTextField");
            s|RichText {
                fontFamily: embGeorgiaCFF;
                fontLookup: embeddedCFF;
        </fx:Style>
        <mx:Label text="Halo Label" />
        <mx:Label text="Halo Label (bold)" fontWeight="bold" />
        <s:RichText text="Spark RichText" />
        <s:RichText text="Spark RichText (bold)" fontWeight="bold" />
    </s:Application>
    Peter

  • Spark DataGrid Embedded Font Quandary

    01.  In everything that follows, I am talking about the latest [21328] version of the SDK, not that I believe that my problems have anything to do with that release, just so anyone interested and willing to help will know the version.
    02.  My application happens to be rooted in AIR's WindowedApplication, but again, I do not think that has any impact on my problems; I believe the same results would obtain for a Flex Application.
    03.  I have a custom renderer for the Spark DataGrid which extends DefaultGridItemRenderer.  It works fine. Its primary job is to change the font characteristics of each row in the list as a visual clue to the user as to the specific nature of the content that is accessible.  Some entries are just in the Regular font, some in Bold, some in Italic, and some in Bold-Italic.
    04.  I have, for most of the project, embedded the necessary fonts like this:
        [Embed (source="C:/Windows/Fonts/ArnoPro-Caption.otf", fontName="ArnoPro_BI_4",
            fontStyle="italic",
            fontWeight="bold",
            mimeType="application/x-font",
            embedAsCFF="true",
            unicodeRange="U+0021-U+00ff, U+20ac-U+20ac")]
        private const ArnoPro_BI_4:Class;
    As I said, that all works just as advertized.  But, that method of embedding carries the somewhat painful burden of slower compilations, so for the last 24 hours I have unseccessfully been trying to replace that with:
    [Embed (source = "../resources/assets/ArnoPro_BI_4.swf", symbol="ArnoPro_BI_4")]
    private const ArnoPro_BI_4:Class;
    where the swf file was produced via fontswf, using this incantation:
    fontswf -4 -u U+0021-U+00ff,U+20ac-U+20ac -b -i -a ArnoPro_BI_4 -o ArnoPro_BI_4.swf C:/Windows/Fonts/ArnoPro-Caption.otf
    06.  By all that is holy, the two different means of embedding the font ought to yield the same result, but they do not.  I have debugging code inserted to print out the list of fonts upon initiation of the application, and they are identical.  Both means of embedding do succeed in getting the embedded fonts into the .swf, but the attempt to use the fonts fails using the second approach.
    There is, of course, no change being made to the code in the item renderer which merely uses setStyle() to effect the row-by-row result.  The result in the second case is that the only style of the embedded font that renders is 'regular'.
    07.  I have used the 'keep-generated' facility to look at the code being generated by the mxmlc compiler and can see that different code is emitted, but it does not help me find a fix to the problem.  Both forms of the meta-tag do something; both methods of embedding seem to correctly register themselves with the FontManager, but only the method of embedding which actually performs the transcoding during compilation seems to result in a set of registered fronts which can be found and correctly used to render output based on the runtime setting of the font style.

    Thank for the reply
    I hoped that my posting indicated how the fonts in the the .swf file were constructed.  The "-4", argument to the command-line tool, fontswf, as far as I can tell, is the precise analog to the "embedAsCFF" argument in the [Embed] syntax.  That is what makes it so perplexing.  Given all the external documentation that is available for each tool/methodology, I would have thought that the resultant bytecodes, classes, flags, whatever, would have been identical.  The only difference would be the timing of when the transcoding took place.
    Since it is clearly more efficient to only transcode whatever set of fonts an application needs once, not once per build/test turn-around, I would really like to make the fontswf workflow work.  For those of us outside the beneficial environment of your licensed tools, the kindly-provided alternative to the facilities built into Flash Professional and/or Flash Builder give us the greatest degree of productivity.
    Whoever has access to the source code for Font [I can only see the uninteresting FontAsset in the SDK] can probably determine what difference might result from mxmlc working with this intermediate output, when inline transcoding is 'tagged':
    package
    import mx.core.FontAsset;
    [ExcludeClass]
    [Embed(fontName="ArnoPro_IT_4", _resolvedSource="C:/WINDOWS/Fonts/ArnoPro-ItalicCaption.otf", fontStyle="italic", _line="1189", _pathsep="true", embedAsCFF="true", fontWeight="normal", unicodeRange="U+0021-U+00ff, U+20ac-U+20ac", source="C:/Windows/Fonts/ArnoPro-ItalicCaption.otf", _column="2", exportSymbol="AIRZoom_ArnoPro_IT_4", _file="G:/FP/AIRZoom/src/AIRZoom_AS.as", mimeType="application/x-font")]
    public class AIRZoom_ArnoPro_IT_4 extends mx.core.FontAsset
        public function AIRZoom_ArnoPro_IT_4()
            super();
    versus this, when swf extraction is 'tagged':
    package
    import mx.core.FontAsset;
    [ExcludeClass]
    [Embed(fontName="ArnoPro_IT_4", _resolvedSource="C:/WINDOWS/Fonts/ArnoPro-ItalicCaption.otf", fontStyle="italic", _line="1191", _pathsep="true", embedAsCFF="true", fontWeight="normal", unicodeRange="U+0021-U+00ff, U+20ac-U+20ac", source="C:/Windows/Fonts/ArnoPro-ItalicCaption.otf", _column="2", exportSymbol="AIRZoom_ArnoPro_IT_4", _file="G:/FP/AIRZoom/src/AIRZoom_AS.as", mimeType="application/x-font")]
    public class AIRZoom_ArnoPro_IT_4 extends mx.core.FontAsset
        public function AIRZoom_ArnoPro_IT_4()
            super();
    The only difference is that value for '_line' which probably only indicates that one of the two processes has a comment or empty line somewhere.

  • Embedded font not working in Spark Label control?

    Hi,
    I'm trying to use embedded fonts with the Spark Label (formerly SimpleText) control. I'm using SDK 4 build 10485 now, but I could not manage it in Beta 1 neither.
    I'v been playing with cff: true/false, embedAsCFF:true/false but no results.
    I've added my test application where it does work with the Halo <mx:Label> control, but not with the Spark <s:Label> control.
    So, no compiler errors, but the Spark label control shows a serif (Helvetia?) font where it should be sans as does the Halo control.
    Can anybody help me out here?
    Thanks
    Jan
    As I get the message 'the content type of this attachment is not allowed' on uploading the MXML file, here is the code:
    <?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/halo"
        minWidth="1014" minHeight="768"
        backgroundColor="#7B7374">
        <s:layout>
            <s:VerticalLayout paddingBottom="8" paddingLeft="8" paddingRight="8" paddingTop="8" />
        </s:layout>
        <fx:Style>
            @namespace mx "library://ns.adobe.com/flex/halo";
            @namespace s "library://ns.adobe.com/flex/spark";
            @font-face {
                src: url("project/assets/thesans/THSP____.TTF");
                fontFamily: HaloSans;
                fontWeight: normal;
                advancedAntiAliasing: true;
                unicode-range: U+0021-U+007B;
            @font-face {
                src: url("project/assets/thesans/THSP____.TTF");
                fontFamily: SparkSans;
                fontWeight: normal;
                advancedAntiAliasing: true;
                unicode-range: U+0021-U+007B;
                embedAsCFF: true;
            .mySparkSans {
                fontFamily: SparkSans;
                fontSize: 24;
            .myHaloSans {
                fontFamily: HaloSans;
                fontSize: 24;
        </fx:Style>
        <s:SkinnableContainer>
            <s:Label styleName="mySparkSans" text="This should be TheSans but it is not...., notice the characters 'ag'"/>
            <mx:Label styleName="myHaloSans" text="This is TheSans, notice the characters 'ag'" top="100"/>
        </s:SkinnableContainer>
    </s:Application>

    Hi,
    I'm trying to use embedded fonts with the Spark Label (formerly SimpleText) control. I'm using SDK 4 build 10485 now, but I could not manage it in Beta 1 neither.
    I'v been playing with cff: true/false, embedAsCFF:true/false but no results.
    I've added my test application where it does work with the Halo <mx:Label> control, but not with the Spark <s:Label> control.
    So, no compiler errors, but the Spark label control shows a serif (Helvetia?) font where it should be sans as does the Halo control.
    Can anybody help me out here?
    Thanks
    Jan
    As I get the message 'the content type of this attachment is not allowed' on uploading the MXML file, here is the code:
    <?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/halo"
        minWidth="1014" minHeight="768"
        backgroundColor="#7B7374">
        <s:layout>
            <s:VerticalLayout paddingBottom="8" paddingLeft="8" paddingRight="8" paddingTop="8" />
        </s:layout>
        <fx:Style>
            @namespace mx "library://ns.adobe.com/flex/halo";
            @namespace s "library://ns.adobe.com/flex/spark";
            @font-face {
                src: url("project/assets/thesans/THSP____.TTF");
                fontFamily: HaloSans;
                fontWeight: normal;
                advancedAntiAliasing: true;
                unicode-range: U+0021-U+007B;
            @font-face {
                src: url("project/assets/thesans/THSP____.TTF");
                fontFamily: SparkSans;
                fontWeight: normal;
                advancedAntiAliasing: true;
                unicode-range: U+0021-U+007B;
                embedAsCFF: true;
            .mySparkSans {
                fontFamily: SparkSans;
                fontSize: 24;
            .myHaloSans {
                fontFamily: HaloSans;
                fontSize: 24;
        </fx:Style>
        <s:SkinnableContainer>
            <s:Label styleName="mySparkSans" text="This should be TheSans but it is not...., notice the characters 'ag'"/>
            <mx:Label styleName="myHaloSans" text="This is TheSans, notice the characters 'ag'" top="100"/>
        </s:SkinnableContainer>
    </s:Application>

  • Embedded fonts display differently in mx and spark

    Hi there,
    My apologies if this is an known issue but I have not been able to find any posts describing this problem. As the title of the discussion describes the problem I see is that when embedding the same font for spark and mx components they display differently to the point of making the application look sloppy. I created a small app to illustrate the problem:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application
        minWidth="955" minHeight="600"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Style>
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";
    @font-face
    src:url("arial.ttf");
    fontFamily: arialCFF;
    embedAsCFF: true;
    @font-face {
    src:url("arial.ttf");
    fontFamily: arialNoCFF;
    embedAsCFF: false;
    advancedAntiAliasing: false;
    s|Label
    fontFamily: arialCFF;
    fontSize: 20px;
    mx|Label
    fontFamily: arialNoCFF;
    fontSize: 20px;
    </fx:Style>
        <s:layout>
            <s:VerticalLayout
                paddingLeft="10"
                paddingTop="10"/>
        </s:layout>
        <s:Label text="This is a label that uses spark"/>
        <mx:Label text="This is a label that uses mx"/>
    </s:Application>
    I used the Arial.ttf font I found in my mac, though I have also tried with courier new and even the myriad web pro provided with an example in the SDK. Also I have tried with SDKs 4.1, 4.5 and 4.5.1. I have played with the value of advancedAniAliasing as well. Regardless of the combination I will still see differences such as this:
    Is this a known issue? Any solutions at hand?
    Thanks in advance for the help!!

    Hi there,
    Thanks for the quick reply. I was able to make fonts display correctly after hacking the display of some components (mx.controls.FormItem for example) however I did notice a whole buch of runtime warnings that showed up as a result of the workaround such as:
    warning: incompatible embedded font 'arialCFFFont' specified for mx.core::UITextFormat. This component requires that the embedded font be declared with embedAsCFF=false.
    TextFieldAutomationHelper:captureSelection() - 'selectionBeginIndex' is not implemented in FTETextField.
    And in some cases for components I do not even use:
    warning: incompatible embedded font 'arialCFFFont' specified for mx.controls::TextInput (TextInput1967) . This component requires that the embedded font be declared with embedAsCFF=false.
    Any ideas on how to avoid this noise or do we have to live with this?

  • Can't get embedded font to work on Button

    I'm trying to use an embedded font in order to fade Panels as
    well as the text in the Panels. I have the following code to set up
    the embedding (using Edwardian Script so I can be sure the font
    worked):
    <mx:Style>
    @font-face {
    src:url("C:/WINDOWS/Fonts/ITCEDSCR.TTF");
    fontFamily:myScript;
    .scriptStyle {
    fontFamily:myScript;
    </mx:Style>
    This works fine when I apply this style to Labels using the
    styleName property, but when using it on a Button, I get a really
    fuzzy/ugly text, as though the font didn't work and some bad
    default were used, that didn't scale to the small size very well.
    I've also tried directly setting fontFamily directly on the
    Button control, rather than using the intermediary style
    (scriptStyle).
    Is there some restriction about using embedded fonts on
    Buttons?

    Hi,
    I was just looking for answers to my own question when I
    noticed this, which was giving me a problem earlier this week. I
    found that the default text for a button is 'bold' so if you
    haven't specified a bold embedded font, then it won't look good. I
    just got around it by specifying a 'normal' fontweight for my
    buttons.
    I would imagine that, after all this time, you've probably
    found the answer, but thought it might help anyone else who is a
    couple of weeks behind me on the learning curve ...

  • Embedding .ttf font in Spark TextInput "prompt"?

    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 ;-)

    Thanks for the reply
    It's predefined in "italic" and this font doesn't have it.
    But if it's like you are saying, why do i see it in my computer (even if the file it's in a server) with the font i choose and in "italic"!?
    Thanks again ;-)
    EDIT:
    Ok.. so i change the prompt fontStyle to "normal" and it works in every computer. ;-)
    But it's strange that in the local computer it does the transformation to italic when i want!! :S
    Thanks again ;-) problem "solved"

  • Spark Button Label with mixed font styles

    I have a spark button, with a custom skin.
    I would like to use italicised text mixed with normal text for the label.
    Is there any way to do that?
    A crucial aspect of my problem is that I am extending the Button component because I want to keep its accessibility features.  I'm finding it very hard to find any info on how I might consider customising the button text.
    I have got as far as setting the text component in my button skin to be a RichText component.  But how could I assign rich text to it within the button?

    Thanks for your reply, I'll check that out and see if I can get
    it working.

  • Module not unloading if embedded font was ever used

    So, I have a test app that uses modules with the font embeded. Using ModuleManager I am able to load up the module. Once I call   IModuleInfo.factory.create(), I am then able to setStyle("fontFamily", "BPDiet") and the font does show up. The issue I am now having is that once I have used a font from a module, even if my TextArea is no longer using it (I even tried removing the textArea, and replacing it with a new one), the module will not unload.
    I read through this "What We Know About Unloading Modules" and I think I am not leaving any references around.They are loaded using the load() defaults. There is no code (that is used) in the module. The modules are not being added to the display, so they never receive focus.
    Note that I am unable to run the profiler as suggested in the article as I don't have the premium Flash Builder 4. <grrr>
    Note that the first module that is loaded, I can never get to unload, even if I never used the font embedded in it, but all subsequent modules will unload, if I do not use the embedded font. I can live with the first one being pinned as long as I can unload the others that are not in use.
    Here is the code from one of my modules:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import spark.components.TextArea;
                [Embed(source='assets/BPDiet.otf',
                        fontName='BPDiet',
                           mimeType='application/x-font')]
                public static var BPDietNormal:Class;
                public function GetSampleTextArea():TextArea {
                    var SampleTextArea:TextArea = new TextArea();
                    SampleTextArea.text = "Test BPDiet please!";
                    SampleTextArea.setStyle("fontFamily", 'BPDiet');
                    return SampleTextArea;           
            ]]>
        </fx:Script>
    </mx:Module>
    And here is the App that is loading and using the modules:
    <?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="400" minHeight="400">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.core.UIComponent;
                import mx.events.FlexEvent;
                import mx.events.ModuleEvent;
                import mx.managers.SystemManager;
                import mx.modules.IModule;
                import mx.modules.IModuleInfo;
                import mx.modules.Module;
                import mx.modules.ModuleManager;
                import spark.components.TextArea;
                private var _ta:TextArea = null;
                protected var _moduleInfo:IModuleInfo;
                private function LoadFontTextArea(fontSwf:String):void {
                    status.text = "Loading the font pack";
                    _moduleInfo = ModuleManager.getModule(fontSwf);
                    // add some listeners
                    _moduleInfo.addEventListener(ModuleEvent.READY, onModuleReady);
                    _moduleInfo.addEventListener(ModuleEvent.ERROR, moduleLoadErrorHandler);
                    _moduleInfo.addEventListener(ModuleEvent.UNLOAD, moduleUnloadHandler);
                    _moduleInfo.load();
                private function onModuleReady(event:ModuleEvent):void {
                    status.text = "The font pack swf Ready \n" + event.module.url;
                    //All I had todo was create the module, then I could access the embeded font by name
                    var fontMod:* = event.module.factory.create();
                    //_ta = fontMod.GetSampleTextArea();
                    //panelToStuff.addElement(_ta);
                    fontMod = null;
                    //fontNameForSample = event.module.url.replace(".swf", "");
                private function moduleLoadErrorHandler(event:ModuleEvent):void {
                    status.text = "Font Module Load Error. \n" +
                        event.module.url + "\n"+ event.errorText;
                private function moduleUnloadHandler(event:ModuleEvent):void {
                    status.text = "Font Module Unload Event. \n" + event.module.url;
                private function fontChangedHandler():void {
                    unloadCurrentFont();
                    LoadFontTextArea(String(availFonts.selectedItem));
                private function unloadCurrentFont():void {
                    if (_ta != null) {
                        panelToStuff.removeElement(_ta);
                        _ta = null;
                    panelToStuff.removeElement(sampleTextArea);
                    sampleTextArea = null;
                    sampleTextArea = new TextArea();
                    sampleTextArea.id = "sampleTextArea";
                    sampleTextArea.text = "Some text for your viewing pleasure. " + colorForBK.toString(16);
                    panelToStuff.addElement(sampleTextArea);               
                    if (_moduleInfo != null)
                        _moduleInfo.release();
                        //_moduleInfo.unload();
                        _moduleInfo = null;
                    System.gc();
                private function DoNonImportantWork():void {
                    colorForBK -= 0xFAA;
                    if (colorForBK < 0x0) colorForBK = 0xFFFFFF;
                    var foo:* = {prop1: "yea" + colorForBK.toString(), prop2:"boo" + colorForBK.toString()};
                    var hmm:String = foo.prop1 + " " + foo.prop2;
                    regedFonts = new ArrayCollection(Font.enumerateFonts(false));
                [Bindable]
                private var colorForBK:int = 0xFFFFFF;
                [Bindable]
                private var fonts:ArrayCollection =
                    new ArrayCollection(new Array("AlexandriaFLF.swf", "BPDiet.swf", "ChanpagneFont.swf", "KidsFont.swf"));
                [Bindable]
                private var regedFonts:ArrayCollection;
                [Bindable]
                private var fontNameForSample:String = "";
            ]]>
        </fx:Script>
        <s:VGroup id="panelToStuff">
            <s:HGroup>
                <s:Label id="status" text="status area" backgroundColor="{colorForBK}"/>
                <s:VGroup>
                    <s:DropDownList id="availFonts" dataProvider="{fonts}" change="fontChangedHandler()" />
                    <s:Button label="UnLoad" enabled="true" click="unloadCurrentFont()"/>
                    <s:Button label="doSome" enabled="true" click="DoNonImportantWork()"/>
                </s:VGroup>
            </s:HGroup>
            <s:HGroup>
                <s:Button click="fontNameForSample = 'BPDiet';" label="BPDiet"/>
                <s:Button click="fontNameForSample = 'Champagne';" label="Champagne"/>
                <s:Button click="fontNameForSample = 'Kids';" label="Kids"/>
            </s:HGroup>
            <s:Label text="{regedFonts.length} reg'ed"/>
            <s:TextArea id="sampleTextArea" fontFamily="{fontNameForSample}" text="Some Sample text for your viewing"/>
        </s:VGroup>
    </s:Application>
    A couple things to note; I am calling System.rc() in the unloadCurrentFont() method just to speed up seeing the SWF unload in the debug console. The DoNonImportantWork() is there to just cause some events to happen and to create some objects that will need to be GC'ed. It also let me know that the fonts are not getting registered in Font.
    I'm going to have 30 fonts (and more, that designer is busy) that I will need to be able to dynamically load, but right now, loading them with CSS style modules blows up after about 15 because style modules register the font so I cannot unload the CSS swf.

    To help eliminate the question of whether the TextArea is being held by something else, I have removed it from the MXML, and now programatically create it. That did not help.
    So, I got the trial version of Flash Builder 4 installed on another machine in the office so that I can use the profiler. (The profiler is pretty cool by the way).
    After a lot of profiing, I found four paths to the module's FlexModuleFactory.
    Two of those paths go to EmbeddedFontRegistry, whose data is static. I could get into it and remove font entry and free up the moduleFactory from there. This is a hack, that entry in/on EmbeddedFontRegistry.font should have been cleaned up by the code removing the fontFamily from the TextArea. (Note that EmbeddedFontRegistry is marked [ExcludeClass], which I assume means I should not really be messing with it.
    The other two I cannot get to as they are anonymous. They also don't appear to be referenced, as the Object References shows them both as GC root objects. Here is a screen shot:
    I did a search through the sdk code and 'fbs' only shows up as a parameter on the init function of various Marshal support classes, but is not used in the init()
    Anyway, these references to the FlexModuleFactory do not get held if I do not use the embeded font in the module.
    Here is the updated code:
    <?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="400" minHeight="400">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.core.EmbeddedFont;
                import mx.core.EmbeddedFontRegistry;
                import mx.core.IEmbeddedFontRegistry;
                import mx.core.UIComponent;
                import mx.events.FlexEvent;
                import mx.events.ModuleEvent;
                import mx.managers.SystemManager;
                import mx.modules.IModule;
                import mx.modules.IModuleInfo;
                import mx.modules.Module;
                import mx.modules.ModuleManager;
                import spark.components.TextArea;
                private var _ta:TextArea = null;
                protected var _moduleInfo:IModuleInfo;
                private function LoadFontTextArea(fontSwf:String):void {
                    status.text = "Loading the font pack";
                    _moduleInfo = ModuleManager.getModule(fontSwf);
                    // add some listeners
                    _moduleInfo.addEventListener(ModuleEvent.READY, onModuleReady);
                    _moduleInfo.addEventListener(ModuleEvent.ERROR, moduleLoadErrorHandler);
                    _moduleInfo.addEventListener(ModuleEvent.UNLOAD, moduleUnloadHandler);
                    _moduleInfo.load();
                private function onModuleReady(event:ModuleEvent):void {
                    status.text = "The font pack swf Ready \n" + event.module.url;
                    //All I had todo was create the module, then I could access the embeded font by name
                    var fontMod:* = event.module.factory.create();
                    fontMod = null;
                private function moduleLoadErrorHandler(event:ModuleEvent):void {
                    status.text = "Font Module Load Error. \n" +
                        event.module.url + "\n"+ event.errorText;
                private function moduleUnloadHandler(event:ModuleEvent):void {
                    status.text = "Font Module Unload Event. \n" + event.module.url;
                private function fontChangedHandler():void {
                    unloadCurrentFont();
                    LoadFontTextArea(String(availFonts.selectedItem));
                private function unloadCurrentFont():void {
                    if (_ta != null && _moduleInfo != null) {
                        var fontName:String = _ta.getStyle("fontFamily");
                        _ta.setStyle("fontFamily", "");
                        _ta.validateProperties();
                        if (_ta.textDisplay) {
                            _ta.textDisplay.validateProperties();
                        panelToStuff.removeElement(_ta);               
                        _ta = null;
                        //This I should not have to do, but the framework is not doing it
                        var embFontReg:IEmbeddedFontRegistry = EmbeddedFontRegistry.getInstance();
                        var embFonts:Array = embFontReg.getFonts();
                        for each (var curEmbFont:EmbeddedFont in embFonts){
                            if (curEmbFont.fontName == fontName){
                                embFontReg.deregisterFont(curEmbFont, _moduleInfo.factory);
                    if (_moduleInfo != null)
                        _moduleInfo.unload();
                        _moduleInfo = null;
                    System.gc();
                private function AddTA():void {
                    _ta = new TextArea();
                    _ta.text = "Some text for your viewing pleasure. " + colorForBK.toString(16);
                    panelToStuff.addElement(_ta);
                private function DoNonImportantWork():void {
                    colorForBK -= 0xFAA;
                    if (colorForBK < 0x0) colorForBK = 0xFFFFFF;
                    var foo:* = {prop1: "yea" + colorForBK.toString(), prop2:"boo" + colorForBK.toString()};
                    var hmm:String = foo.prop1 + " " + foo.prop2;
                [Bindable]
                private var colorForBK:int = 0xFFFFFF;
                [Bindable]
                private var fonts:ArrayCollection =
                    new ArrayCollection(new Array("AlexandriaFLF.swf", "BPDiet.swf", "ChanpagneFont.swf", "KidsFont.swf"));
            ]]>
        </fx:Script>
        <s:VGroup id="panelToStuff">
            <s:HGroup>
                <s:Label id="status" text="status area" backgroundColor="{colorForBK}"/>
                <s:VGroup>
                    <s:DropDownList id="availFonts" dataProvider="{fonts}" change="fontChangedHandler()" />
                    <s:Button label="UnLoad" enabled="true" click="unloadCurrentFont()"/>
                    <s:Button label="AddTA" enabled="true" click="AddTA()"/>
                    <s:Button label="doSome" enabled="true" click="DoNonImportantWork()"/>
                </s:VGroup>
            </s:HGroup>
            <s:Button click="_ta.setStyle('fontFamily', 'BPDiet');" label="BPDiet"/>
        </s:VGroup>
    </s:Application>
    I really think I've reached the end of what I can do. This really seems like a bug.

  • Unable to load embedded fonts in Textlayout Framework using SWFContext.

    Hi,
        We are having issues with embedding/renderring fonts in swf.
        Here is the code of the slide1.swf compiled by mxmlc.exe [Adobe Flex Compiler (mxmlc) Version 4.1.0 build 16076] with compiler parameters --  "-static-link-runtime-shared-libraries".
    and checked with  Flash player version 10.1 and 10.2 and 10.3.
        package
            import flash.display.Sprite;
            import flashx.textLayout.compose.ISWFContext;
            public class Slide1 extends Sprite implements ISWFContext
                [Embed(source="C:/WINDOWS/FONTS/CALIBRI.TTF", fontName="Calibri", embedAsCFF = "true", unicodeRange="U+0041,U+0072,U+0069,U+0061,U+006C,U+0020,U+004E,U+006F,U+006D", mimeType="application/x-font")]
                public static const calibri:Class;
                [Embed("slide1/sldBg1.png", mimeType="image/png")]
                public static const bg:Class;
                [Embed("slide1/slide1.xml", mimeType="application/octet-stream")]
                public static const slide:Class;
                public function callInContext(fn:Function, thisArg:Object, argsArray:Array, returns:Boolean=true):*
                    if (returns)
                    return fn.apply(thisArg, argsArray);
                    fn.apply(thisArg, argsArray);
        Using Flex 4.1 SDK:--
            When I load the slide1.swf in ActionScript Project it shows the embedded text.
            But, when I load the slide1.swf in  MX+Spark Flex Project, it gives an error :
            Warning: An ActionScript 1.0/2.0 SWF file has loaded an ActionScript 3.0 SWF; code in the ActionScript 3.0 SWF will not run.
           Error TypeError: Error #1034: Type Coercion failed: cannot convert Slide1@f56fce9 to mx.core.IFlexModuleFactory. !
            Below red colored text is the code where the exception occurs.
            var fontClass:Class = ApplicationDomain.currentDomain.getDefinition("slide1") as Class;
          textFlow.flowComposer.swfContext = new fontClass();
            textFlow.flowComposer.addController(new ContainerController(textContainer, containerWidth, containerHeight));   
            textFlow.flowComposer.updateAllControllers();           
            And, when I load the slide1.swf in Only MX Flex Poject, it shows the embedded Font.
        Using Flex 4.5 SDK:--
            With MX+ Spark and MX only Flex Project we get following errors
            VerifyError: Error #1053: Illegal override of createGeometry in flashx.textLayout.elements.FlowGroupElement.
            VerifyError: Error #1053: Illegal override of canReleaseContentElement in flashx.textLayout.elements.SubParagraphGroupElement.
            VerifyError: Error #1103: Class flashx.textLayout.elements::LinkElement cannot extend final base class.
            VerifyError: Error #1053: Illegal override of display in flashx.textLayout.elements.ContainerFormattedElement.
            VerifyError: Error #1053: Illegal override of canReleaseContentElement in flashx.textLayout.elements.FlowLeafElement.
            VerifyError: Error #1053: Illegal override of addParaTerminator in flashx.textLayout.elements.SpanElement.
            VerifyError: Error #1053: Illegal override of canReleaseContentElement in flashx.textLayout.elements.InlineGraphicElement.
            VerifyError: Error #1053: Illegal override of minPercentValue in flashx.textLayout.property.NumberOrPercentProperty.
            VerifyError: Error #1053: Illegal override of hash in flashx.textLayout.property.EnumStringProperty.
            VerifyError: Error #1053: Illegal override of hash in flashx.textLayout.property.BooleanProperty.
            VerifyError: Error #1053: Illegal override of minValue in flashx.textLayout.property.NumberProperty.
            VerifyError: Error #1014: Class flashx.textLayout.property::NumberProperty could not be found.
            VerifyError: Error #1053: Illegal override of minValue in flashx.textLayout.property.IntProperty.
            VerifyError: Error #1014: Class flashx.textLayout.property::IntProperty could not be found.
            VerifyError: Error #1053: Illegal override of hash in flashx.textLayout.property.UintProperty.
            VerifyError: Error #1014: Class flashx.textLayout.property::UintProperty could not be found.
            VerifyError: Error #1053: Illegal override of hash in flashx.textLayout.property.StringProperty.
            VerifyError: Error #1014: Class flashx.textLayout.property::NumberOrPercentProperty could not be found.
            VerifyError: Error #1053: Illegal override of hash in flashx.textLayout.property.ArrayProperty.
            VerifyError: Error #1103: Class flashx.textLayout.elements::TCYElement cannot extend final base class.
            VerifyError: Error #1053: Illegal override of createTextLine in flashx.textLayout.compose.ComposeState.

    Hi Jin-Huang
              But when I use Simple ASProject with SDK 4.1 then it works fine but when I create Flex project then it give error
    with SWFContext.
    I think it's a issue of swfcontext or AS comunication with Spark components.
    Please let me know if any solution.
    Thanks

  • Cannot extract the embedded font arial.Some char might not be displayed

    Hi Folks,
                  Our requirement is to generate the customer account statement for a set of cusomters during a particular period.
                         we  use a script to generate the statement and convert it to pdf.This pdf is then stored in the application server and retrived using cg3y transaction.The transaction allows the statement to be generated for multiple customers and company code.
    the problem that we face is that the first customer account statement is generated properly the rest of the statements are not displayed properly.When we open the customer account statement we get the error 'Cannot extract the embedded font arial.Some characters might not be displayed properly'.All the Headings that we of the font BOLD ARIAL were not displayed.
    This error does not occur for the first pdf file generated.(say we have 3 customers  for the 1st customer pdf is proper however for the next two error'.
                         When I checked the application server I found that the first file has font subtype as Type1 and then rest of the files have font subtype as Truetype.
    This is working fine.I downloaded the file to pc using cg3y.the pdf looks fine.                   
    Directory:  /home/nwfound/n_us_cas
    Name:       0010798791US13122009.PDF
    %PDF-1.3#
    2 0 obj#
    /WinAnsiEncoding#
    endobj#
    3 0 obj#
    <<#
    %Devtype SAPWIN   Font COURIER  normal Lang EN#
    /Type /Font#
    /Subtype /Type1#                       ****see here font subtype is type1
    /BaseFont /Courier#
    /Name /F001#
    /Encoding 2 0 R#
    >>#
    endobj#
    4 0 obj#
    <<#
    /Filter 5 0 R#
    /Length 6 0 R#
    /Length1 352224#
    >>#
    stream#
    This one is not working fine.Gives an error 'Cannot extract the embedded font arial.Some characters might not be displayed properly when downloaded to pc using cg3y.The heading that were of font ARIAL BOLD were not displayed.
    Directory:  /home/nwfound/n_us_cas
    Name:       0010000105US13062010.PDF
    %PDF-1.3#
    2 0 obj#
    /WinAnsiEncoding#
    endobj#
    3 0 obj#
    <<#
    %Devtype SAPWIN   Font COURIER  normal Lang EN#
    /Type /Font#
    /Subtype /TrueType#                - see here the subtype is True type.How can i change this?
    /BaseFont /Courier#
    /Name /F001#
    /Encoding 2 0 R#
    >>#
    endobj#
    4 0 obj#
    <<#
    /Filter 5 0 R#
    /Length 6 0 R#
    /Length1 352224#
    >>#
    I have to change the tont subtype to Type1 as in my first cust. statement.Is there a way to this???????
    There can be no problem with the code cause the account statement generated for first customer is perfect.
    Any suggestions will be appreciated.
    IF hotfdata[] IS NOT INITIAL.
    *Convert otf data to pdf lines.
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
          IMPORTING
            bin_filesize          = l_size
          TABLES
            otf                   = hotfdata
            lines                 = li_pdf_output
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            err_bad_otf           = 4
            OTHERS                = 5.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *clear hotfdata otherwise next empty cust acc. statement may have
    *this data.
        REFRESH:hotfdata.
        CLEAR   hotfdata.
    *If account statement is generated then set w_flag to generate email.
        w_flag = 'X'.
    *The converted pdf lines are of char132 format.
    *They have to be converted to char255 format.
        LOOP AT li_pdf_output INTO lwa_pdf_output.
          TRANSLATE lwa_pdf_output USING ' ~'.
          CONCATENATE l_gd_buffer lwa_pdf_output INTO l_gd_buffer.
          CLEAR lwa_pdf_output.
        ENDLOOP.
        TRANSLATE l_gd_buffer USING '~ '.
        REFRESH li_mess_att.
        DO.
          li_mess_att = l_gd_buffer.
          APPEND li_mess_att.
          SHIFT l_gd_buffer LEFT BY 255 PLACES.
          IF l_gd_buffer IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
        CLEAR   x_objcont.
        REFRESH x_objcont.
        LOOP AT li_mess_att.
          x_objcont = li_mess_att.
          APPEND x_objcont.
        ENDLOOP.
    *application file name
        CONCATENATE po_filun kna1-kunnr save_bukrs datum02+4(2)
                      datum02(4) lc_pdf INTO l_filename.
        CONDENSE l_filename NO-GAPS.
        CONCATENATE file l_filename INTO file.
        CONDENSE file NO-GAPS.
    *Transer pdf data to app. server.
        "data len type i.
        OPEN DATASET file FOR OUTPUT IN BINARY MODE.
        LOOP AT x_objcont.
          TRANSFER x_objcont TO file.
        ENDLOOP.
        CLOSE DATASET file.
      ELSE.
        REFRESH:hotfdata.
        CLEAR   hotfdata.
      ENDIF.

    Hi,
    this can be related to the compression of the PDF file.
    You can turn off the FlateDecode compression again via report RSTXPDF3 as described in Note #843480. It is a little confusing. The option 'FLATE_COMPR_OFF' needs to be set to 'On' to turn off the FlateDecode compression.
    To set this please run as follows:
    se38 -> RSTXPDF3 -> enter 'FLATE_COMPR_OFF' in the 'Name' field -> Select 'Change Settings' radio button
    You will get a pop-up 'Do not use flat compression'.
    Select the 'on' button.
    After this check if the PDF is created correctly.
    regards,
    Aidan

  • Has Mozilla changed the way Firefox displays @font-face enbeded fonts? The site I'm codeing works in Safari, Chrome, and IE, but Firefox 8.0.1 doesn't display the embeded font.

    Has Mozilla changed the way Firefox displays @font-face enbeded fonts? The site I'm codeing works in Safari, Chrome, and IE, but Firefox 8.0.1 doesn't display the embeded font.

    No problems here with the H1 headers.
    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • Embedded font issues -- Flex not measuring properly

    I started this out in one thread ( http://forums.adobe.com/thread/470702 ) and it has progressed into a new, bigger issue. I embedded fonts using the code below.  Flex is not measuring them properly or the font I'm using is vertically challenged.  I suspect the font I am embedding has different vertical spacing than the default font.  I have determined the fonts are embedding by rotating the containers.
    Here's an example of what I'm getting:
    The right side radio button is the raw display (height works out to 23), the left side radio button I forced the height to 15.  Both the radio buttons are set to exactly the same y coordinate.  You can see the right hand text is not centered on the radio button.  I don't want to go thru the hassle of adjusting every single component height to make the font look centered plus that's an ugly workaround.
    I don't think there is anything wrong with my code nor do I think a font swf will help.  I sure would like to know what's going on but it is beyond my understanding.  Here's my thought.  I like the default font the compiler uses when I DON"T embed fonts, looks like this:
    I figure if I could embed this font, everything would work properly.  I just don't where this font lives.  The docs indicate the default font is _serif but it looks more like _sans to me.  And I don't know the hierarchy for my platform.
    So...  Does anyone know either how to fix this measurement issue or where I can find THE True Type font or swf or something that Flex uses as a default so I could embed it?
    /* CSS file */
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdana.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanab.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontWeight: bold;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanai.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontStyle: italic;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanaz.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontWeight: bold;
    fontStyle: italic;
    global {
    font-family: MainFont;

    First off, yes there was a correction to the left hand radio button.  I forced the height of the button to be different and that seemed to help center things
    After a bit of beating my head against the way, I decided to run a simpler test.  I set up a case where I had default fonts side by side with embedded fonts.  Since my default.css file had Verdana I decided to use a Verdana embedded font.  I figured I could compare them directly and maybe play with advanced anti-aliasing at the same time.  I've attached the files (change the txt extension to mxml)
    The result was a somewhat of a surprise.  I didn't realize that all text really wasn't centered on the component (eg radio button, checkbox) at my default size and below.  I do see the small pixel shift, especially in the Button.
    So...  I have found the "real" font declaration in the defaults.css file, am seeing the small pixel shift with embedded fonts, that using advanced anti-aliasing  can help on smaller text, and realized I have to be very careful where I use font sizes smaller than default.  I'm guessing that the "perfect" default size on my system would be 12 since that appears what my Verdana.ttf font is based on.  My defaults.css file has the font size set at 10.  The inability to measure properly is exacerbated when the fonts are embedded.
    Now the real question -- anyone have a clever fix?

  • Embedded fonts in CS3

    Hi!
    Since Flash8, i use a share library with embed fonts. These
    fonts (Century Gothic, MS UI Gothic, SimHei and Avant Garde) are
    used in a multi language training application showing 218 swf
    files.
    All my dynamic and imput textfields use these fonts as
    embedded font.
    These 4 fonts are duplicate in 4 "embedded fonts version" to
    cover regular, bold, italic and bold italic mode.
    So, i've 16 fonts in my share library as this method. for
    example :
    Font name with regular mode -> Font_Name__Normal
    Font name with bold mode -> Font_Name__Bold
    Font name with italicmode -> Font_Name__Italic
    Font name with bold and italic mode ->
    Font_Name__Bold_Italic
    Thanks to this method, i can set a font to my textfield
    according to the user language mode. For exemple Century Gothic is
    set for English users, MS UI Gothic for Japanese users and SimHei
    for Chinese users.
    I would like to migrate this Flash8 application to Flash CS3.
    So i open my library, rigth click and select new font. Next, select
    linkage and check "Export for runtime sharing".
    At this moment, a class name and a base class are set bu
    Flash CS3. I just write the URL like that "./fla_name.swf" and
    press ok button.
    A warning messagebox tells me "A definition for this class
    could not be found in the classpath, so one will be automatically
    generated in the swf file upon export."
    As i don't know what type of class i need to create (i just
    start AS3, never used it before), I accept and export my flash
    file.
    The Flash CS3 swf size is 18KB and the Flash 8 swf size is
    38MB. I conclude that my fonts are not embedded in my file.
    To conclude, how to do it with Flash CS3 ?
    thanks for your help

    > export to PDF so that the newsletter can be edited by others.
    That's not how PDF works. The purpose of exporting a PDF is to make a file that can be viewed and printed by others without the software or fonts used to create the original document. If you want people to edit your InDesign files, they'll need the same version of InDesign and legitimate licence to use the same fonts.
    Some font vendors are foolishly paranoid that people will use PDF to copy their fonts. It's not impossible, but it is difficult to extract a font from a PDF, and nearly useless if the font was embedded as a subset, which most PDF exports use. It is much easier to just copy the font file, and there's nothing preventing that. So blame the morons who sell that headline font and use another or convert it to outlines before PDFing.

  • Arabic vocalization diacritics are not rendered correctly using Adobe Arabic as Embedded Font

    Hi,
    Vocalization diacritics are rendered as independent characters.
    Vocalization diacritics should be rendered combined and merged with the characters preceding them like in the third line of the attached image.
    Have a look at the SWF:
    1) The first line is aTextLayoutComponent which uses Adobe Arabic as en Embeded Font.
    2) The second line is using the System Font Adobe Arabic.
    Does anyone have an idea ?
    I personally think, when you choose System Font, it uses System Text rendering Engine. But if you embeed font flash has problem with rendering the diacritics properly.

    Hello,
    this is my whole code:
    <?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/halo"
                   minWidth="1024" minHeight="768"
                   creationComplete="init()"
                   xmlns:controls="flashx.textLayout.controls.*">
        <s:layout >
            <s:VerticalLayout/>
        </s:layout>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:HTTPService id="httpServiceObj" url="TopFirst.txt" result="handleResult(event)"
                           fault="handleFault(event)" 
                           resultFormat="text"/>
        </fx:Declarations>
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/halo";
              @font-face
                src:url("trado.ttf");
                fontFamily: ArabicFont;
                fontWeight: normal;
                font-style:normal;
                advancedAntiAliasing: true;
        </fx:Style>
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                private function init():void{
                    httpServiceObj.send();
                [Bindable]
                private var _str:String;
                private function handleResult(event:ResultEvent):void{
                    _str    =    event.result as String;       
                private function handleFault(event:FaultEvent):void{
                    Alert.show("fault is = " + event.fault.faultString);
            ]]>
        </fx:Script>
        <s:TextArea text="{_str}"  width="100%"
                    height="100%"
                    fontSize="50"
                    />
    </s:Application>
    As you can see from the code, I am not given any font to the TextArea , even  after giving the font which I have embeded ,out is the same.
    Where I am going wrong..

Maybe you are looking for