Embeding Fonts in AS3?

Hello All,
Publish Settings:
     Program:  Flash Professional CS6
        Target:  Flash Player 11.2
         Script:  Actionscript 3
So I've created 2 new "Fonts" in my library in order to embed them into my Program. But when I run the program the font is not correct. Not sure
what I'm doing wrong..?
Below are the settings for the Embedded Fonts I included. There are 2 of them, which I created by right-clicking in the Library and clicking "New Font".
The First Font:
                       Name:  "Font_Impact" 
          Char Ranges:  All
       Outline Format:  TLF(DF4)
                Linkage:
                      -     Checked --->  Export for Actionscript
                      -     Checked --->  Export in Frame 1     (*Don't know if I needed this but it was selected by default..??)
                      -     Identifier --->  Greyed out....
                      -           Class --->  "Font_Impact"
                      - Case Class --->  "flash.text.Font"
                Sharing:
                         *NOTHING SELECTED HERE (*This was the default so I left it as is)
The seconds font has the exact same settings as the one above except:
               Name:  "Font_Arial_Black"
               Class:  "Font_Arial_Black"
Now, what I did was I followed the instructions I found here at this link below:
          http://www.gaslightgames.co.uk/?p=163
I think I did exactly what they did in their example but it didn't seem to work for me.
My code where I'm trying to use this is:
import flash.text.TextField;
import flash.text.Font;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import fl.text.TLFTextField;
    var tickerTxtField:TLFTextField = new TLFTextField();
    //var tickerTxtField:TextField = new TextField();               //---> Tried this one too, same result
 var tickerTxtField_format:TextFormat;        //TextFormat
var embedFont:Font_Arial_Black;               //Embedded Font 1
var embedFont2:Font_Impact;                    //Embedded Font 2
:............OTHER CODE............:
embedFont = new Font_Arial_Black();
embedFont2 = new Font_Impact();
tickerTxtField_format = new TextFormat();
tickerTxtField_format.font = embedFont.Font_Impact;
tickerTxtField.text = "This is some sample Text To Display..."
:............OTHER CODE............:
I thought I was doing it correctly while I was following the instructions in the link I provided, but I can't seem to get it working.
Can anyone tell what I'm NOT doing correctly? Any thoughts would be greatly appreciated...!
Thanks in Advance,
Matt

Hi,
I believe this line is the one causing problems:
tickerTxtField_format.font = embedFont.Font_Impact;
I guess it should be:
tickerTxtField_format.font = embedFont.fontName;
You actually want to use the property 'fontName' of the Font class, not substitute it for the name of your font.
Hope it helps,
Marcel

Similar Messages

  • Embedding fonts in AS3 with absolute paths

    I'm having difficulty embedding fonts in AS3. For instance,
    using absolute paths:
    [Embed(source="C:\WINDOWS\Fonts\CONSOLA.TTF",
    fontName="Consolas", mimeType="application/x-font-truetype")]
    ... I get the error message: "Error: unable to resolve
    'C:WINDOWSFontsCONSOLA.TTF' for transcoding.
    I'm hoping the backslashes are missing from the error just
    because the compiler doesn't return them, and not that it's losing
    them. I've tried various TTFs with the same result. Even tried
    copying code from the AS3 Cookbook letter for letter. :)
    Thoughts?

    I have a similar issue happening. I am using AS3 and have
    this code in my file:
    // package, import statements etc...
    // the line below is the problematic line
    [Embed(systemFont="..\\..\\..\\fonts\\arial.ttf",
    fontName="Arial (True Type)",
    mimeType="application/x-font-truetype")]
    // now declare my class
    public class ImageRotator extends UIComponent
    // etc.
    The class compiles fine but when I try to run it I get the
    following runtime error:
    "Error: Error #2136: The SWF file
    file:///C:/projects/photogallery_screensaver/bin/photogallery_screensaver.swf
    contains invalid data."
    I've tried several things including changing the location of
    the font file, using a different font file, embedding a systemFont.
    But I always get the same error.
    Help please!
    Thanks,
    Dan

  • 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

  • Problems in CS3 and AS3 with embedded fonts

    Hi. I recently downloaded the trial version of CS3 to test it
    out. I'm an experience AS2 developper, and have 10 years of C, C++,
    C#, Java, PHP ... programming experience on BIG projects before
    starting flash.
    I have been trying to use an embedded font in AS3 with a
    dynamically created textfield. I've tried all the examples in
    O'Reilly's ActionScript 3.0 Cookbook. They suggest using the
    [Embed] meta tag, but quite honestly it does nothing in CS3. I had
    the Size Report option selected, and it shows clearly by the file
    size the font isn't present in the SWF.
    Then I tried doing it the way I did in Flash 8. Again there
    no luck. My TextField exists, but there is simple no font being
    rendered.. Here is my bit of code.
    In my library I have a symbol called arialBold. In the
    linkage settings, I have "Export for ActionScript" checked, and
    "Export in first frame" checked. The class is "arialBold" but I
    wonder if that's right? and the Base class is "flash.text.Font"
    I tried every variation I could think of. I must be doing
    something wrong. You can find my file here :
    http://www.newcommerce.ca/as3/fonttest.fla
    Thanks for your help! If you can fix this, i'll be very
    happy!

    this code works
    var tf:TextField = new TextField();
    var tfor:TextFormat = new TextFormat();
    tfor.font = new _TrebushetMS().fontName;
    tfor.italic = true;
    tf.width = 300;
    tf.height = 200;
    tf.embedFonts = true;
    tf.border = true;
    tf.defaultTextFormat = tfor ;
    tf.text = "this is a test";
    this.addChild(tf);
    This code does not work
    var tf:TextField = new TextField();
    var tfor:TextFormat = new TextFormat();
    tfor.font = new _TrebushetMS().fontName;
    tfor.italic = true;
    tf.width = 300;
    tf.height = 200;
    tf.embedFonts = true;
    tf.border = true;
    tf.setTextFormat(tfor) ;
    tf.text = "this is a test";
    this.addChild(tf);
    i don't know why

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

  • ASDoc Error: Can't find Embedded Fonts?

    Hello,
    I am working in Flash CS5 Professional.
    On my stage, I have a dynamic TextField (my_txt) that uses a basic font, we'll say Arial. However, I want to format some of the text within the field with a custom font.
    I've embedded the font and exported to ActionScript as per Adobe's documentation, so now there is a Font item in my library named "MyCustomFont".
    The properties of the Font are -
    Class: MyCustomFont
    Base Class: flash.text.Font
    So, I've written a custom class file and I want to format the text, so the AS code within the class looks something like this:
    var my_font:Font = new MyCustomFont();
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.font = my_font.fontName;
    my_txt.setTextFormat(my_fmt, 5, 15);
    This is pretty much like the examples I've seen in Adobe Docs. And, it works swimmingly when I test the movie; however, when I try to document the class using the ASDoc command line tool, I get the error:
    /Path/To/Project/And/The/Classes/SomeClass.as(221): col: 27 Error: Call to a possibly undefined method MyCustomFont.
                var my_font:Font = new MyCustomFont();
                                       ^
    I THINK I understand why ASDoc isn't finding the "method" MyCustomFont... the "method" is actually a Class contained in the Library within the .fla.
    So, is there a special argument I need to write in the ASDoc command line so that it will recognize embedded fonts?
    Or, am I supposed to use an "import" statement in SomeClass to import the embedded fonts somehow?
    Thanks!

    Ahhh...found the answer, do the same thing as I would do for any project that uses the built-in AS3 components (such as FLVPlayback):
    Put the Font items into a new .fla library and export a SWC.
    Then use the "-library-path /Path/to/SWC" argument in the ASDoc command line tool.

  • Dynamic text and embedded font

    Hi,
    I'm new to Flash and AS3, and I'm having a problem when I do
    the following: I create an empty dynamic text field in the
    authoring environment, click "Embed...", and choose the character
    sets that I want (I get the same results when I embed the entire
    font). The first time I change the contents of the text field with
    the command:
    text_field.text = "string 1";
    I get good results--the text appears in the correct font.
    However, subsequent attempts to update the .text property fail with
    no error message, and the field becomes blank.
    If I remove the embedded font by clicking "Don't embed" in
    the embedding dialog, then every time I update the field's .text
    property, it displays correctly using a local machine font.
    I've also tried embedding the font in the swf by creating a
    dynamic text field in the authoring environment, into which I place
    no text, creating a second, functional text field in actionscript,
    formatting it, using the "embed = true" property, and repeatedly
    updating the .text property with the same bad results as described
    above.
    I haven't tried using the [embed] metatag to dynamically load
    the font.
    I've tested the swf in IE7 and Firefox on two machines with
    the same results. What am I doing wrong?
    Thanks,
    Dave

    Okay, here's more information. The font that I've been trying
    to embed is Bitstream Vera Sans Mono. If I embed a different font,
    like Bitstream Vera Sans, I have no problem. It seems to me that it
    must be that my Bitstream Vera Sans Mono is corrupted, my .fla and
    .swf files are corrupted, or there's a bug in flash...

  • Embedded Font Frustration

    Hi
    I am going round in circles with embedded fonts! I am using Flash on a Mac. When I embed my fonts and publish all looks good, I have embedded GG Superscript Sans and GG Subscript Sans. I am using Arial (not embedded). I have drawn text boxes and used the check options
    When viewing the site in Safari on the Mac I get perfection, subs, supers and bold. But in Windows (and Puffin on my iphone) the subs and supers do not show up. The bold does (<b> tag in external text file).
    The AS3 code in the flash swf is;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    import flash.text.StyleSheet;
    // requests
    var c21specheadReq:URLRequest = new URLRequest("c21spechead.txt");
    var c21specbox1Req:URLRequest = new URLRequest("c21specbox1.txt");
    var c21specbox2Req:URLRequest = new URLRequest("c21specbox2.txt");
    var cssReq:URLRequest = new URLRequest("styles.css");
    // loaders
    var c21specheadLoader:URLLoader = new URLLoader();
    var c21specbox1Loader:URLLoader = new URLLoader();
    var c21specbox2Loader:URLLoader = new URLLoader();
    var cssLoader:URLLoader = new URLLoader();
    // listeners
    c21specheadLoader.addEventListener(Event.COMPLETE, c21specheadLoaded);
    c21specbox1Loader.addEventListener(Event.COMPLETE, c21specbox1Loaded);
    c21specbox2Loader.addEventListener(Event.COMPLETE, c21specbox2Loaded);
    cssLoader.addEventListener(Event.COMPLETE, cssLoaded);
    function c21specheadLoaded(event:Event):void {
              txtspec_txt.htmlText = c21specheadLoader.data;
    function c21specbox1Loaded(event:Event):void {
              txtbox1_txt.htmlText = c21specbox1Loader.data;
    function c21specbox2Loaded(event:Event):void {
              txtbox2_txt.htmlText = c21specbox2Loader.data;
    function cssLoaded(event:Event):void {
              var sheet:StyleSheet = new StyleSheet();
              sheet.parseCSS(cssLoader.data);
              txtspec_txt.styleSheet = sheet;
              txtbox1_txt.styleSheet = sheet;
              txtbox2_txt.styleSheet = sheet;
    // Load the files
    c21specheadLoader.load(c21specheadReq);
    c21specbox1Loader.load(c21specbox1Req);
    c21specbox2Loader.load(c21specbox2Req);
    cssLoader.load(cssReq);
    The text file looks like this;
    (g)  When atoms share pairs of electrons, they form covalent bonds.
    These bonds between atoms are strong.
    Some covalently bonded substances consist of simple molecules such as
    H<font face = 'GG Subscript Sans'>2</font>,
    Cl<font face = 'GG Subscript Sans'>2</font>,
    O<font face = 'GG Subscript Sans'>2</font>,
    HCl, H<font face = 'GG Subscript Sans'>2</font>O,
    NH<font face = 'GG Subscript Sans'>3</font>
    and CH<font face = 'GG Subscript Sans'>4</font>.
    Others have giant covalent structures (macromolecules), such as diamond and silicon dioxide.
    <b>(i)  The electrons in the highest occupied energy levels (outer shell)
    of metal atoms are delocalised and so free to move through the whole structure.
    This corresponds to a structure of positive ions with electrons between the
    ions holding them together by strong electrostatic attractions. </b>
    The stylesheet is embarrassingly small!
    body {
    background-color: white;
    font-family:'Arial';
    img {
    border-width: 0;
    I'm trying for functionality before I decorate.
    Frustratingly, when playing with the checkboxes for the property inspecto for my text box I DID create a version that had subscript and superscript working in BOTH windows and mac browsers; BUT the BOLD stopped at that point.
    Very frustrating.
    I'd be delighted if someone could point me to a solution.
    Thanks
    Mark

    OK - it now works using Puffin Browser on my iphone, which seems to produce the same results as Windows browsers.
    I have changed to a TT font (Garamond) and embedded regular and bold versions.
    Very odd that this now cures the sub super problem.
    Lesson learned; embed all fonts used, slightly more cumbersome swf but functional.
    Now to look through the fonts for one that I like, Verdana is not my favourite!
    Any logic to my solution would be grateful!
    Mark

  • Embedded font has extra space after special characters

    I've built a web-based Flash movie for a major client. The SWF uses an embedded font and loads text from an XML document. The client is localizing it for several languages, which of course include special characters. In this case, the å character is giving us problems -- it always renders with an extra space after it. For example, the Danish word spørgsmål is rendered as spørgsmå l.
    I might be inclined to think something's wrong with the font, because it doesn't happen with other fonts. However, some Googling turned up several other cases of people with similar problems using different fonts.
    When I remove the font embedding, the problem disappears. I can watch it do this right in the IDE. As soon as I embed characters again, the phantom space returns. And it doesn't happen in any other applications.
    I've spent many hours trying all kinds workarounds, but I've come up with nothing so far. As I said, I've found several other mentions of this problem but the only solution I've seen is "use a different font." In this case I can't -- it's a corporate identity font that's required for this project!
    If it makes any difference, I'm linking the font in the library, then specifying the embedded characters for the text fields. I also have text fields created entirely in Actionscript (AS3) that behave exactly the same way.
    Please tell me there's a solution to this! I'm pretty positive this is a Flash bug at this point, though I'd be happy if someone proved me wrong.

    Hi,
    I read the following on another discussion in this forum:
    it appears that with the shortkey ctrl+shift+Y you can force the pc to work around the system fonts
    Maybe that helps.
    Jenny

  • External Embedded Fonts, Dynamic Text Fields, Latest?

    Hi all,
    I'm stuck in Flash8 land. Mostly because I use mProjector and
    MDM Zinc to extend flash projectors and neither support AS3
    correctly to date. That said..
    Is a Flash8 SWF capable of using fonts embedded in "other"
    SWFs? I realize this is an ongoing difficulty and a well known area
    of confusion and well, I'm confused. All the attempts I've made so
    far in linking have succeeded or failed in various ways, but never
    fully work.
    What I'd love to do is use dynamic text fields populated by
    data from a database (or XML file), with CSS styling, using fonts
    that are embedded in a 'master font SWF'. (and I'd like ice cream
    with that too!)
    I import fonts into, say, 'shared.fla'. I set them all up for
    exporting via linkage (to shared.swf). I open up my other FLAs
    (say, main.fla) and I drag the fonts from the shared.fla library
    into main.fla's library. In looking at the linkage, I see it
    properly set it to Import for Runtime Sharing (shared.swf). I can
    see the font available in the main.fla font list and can select it
    and use it just fine. I have to set the dynamic text field to embed
    fonts to actually see them (and also
    myTextField.setStyle("embedFonts",true)).
    Now all that works well and fine, but the kicker is when I
    want CSS to style my text. If I specify a embedded font linkage
    identifyer in CSS, the text disappears. i.e. I load 'style.css' and
    I have h1 { font-family: someEmbeddedFont; }, the <h1> text
    will now disappear.
    Any clues in how I can specify a font to use in CSS that's
    embedded so it'll work, WITHOUT This font needed to be embedded in
    the actual library (as in, not a linked asset)? Because it works
    fine if I embed the font into every single SWF. But when I try to
    use it as a shared asset, this doesn't work.
    Any ideas on how someone can achieve this?
    This is so I can changed my shared.swf and supply all new
    fonts with the same linkage identifiers and change the font in a
    whole project without re-exporting any other SWFs.
    Thanks for any info!

    I guess it's amazing but I honestly, wholly cannot get this
    to work.
    I made a new AS2 Flash 8 FLA (Forte.fla) with only the Forte
    font with a size of 22 in the library. The name of the library
    element was Forte. The linkage was set to "Export for Actionscript"
    and "Export in first frame".
    I made another FLA (main.fla) Flash8 AS2. In actionscript I
    created an empty movie clip named "Asset_Forte" at the next highest
    depth and Asset_Forte.loadMovie("Forte.swf"). I also made a dynamic
    text field on the stage of this main.fla document and set it to
    Arial 22pt (no bold or italics, etc). I did not embed anything into
    it.
    I made a TextTormat object (my_fmt) and set my_fmt.font =
    "Forte";. I put some text in the dynamic text field to start so I
    just applied the formatting (status_text.setTextFormat(my_fmt);).
    This did not work. I started adjusting random things like
    naming the font in the Forte.swf library to Forte22 and tried
    my_fmt.font = "Forte22";. That didn't work.
    I adjusted the linkage to "Export for runtime sharing" and
    specified Forte.swf as the SWF to share from. This did not work.
    I then dragged the font from the Forte.fla's library (while
    "Export for runtime sharing" was enabled) into the library of
    main.fla. I checked the link and it was proper, "Import for runtime
    sharing, Forte.swf". I used both linkage attempts again (Forte and
    Forte22) with my_fmt.font and neither worked.
    Would it be possible at all to get a couple FLAs from you
    that examplifies how you do this particular trick? I can't seem to
    get the settings right. I would be indebted to you!

  • Embedded font and Combobox

    Hello All,
    Scenario of my application: Application have combobox filled with fonts list. When user select font from combobox. Application load font swf from server and apply to text.
    I have embedded fonts in SWF using css.
    @font-face {   
        src: url("assets/fonts/arial.ttf");   
        fontFamily: "Arial";   
        fontWeight: "normal";   
        embedAsCFF: true;   
    here is code snippet to load font from server.
    var eventDesi:IEventDispatcher = styleManager.loadStyleDeclarations2(fontStyleName.@swfURL);
                eventDesi.addEventListener(StyleEvent.ERROR,function(event:StyleEvent):void{
                    Alert.show("error while downloading font " + fontStyleName.@name);
                eventDesi.addEventListener(StyleEvent.COMPLETE,function(event:StyleEvent):void{
                    fontStyleName.@isDownloaded == "true";
                   if(functionToCall != null)
                        functionToCall.call();   
    Problem:
    When I select font arial form combobox all list of fonts,tool tips are get disappear. My primary exploration is combobox has arial font and I am loading again arial and registering it. This may be the cause.
    Is there any way to set embeded font to any control?
    Thanks,
    Vikram

    Hi,
    Follow this tutorial and use the code below..
    http://www.designscripting.com/2011/06/as3-combobox-font-embedding-problem-flash-cs5/
    var arial:Font = new ArialFont();
    var myFormatBlack:TextFormat = new TextFormat();
    myFormatBlack.font = arial.fontName;
    myFormatBlack.size = 18;
    myFormatBlack.color = 0x000000;
    myComboBox.textField.setStyle("embedFonts", true);
    myComboBox.textField.setStyle("textFormat", myFormatBlack);
    myComboBox.dropdown.setRendererStyle("embedFonts", true);
    myComboBox.dropdown.setRendererStyle("textFormat", myFormatBlack);
    myComboBox.setStyle("embedFonts", true);
    myComboBox.setStyle("textFormat", myFormatBlack);
    myComboBox.prompt = "Select State";
    myComboBox.width = 248;
    myComboBox.height = 25;
    myComboBox.x = 100
    myComboBox.y = 100
    myComboBox.setStyle("textPadding", 1);

  • Embedding fonts in Bridge (Photoshop CS5)

    Hi folks!
    I'm sorry for posting but I still have trouble with creating PDF via Bridge.
    I have sveral PSD-Files (CS5 made) using several image- and textlayers.
    Now I want to create multipage-PDF using Bridge that comes with PS CS5.
    Works fine so far but Bridge does not embed those fonts used in the PSD!
    Seems to me Bridge just merges all layers to one pixelbased image and saves it in PDF-format.
    But that's no good deal!
    In CS2 there was a much better solution in PS2 allowing to create multipaged PDF with embedded fonts.
    Is there any chance to embed fonts with Bridge?
    Plz don't tell me to use Acrobat or InDesign because I'm only using PS CS5.
    Thx!

    Which version of Camera Raw do you use (Photoshop > About Plug-In > Camera Raw) and which one is needed for that camera?
    Camera Raw plug-in | Supported cameras

  • Unable to load embedded fonts in TlF / FlowLeafElement

    dears,
    I use TextFlowUtil.importFromString and FlowLeafElement to make each some text have its own style, every some words have diffirent color, fontFamily, fontSize....etc
    that is done here in the text attribute in this xml tag, and TextFlowUtil.importFromString and FlowLeafElement make taht perfect:
    <TextArea text="&lt;div direction=&quot;rtl&quot;&gt;&#xD;&#xA;  &lt;p textAlign=&quot;right&quot;&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;ttf&quot; fontSize=&quot;16&quot; color=&quot;#FFE000E0&quot; &gt;Welcome to Android Training. Here you'll find a collection of classes that aim to help you build great apps for &lt;/span&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FFE000E0&quot; &gt;Android, using best practices in a variety of framework topics.&lt;/span&gt;&#xD;&#xA;  &lt;/p&gt;&#xD;&#xA;  &lt;p&gt;&lt;/p&gt;&#xD;&#xA;  &lt;p textAlign=&quot;right&quot;&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FFE00000&quot;&gt;Each class explains the steps required to solve a problem or implement a feature using code snippets and &lt;/span&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FFE00000&quot;&gt;sample code for you to use in your apps.&lt;/span&gt;&#xD;&#xA;  &lt;/p&gt;&#xD;&#xA;  &lt;p&gt;&lt;/p&gt;&#xD;&#xA;  &lt;p textAlign=&quot;right&quot;&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FF00E000&quot;&gt;What you see now is just the beginning. We plan to add many more classes, expand and refine existing &lt;/span&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FF00E000&quot;&gt;classes, and build Training Courses that help you enhance your apps using objective-oriented collections of &lt;/span&gt;&#xD;&#xA;    &lt;span fontFamily=&quot;Arial&quot; fontSize=&quot;16&quot; color=&quot;#FF00E000&quot;&gt;classes.&lt;/span&gt;&#xD;&#xA;  &lt;/p&gt;&#xD;&#xA;&lt;/div&gt;" direction="rtl" styleName=".textAreaTitle" editable="false" selectable="true" scrollable="false" mainReferance="UI.Components.Basics.TextArea" />
    The problem is that i need to embed fonts, by this fontFamily=&quot;Arial&quot; you can set font name which you want, but if i set font name which is embedded it won't work, like : fontFamily=&quot;ttf&quot;
    the embedded code is :
    [Embed(source='/Resources/majallab.ttf',fontName='ttf',mimeType='application/x-font',embed AsCFF='true')]
                                            var font1:Class; //This is only used to compile the code
    I use Flex SDK 4.5,
    what can i do ?
    Thank you in advance,
    amt

    To use embedded fonts in a Flex component, the fontFamily for the component needs to be set to an embedded font that is in the same SWF as the other embedded fonts in the TextFlow.  See my blog for more details
    Alex Harui
    Flex SDK Team
    Adobe Systems, Inc.
    http://blogs.adobe.com/aharui

  • 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

  • How can I create a PDF with embedded fonts (not a subset of the font) from Excel?

    I need to create PDF's from Excel spreadsheets. The PDF needs to have embedded fonts but every time I create one it only has a subset of the embedded font.  I have tried setting preferences in the Acrobat add in (unchecked the "Subset Embedded Fonts" option and also tried with the Subset Embedded Fonts checked but the percentage set to only 1% in an attempt to force full font to be embedded.)
    I also tried opening the resulting PDF with Acrobat Pro XI but could not figure out how to add the font in.
    A method to accomplish the results from either tool would be great.

    Anna;
    Unless you can add those fonts to your system via the Font book and then substitute them in iPhoto, you'll have to either user the available fonts or create your own pages, 8.5 x 11, in an image editor like Photoshop Elements and use them on pages that are one photo per page. Other's have done that with some success.
    If you has PS or PSE create an 8.5 x 11" canvas at 300 dpi. Then you can add your photos, add text (if PS can use the text), and create your own layout.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for