Adding Transparency/alpha to Embedded Font

Hi guys,
I have embedded a font type in my application. Its working fine inside a text area. Now i need to add 60% transparency to it. In fact I need multiple transparency levels. Like -
60 % transparency for TextARea
70% for WindowShade Header etc.
How do I add alpha values to it?

I'm not sure if this fits into your idea, but i just use
someUIImageView.alpha = 0.5;

Similar Messages

  • Controlling alpha on embedded fonts

    There's a site I'm working on http://www.droolpigs.com/April5/ I have the alpha on the navigation buttons set to 0.2 the text appears with full alpha as I want.  I have a nice Old English font I want to use but when I embed the font it takes on the alpha settings of the background.  I set the alpha for the text field to 1 but the text remains at 0.2.  Any ideas on how to set the alpha of a container without affecting the embedded text in it or to set the alpha on the embedded text independently?

    If you set the alpha of the container, that sets the maximum alpha you can reach for anything inside it.  If you want the background to be a different alpha you'll need to make the background as a separate object within the container and set its alpha instead of the container.

  • [svn:osmf:] 13113: Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.

    Revision: 13113
    Revision: 13113
    Author:   [email protected]
    Date:     2009-12-21 01:08:10 -0800 (Mon, 21 Dec 2009)
    Log Message:
    Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/.flexLibProperties
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/ScrubBar.as
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/URLInput.as
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/Fonts.as
    Removed Paths:
        osmf/trunk/libs/ChromeLibrary/assets/images/stop_up.png_1

    Your site was built using tables, whose sizes are defined in your site.
    If we look at your first table definition, we can see:
    <table width="861" height="1449" border="3" cellpadding="0" cellspacing="0" bordercolor="#868787">
    Your table has a width of 861 pixels and an overall height of 1449 pixels. Anything you put into that overall box must fit those dimensions, else
    it won't be visible. Anything you add above it will push everything down. You can redefine your sizing to let you edit more inside of the table elements.
    This is why, when you type in more text, things act weird. If you are in Dreamweaver, you must find the right cell to put your text into and then enter
    text there. Unfortunately, this is going to push things around, which were all lined up using tables. And this gets everything offset with respect to
    everything else in your website.
    And that is why everyone is saying, "Start Over!"
    I just inherited a website that has been put together using tables. I'm going to have to expend considerable effort in rewriting the entire design of the
    website because of that. because everything I intend to add to the pages on the site is going to need to be deconstructed in order to get it to work
    properly if I'm adding text and pictures that need to line up with each other.
    You need something done quick and dirty and the only way I can recommend you do that is to use Dreamweaver to show you the tables you have
    and put what you need in a new table that is defined above or below the tables you all ready have defined. Do that and then get back to someone here
    who knows how to make a website correctly to clean up your entire website and make it editable -- which will cost you some money, but it will be
    money well-spent.
    I like to quote this maxim: Good, Fast, Cheap. Pick any two. This works for website design. You can get it fast and cheap, but it won't be good. I
    think you may have chosen that route.

  • Problem with embedding fonts in Illustrator CS5

    I have just installed Illustrator CS5, and have tested creating a PDF document based on one of my existing files, as well as a new file.
    When I open these PDF documents in Adobe Acrobat Pro 9, I am told that Acrobat cannot access one of the embedded fonts (Korinna BT).
    I have had no issues with embedding this font in Illustrator CS4, and (strangely), when I open these files in other PDF viewers (Preview and PDFPenPro), they report no issues.
    Has anyone else experienced this issue?
    I have removed and reinstalled the font in question, and tested/verified that the font is OK - but still not joy.
    Regards
    Jeremy

    The error message I get is:
    "Cannot extract the embedded font 'MVZTIW+KorinnaITCbyBT-Regular'. Some characters may not display or print correctly."
    When I check the fonts in the PDF in "Document Properties" in Adobe Acrobat the following is shown:
    "KorinnaITCbyBT-Regular
         Type: TrueType
         Encoding: Ansi
         Actual Font: Adobe Serif MM
         Actual Font Type: Type 1"
    It seems that Illustrator is adding some strange "code" ('MVZTIW') to the beginning of the font, which means the actual font can't be found and extracted.

  • 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.

  • Embedding fonts in document

    I work for a Printing Display company. Illustrator CS3 allows you to embedd subset fonts only with permission bits available. The problem I'm having is some of our big customers do not want to send copies of the fonts they paid for. They save the file as a PDF with the fonts embedded so that they will view and print from either Acrobat or Reader. If I open the file in Illustrator I get a "Font missing" warning. What is the work around for this? The reason I need to open these files in a Graphics App is because we need to use our templates in order to edit colors and bleeds and such. Without the fonts it's pretty much useless. We could tell the customer to just outline all text but this is a hassle for all kinds of reasons. Would appreciate any help. Thanks.

    Paul,
    When you open a PDF in Illy, all text is made Live Type, using the same font. If it is not accessible on your machine, Illy substitutes another font based on her best guess for a best match.
    The option of having embedded fonts outlined and thereby turned into non (textwise) editable vector objects, very useful in many cases without need for modifying wording, has long been wished. I am afraid this wish has not been met yet; maybe it will happen in CS5, or later, or never.
    Those PDFs without issues only hold fonts that you have.
    I thought I remembered that there was a cunning roundabout way of obtaining this, and here it is, at least for versions from CS2 on:
    1) File>New to open a new blank document;
    2) File>Place the PDF, ticking the Link option;
    3) Object>Flatten Transparency, ticking Convert All Text to Outlines option if applicable (flattening causes outlining at least in 10).

  • Cannot extract the embedded font 'F2'. Some characters may not display or print correctly.

    This question was previously published but no answer has been found.
    Error message is :
    "Cannot extract the embedded font 'F2'. Some characters may not display or print correctly."
    Many pdf documents display this error with Adobe Reader 8.1.0. We have errors for embedded fonts 'F0','F3','F7' and so on.
    It looks like a Adobe Reader bug because :
    - All PDF files can be opened with Acrobat Reader 5.0.5, 6.x and 7.x, can't be opened with 8.1.0 version.
    - the 8.1.1 update removes only the bug for 'F0' error message (issue #1572280).
    The solution :
    - to publish a 8.1.2 update to fix this important bug
    - is there a registry parameter or tool option to disable the checking added in 8.x version of Adobe Reader ? The 8.x version catches more errors to be compliant with Adobe specification but Adobe reader must be
    compliant with all documents generated by third party products.
    This Adobe Reader bug applies to Windows Vista, XP Pro SP2, 2000.
    Thx,
    Regards

    Just to let you know, for anyone else with this problem. I had this problem occur on a MAC when you tried to do save to PDF in excel. This was all happening at the point of generation of the PDF in my case.
    The fix was to delete ALL the microsoft preferences, but perahps only the font cache needed to be deleted.
    I deleted the following areas from the local users userprofile on the mac. On windows, I would probably log in as a differnet user to try to see if the problem just exsists for one particular user.
    Here are the sections I deleted:
    Library/caches/metadata/Microsoft*
    Username/library/preferences/com.microsoft* ( and anyhting with microsoft in it)
    I did leave the entourage settings though.
    hope it helps someone with a similar issue.

  • 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 on Dynamic Label Component

    I am working on a project that calls for multiple label
    components to be dynamically rendered based on a selected comboBox
    selectedItem. The comboBox is a choice of fonts available to the
    user - all of which are embedded fonts. For some reason, the fonts
    are not embedding correctly for systems that do not have the font
    on the system.
    I have added the fonts to the library and selected "Export to
    ActionScript" as well as "Export in First Frame" (although I want
    to preload these later once this issue is resolved). In my steps to
    simplify and solve, I created a basic movie with a label on the
    stage with an instance name of "label0".
    In my Actions frame, I use the following code:
    label0.text = "This is a font test";
    label0.setStyle("fontFamily", "Vivaldi");
    label0.setStyle("fontSize", "40");
    label0.setStyle("embedFonts", "true");
    I have seen examples on the web where someone uses
    label0.embedFonts = true; but that doesn't seem to work either. I
    have also tried various fonts to verify the font will embed.
    Thinking I may not be embedding it correctly, I checked the
    bandwidth profiler and variables list and the size goes up after I
    try to embed the font as well as the label0 variables correctly
    show embedFonts = true as well as the fontFamily is set to Vivaldi
    (sample).
    Many people have used Dynamic Text Fields but I need to use a
    Label so I can use the autoSize feature as users are allowed to
    choose their own font size (between 10pt and 40pt). The label
    component seems to be the right option for me with the exception of
    the font selection. To be safe, I added a dynamic text field and
    embedded the fonts there as well and hid it off stage. When viewing
    it on another system, the dynamic text field worked (poorly) but it
    showed the font. The label did not show the correct font.
    Any help would be greatly appreciated.
    Thanks

    Yes, when I set label0.setStyle("fontSize", "40"); the size
    changes for both systems (the one that has the font installed as
    well as the one that doesn't). On the system that doesn't have the
    font, it appears as a Times New Roman font in large type.
    Reference:
    Using
    styles with the Label component (Adobe Live Docs)

  • Quick Embedded Fonts Question

    For some reason I can't seem to get any embedded fonts to show up.  Can anyone explain why the following doesn't work?
    Using the newest Flash Builder.
    Thanks!
    -Dave
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application initialize="init();" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" >
        <fx:Style>
             @font-face {
                   src: url("assets/arial.ttf");
                   fontFamily: "Arial";
                   embedAsCFF: true;
        </fx:Style>
        <fx:Script>
          <![CDATA[
                import flashx.textLayout.container.ContainerController;
                import flashx.textLayout.conversion.TextConverter;
                import flashx.textLayout.elements.TextFlow;
                import flash.text.engine.FontLookup;
                import flash.text.engine.RenderingMode;
                import mx.core.UIComponent;
                private var textFlow:TextFlow;
                 private var textHolder:UIComponent = new UIComponent();
                private var sprite:Sprite = new Sprite();
                private function init():void
                      var theText : String = '<TextFlow xmlns="http://ns.adobe.com/textLayout/2008" fontFamily="Arial" fontSize="100">Some Text Here</TextFlow>';
                      textFlow = TextConverter.importToFlow(theText, TextConverter.TEXT_LAYOUT_FORMAT);
                      textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
                      textFlow.renderingMode = RenderingMode.CFF;
                      textFlow.flowComposer.addController(new ContainerController(sprite, 500,500));
                      textHolder.addChild(sprite);
                      addChild(textHolder);
                      textFlow.flowComposer.updateAllControllers();
              ]]>
        </fx:Script>
    </mx:Application>

    All of this did not work for me unless I "used" the font in the RichEditableText Component by adding 'fontFamily="myFont"' as a property to the RichEditableText control, too (see the code below).
    This is kinda messy -- please, fix that, let us use fonts with confidence in Flash (finally).
    -- David
        <fx:Script>
            <![CDATA[
                override public function set data(value:Object):void
                    var xml:XML = <TextFlow fontFamily="Arial" fontLookup="embeddedCFF" fontSize="13" renderingMode="cff" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008">
      <p color="#6a6b5b" fontFamily="_BuchMedium" fontSize="20" paragraphSpaceAfter="8" paragraphSpaceBefore="16">
        <span>Ein kritischer Blick in die Nachbarschaft:</span>
      </p></TextFlow>;
                    var textFlow:TextFlow = new TextFlow();
                    textFlow = TextConverter.importToFlow(xml, TextConverter.TEXT_LAYOUT_FORMAT);
                    textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
                    textFlow.renderingMode = RenderingMode.CFF;
                    richText.textFlow = textFlow;
            ]]>
        </fx:Script>
    <s:RichEditableText id="richText"
            width="100%"
           fontFamily="_BuchBold"
            fontLookup="embeddedCFF" renderingMode="cff" editable="false"/>

  • Do embedded fonts work in TextFlow yet?

    Embedded fonts aren't working for me in TextFlow for SDK build 8537. I added the embedAsCFF: true thing, and the font does show up in Spark controls; it's just not working when I use it in TextFlow (defaults to Times). Non-embedded fonts are working fine though in TextFlow, the problem is only with the embedded ones. Is this a known issue at this time?

    Turns out this is because of the linkage setting to RSLs in the newer SDK builds, Adobe is looking at this. Check outhttp://forums.adobe.com/message/2121775#2121775 for details/workaround.

  • [svn] 1384: Splitting DefineFont into the various DefineFont 1, 2, 3, etc SWF tag formats but retaining a common base DefineFont class so that embedded fonts are still retained as symbols for the SWF dictionary no matter what version of the SWF tag is us

    Revision: 1384
    Author: [email protected]
    Date: 2008-04-24 07:54:58 -0700 (Thu, 24 Apr 2008)
    Log Message:
    Splitting DefineFont into the various DefineFont 1, 2, 3, etc SWF tag formats but retaining a common base DefineFont class so that embedded fonts are still retained as symbols for the SWF dictionary no matter what version of the SWF tag is used.
    Also improving [Embed] so that it can recognize .TTC files as assets (previously these were only recognized through CSS @font-face rules).
    QE: Yes, please add a test case for using [Embed] to embed fonts from a TTC file in addition to our tests for @font-face. Note that the AFEFontManager must be configured for this scenario.
    Doc: No
    Checkintests: Pass
    Mxunit: AtEmbed Font suite: Pass
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/AbstractTranscoder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/FontTranscoder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MimeMappings.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fonts/CachedFontManager.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/Dictionary.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/MovieEncoder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagDecoder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagEncoder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagHandler.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagValues.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/builder/tags/FontBuilder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFontAlignZones.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFontInfo.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java
    Added Paths:
    flex/sdk/trunk/modules/swfutils/src/java/flash/fonts/DefineFont3Face.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont1.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont2.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont3.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont4.java
    Removed Paths:
    flex/sdk/trunk/modules/swfutils/src/java/flash/fonts/DefineFontFace.java

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • AIR 3.0 mx:HTML embedded fonts in external swf - silent craziness

    The recent upgrade to AIR 3.0 has hosed our application.  We rely heavily on an mx:HTML control to render the UI of our application using javascript and HTML templates.  Everything has been working great in production for months, until Adobe released AIR 3.0 last week.  We use embedded fonts in our application that our defined in an external .swf (loaded at runtime).  The HTML control loads a .css file that references the name of our embedded font "ArialEmbedded" and it all worked great.  But now, with 3.0 it does not respect anything in the external .swf.  We get the default Times New Roman font in all of our content, and the app crashes with reliability (in debug mode and release mode) without any exceptions being thrown.
    Using the Windows Debugger, I have been able to track it down to this call consistently - Webkit!cairo_pattern_get_type with an Access Violation erros - c0000005 . 
    After some Googling, it seems webkit uses Cairo for the graphics rendering portion of the library, and in this case it is trying to render a specific color.
    1) I've tried forcing the moduleLoader on the HTML control to use the moduleLoader of the parent Spark component - to no avail.
    2) Did something change with style management and loading external .swf files?
    3) Any other help?  At this point, I have no idea where to begin.  When it crashes, usually during the rendering of items in a grid the AIR process will grab about 2GB of RAM all at once and then stop working with the windows process stopped working dialog.
    Thanks for any help,
    Steve

    Hi,
    Could you please open a new bug report on this over at bugbase.adobe.com? Please include sample media, code, project or app to help us reproduce the issue. Finally, once the bug has been added, would you mind posting back with the URL so that others affected can add their votes and comments?
    Thanks,
    Jian
    Adobe Flash Runtime team

  • Embedding Fonts in AS3

    Maybe someone here can help me understand this a bit
    better.....
    These questions are based on the AS3 Cookbook recipe 9.17
    (Embedding Fonts)...
    According to the cookbook, embedding fonts in AS3 requires
    using the [Embed] metatag "inside an AS file outside the class
    declaration". I can't figure out (based on the cookbook), what I'm
    doing wrong... I've attached my entire class so go ahead and see
    what I'm doing wrong...or not understanding here...
    It's the entire class at this point.... still migrating my
    stuff from AS2 to AS3....

    SymTsb,
    Can you provide a working AS and Fla? If not, do you mind
    posting your code? I'm having similar problems and have been
    searching for a solution for days now. I tried copying the code
    above and applying KGlad's suggestion, but it still doesn't work.
    I went to the library panel and added a new Font. In the name
    field I added "_arialBold". Then I hit OK. I then right clicked and
    selected linkage. I checked off "Export for AS"and "Export in first
    frame". In the class field I put "_arialBold". The base class was
    "flash.text.Font". In the class you created, I replaced every
    instance of the word "Vivacious" with "_arialBold". I added KGlads
    code one line after you defined the TextFormat.
    In my fla, I imported your class and then created a new
    instance of your class. I ran the file... blank screen...
    Help
    V

  • Embedding Fonts - Why not?

    We are really excited about the news of iBooks Author, since we are graphic designers who run a large font website. The bad news, iBooks doesn't support embedding fonts in the iBook format. Why not? (http://support.apple.com/kb/HT5072) - The only work around seems to be if you publish in PDF format, but of course that limits things. Various foundries and font sites offer licenses for eBooks, so iBooks should support this, it's an important aspect to the book design and communication abilities..
    Please fix this in the next update? Pretty please....?

    > The bad news, iBooks doesn't support embedding fonts in the iBook format. Why not? ... The only work around seems to be if you publish in PDF format
    In the ISO 8879 SGML family of which ePub and HTML are implementations the author inserts character information and content information considering the logical reading order. Appearance and geometry is not defined early binding by the author, but late binding by the audience. Because Apple controls the configuration of the obligatory CMAP Character Map in the SFNT Spline Font files available for rendering appearance, the author is guaranteed that the character information will map as intended in whatever appearance the audience chooses. This is *not* the case with glyph encoding and character substitution, whether in Adobe Type 1 font program dictionary format or in Adobe and Heidelberg SFNT Spline Font files which should have been sold with character encoding and glyph substitution, but which were in fact sold with glyph encoding and character substitution. Essentially, Apple is doing in the iBook Store what Microsoft did in Word 1992, that is, supporting obligatory CMAP shaping only for character-glyph mapping, and supporting system supplied SFNT Spline Font files for appearance approximation over third party selectable font files (whose character-glyph mapping may be completely off the wall).
    There is the additional problem that adding logical reading order to PDF in order that it may reflow for PDA Personal Digital Assistants with different geometries is as complex, if not more so, than doing the same for a model for document markup that was designed for defining reading order. PostScript and PDF were designed for defining layout rendering order, not for defining logical reading order.
    Hope this helps,
    /hh

Maybe you are looking for

  • Error with dbms_scheduler and shell script execution

    Hi,guys. I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't

  • Problems with File I/O in  java applications at KVM/CLDC Layer

    I wrote couple of programs made use of Connector.open with "file" protocol to perform File I/O. Code snippet from java application for File Read InputConnection conn = (InputConnection) Connector.open("file:/input.txt", Connector.READ ); I got javax.

  • Time conversion form calday to quarter.

    Hi, I have calday in ODS with format (MM/DD/YYYY). Now in Cube I want 0fical week and 0fiscal quarter. pls give me the logic. fiscal year starts from 1st-oct. Regards, Sai

  • Can't download and install Mavericks

    I am trying to download and install Mavericks and am getting nowhere. When I go to the App Store it is marked as "Free Upgrade". So I click the button and, after logging in, it changes to Install. I click that and it changes colour and is disabled fo

  • Debugging outbound idocs

    Hi, Can anyone suggest me how to debug the outbound idocs like in case we19 for inbound. i am creating an idoc for ORDERS message type with process code ME10. i need to debug to know if data is populating in segments correctly. shylesh