Font embedding for TLF in flex4

Hi - We are in the situation where in embedded fonts are not working for TLF. We embed the fonts in the css file with embedAsCFF as false. It shows the fonts fine in the mx combobox component but not in TLF.
We tried to do a AS way of embeding font as below in the initial mxml, so that it gets available when textregion is created dynamically.
            [Embed(source="/assets/fonts/font1.ttf", mimeType="application/x-font-truetype", fontName="CrownRoman",
            embedAsCFF="true")]
            public static const font1:Class;
and Font.registerFont(font1);
But this is not helping either. Fonts are not getting embedded.
I tried to use(as explained in one of the solutions in the internet)
  var uic:UIComponent = UIComponent(FlexGlobals.topLevelApplication);
  textFlow.flowComposer.swfContext = ISWFContext(uic.getFontContext(textLayoutFormat.fontFamily, false, false, true));
but it gives me complier error  "Attempted access of inaccessible method getFontContext through a reference with static type mx.core:UIComponent"
Pls help me in solving this. Its very critical. Any help is appreciated. Can anyone share some example.
Let me know if you need more details.

Add import mx.core.mx_internal at the END of your imports
then call getFontContext like this: mx_internal::getFontContext(textLayoutFormat.fontFamily, false, false, true);

Similar Messages

  • Getting small fonts embedded in Pages PDFs... how?

    I have a Pages document that has a block of small (6pt and 7pt) type.  When I create a PDF of the document, the OS X PDF creation system substitutes bit-maps for the characters, and there is a significant loss in legibility.  If I create a similar PDF using Adobe Acrobat X (via the Print / PDF / Save as Adobe PDF method) these characters are represented correctly.  Here is a illustration of the problem: first image via Adobe Acrobat, second image via OS X.
    The document is intended to become a Template for use on our company's Mac computers (running iWork 09 / Mountain Lion currently), and these computers will need to be able to generate PDFs from the template.  It is not helpful for us to have to install Acrobat X on every machine simply to allow this to happen. 
    Is there a way to adjust the settings for PDF creation within OSX to correct for this problem?
    Any suggestions would be most gratefully received.

    Hi Tom,
    Really helpful suggestions.  Don't solve problem, but do get me much closer.  I checked the embedding information as you suggested, and the Font is being embedded in both the OS X document and the Acrobat document, but the way in which the font is embedded is different between the two documents. 
    Separately, I checked what the document looks like in Acrobat (not tried this previously, as most of our machines don't have it), and the two documents look the same.  Also, Preview prints both documents to look the same.
    So in a way I suppose I don't need to worry about it - it looks ugly, but is not affecting the function of the document generated.  But would be better if I could get Preview to not produce jaggy text if I could (as we can't afford to install Acrobat on machines just to eliminate this problem).  Any ideas?
    Background information...
    Here is the information reported by Acrobat about font embedding for the Frutiger Light font - first image for the OS X generated document, second for the Acrobat generated document:
    The report on embedding is quite different. 
    The OS X generated file has embedded a "Type 1" subset of Frutiger Light five times, using Custom and or Roman encoding.
    The Acrobat generated file has embedded a "Type 1" subset of Frutiger Light twice using ANSI and Custom encoding and has also embedded a third subset of type "Type 1 (CID)" with encoding "Identity-H".
    Second, another view of the file when viewed in Preview, even more zoomed in that previous one - the first two images from left are OS X generated (export / best, print / save as PDF), the third is Acrobat generated, and has much less jagged edges on d or W for example:
    Here are same documents (in same order) viewed in Acrobat - text renders the same in each case.

  • Fonts not embedding for iOS app in App Store

    Hi all,
    I'm having an issue using embedded fonts. Currently, I use 6 or so font files throughout my app. These fonts all display properly in the AIR simulator, as well as developer builds installed on the actual device. The problem comes about when I make actual builds for the App Store. The only thing I'm changing is the provisioning file and certificate, and yet none of these fonts display correctly. It looks like it's defaulting to Arial or something, like when you set embedAsCFF incorrectly.
    I'm currently waiting on a build to be approved where I can switch between two versions of the fonts, one as embedAsCFF=true, the other as embedAsCFF=false.
    Because the stock SDK wasn't working, I'm using Apache Flex 4.11 SDK, with AIR 13 beta and I'm SURE that I installed the Font Embedding tools with the SDK. I just realized while writing this post that Flex 4.12 is now available, so I'll try to download and make a build with that.
    Does anyone have any idea why these fonts would be missing when going from the developer build to the App Store build? The intensely frusterating thing about this is that everything will work in the test builds, and a week later when my update makes it to the app store it isn't working and I have to wait another week to try to fix it.

    Don't worry it's not your device.  A lot of people using IO5 are having this problem for the past 6 hours.  Apple should address it soon.  If you need to search for apps you can either google the name of app in Safari and click on the link.  This should open the app in the App Store.  Other work around is if you have a program like AppShopper it will let you do a search that opens the App in the App Store. 

  • Use of fonts embedded in photoshop for commerical use? (Static content, like images)

    Hello.
    I am developing a Mobile game for Android, and I can't stop thinking about if i am in the clear when it comes to the use of fonts. I've searched the web, but can't really find a clear answer.
    I am using only font embedded in photoshop/illustrator, and only displaying them in static content, such as Images/logos. So my question is, am I in the clear, or do I need som kind for special license for this?
    FYI I am mostly using the MonoType Impact font. I stumbled over this though, its Monotypes Imaging EULA for fonts ( I think). It says :
    You may embed static graphic images into an electronic document, including a Commercial Product, (for example, a "gif") with a representation of a typeface and typographic design or ornament created with the Font Software as long as such images are not used as a replacement for Font Software, i.e. as long as the representations do not correspond to individual glyphs of the Font Software and may not be individually addressed by the document to render such designs and ornaments.
    Would appreciate any help, thanks!

    you can access them from <bpelx:exec> activity and you can pass these returned document to underlying java class.
    Re: getVariableData in Java Exec

  • No Font-Embedding using AIR 3.0 in Flash Professional (for iOS Development)

    Hey there,
    we're developing some plain AS3 projects using Flash Professional (to compile) and Flash Builder.
    All is working good with the new AIR 3.0 release and performance is better than with AIR 2.6
    I followed this tutorial and simlar to use AIR 3.0 instead of AIR 2.6:
    http://kb2.adobe.com/cps/908/cpsid_90810.html
    Sadly today we saw a new issue with font embedding. Neither using Flash Professional itself or Embed-Tag in the code itself works. Also we see that the SWF size does not change when adding multiple fonts.
    Anybody has a clue where this issue might be caused? I can think that the way fonts are embedded has changed in AIR 3.0 and it's not working with the "replace AIR 2.6 with AIR X.Y trick".
    Any help welcome.
    Best,
    Cedric

    Hi,
    yes. It works now.
    The problem was the TLFTextField itself. Strangely in debug on my Mac fonts showed of correctly, but on the device not. So I assumed that there was an problem of embedding.
    But after changing setDefaultFormat to setFormat, then setting the tlftextfield.htmlText = ".." and after that doing tlftextfield.textFlow.flowComposer.updateAllControllers(); it works on the device.
    Strange to me, that with active fonts on my Mac it works without updateAllControllers - but on the devices not.
    Thanks for the hints.

  • Font usage (=fonts embedded in Illustrator)for stock design (=commercial purpose)

    Hi,
    I have a question concerning the commercial usage of the fonts incorporated in Illustrator. Is it legal to use  them (after converted into outlines) for creating stock vectors and then selling them on stockphotos/designs web pages? If I have purchased the product itself, do I have to purchse also the embedded fonts separately in order to create files for commercial purposes? I would be grateful if you could provide me a clear and concreate answer. I have been searching for a month to get a response and I haven't found it yet. Thank you very much for your precious help.

    I will assume that by “fonts incorporated in Illustrator” you actually mean fonts that are installed by Adobe as part of the installation of Illustrator. My response also applies for any other fonts licensed from the Adobe Type Library directly from Adobe.
    You may use and embed fonts using Illustrator, InDesign, and Photoshop PDF and EPS output file formats without any restriction. That includes embedding them in files that you license to others. You don't need to outline or rasterize the text to remain legal. In fact, outlining degrades output quality since you lose “intelligent scaling” provided by the font technology and font definitions with result of overly bold and blotchy looking text at low magnifications and resolutions. Rasterizing is even worse since the results are tied to a particular resolution.
    What you may not do is to sell artwork in .AI (Illustrator), .INDD (InDesign), or any one of the Photoshop formats with layers preserving live text and include the fonts as separate files. (You obviously could distribute such source files without the fonts and point your customers to where to license them!)
    Clearly, the best option in terms of output of your artwork and designs for resale would not outlining or rasterizing text and saving or exporting as PDF (either PDF/X-4 or High Quality Print options) maintaining color management and live transparency (if used).
              - Dov
    PS:  This advice with regards to fonts may or may not apply to fonts sourced elsewhere. You must read the EULA (End User License Agreement) associated with the fonts you plan to license. Some may allow embedding but require royalties for the distributed PDF or EPS files that have the fonts embedded. Some prohibit outlining or treat outlining the same in terms of restrictions as embedding the font itself. And some have similar restrictions on rasterization. Check such terms before you license a font!!! Yes, you must read the licenses!

  • Font Embedding in dynamic TLFTextField

    hi, how to get the same features of a static text field in TLF TextField dynamically;
    for eg. I kept a static text in stage with features like font family= "verdana", color="0x000000",  bold = true, font size =14.
    i created a TLF TextField  dynamically, with same features, but the UI is not exactly the same,
    can anyone help me to solve this,
    Thanks in advance.
    // Coding sample-------
    package com
    import fl.text.TLFTextField;
    import flash.text.TextFormat;
    import flash.text.Font;
    import flash.display.MovieClip;
    public class Document extends MovieClip
      private var format:TextFormat;
    //Stage size = 400*200 ( For Testing )
      public function Document()
       createFormat();
       var TLFText = createTLFTextField();
       TLFText.text = "Font Embedding Problem";
       TLFText.defaultTextFormat = format;
       TLFText.embedFonts = true;
      private function createTLFTextField():TLFTextField
       var txt:TLFTextField = new TLFTextField();
       txt.x = 250;
       txt.y = 200;
       txt.width = 250;
       txt.height = 30;
       txt.selectable = false;
       addChild(txt);
       return txt;
      private function createFormat():void
       var verdana:Font=new VerdanaClass();  
       format = new TextFormat();
       format.color = 0x000000;
       format.bold = true;
       format.font = verdana.fontName;
       //format.font = "Verdana";
       format.size = 14;

    Hi,
    thnks for ur solution. it s helpful.. but still i have one issue that. how to embed fonts and change from style .. like textfield.
                    if (label.toUpperCase() == "SMALL")
                        StyleManager.getStyleDeclaration(".heading").setStyle("fontSize", 21);
                          StyleManager.getStyleDeclaration(".subheading").setStyle("fontSize", 17);
                    else if (label.toUpperCase() == "MEDIUM")
                        StyleManager.getStyleDeclaration(".heading").setStyle("fontSize", 23);
                        StyleManager.getStyleDeclaration(".subheading").setStyle("fontSize", 19);
                    else if (label.toUpperCase() == "LARGE")
                        StyleManager.getStyleDeclaration(".heading").setStyle("fontSize", 25);
                        StyleManager.getStyleDeclaration(".subheading").setStyle("fontSize", 21);
    i need to to like this way  in TextLayout framework... any possiblity ..
    pls let me know...
    regards,
    sundarapandian.k

  • How do you define which character set gets embedded with a font embedded in the library (i.e. Korean)?

    I have project that uses a shared fonts. The fonts are all
    contained in a single swf ("fonts.swf"), are embedded in that swf's
    library and are set to export for actionscript and runtime sharing.
    The text in the project is dynamic and is loaded in from
    external XML files. The text is formatted via styles contained in a
    CSS object.
    This project needs to be localized into 20 or so different
    languages.
    Everything works great with one exception: I can’t
    figure out how to set which character set gets exported for runtime
    sharing. i.e. I want to create a fonts.swf that contains Korean
    characters, change the XML based text to Korean and have the text
    display correctly.
    I’ve tried changing the language of my OS (WinXP) and
    re-exporting but that doesn’t work correctly. I’ve also
    tried adding substitute font keys to the registry (at:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
    NT\CurrentVersion\FontSubstitutes) as outlined here:
    http://www.quasimondo.com/archives/000211.php
    but the fonts I added did not show up in Flash's font menue.
    I’ve also tried the method outlined here:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16275
    to no avail.
    I know there must be a simple solution that will allow me to
    embed language specific character sets for the fonts embedded in
    the library but I have yet to discover what it is.
    Any insight would be greatly appreciated.
    http://www.quasimondo.com/archives/000211.php
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16275

    Thanks Jim,
    I know that it is easy to specify the language you want to
    use when setting the embed font properties for a specific text
    field but my project has hundreds of text fields and I'm setting
    the font globally by referencing the font symbols in a single swf.
    I have looked at the info you've pointed out but wasn't
    helped by it. What I'd like to be able to do is to tell Flash to
    embed a language specific character-set for the font symbols in the
    library. It currently is only embedding Latin characters even
    though I know the fonts specified contains characters for other
    languages.
    For example. I have a font symbol in the libary named
    "Font1". When I look at its properties I can see it is spcified as
    Tahoma. I know the Tahoma font on my system contains the characters
    for Korean but when I compile the swf it only contains Latin
    characters (gylphs) - this corresponds to the language of my OS (US
    English). I want to know how to tell Flash to embedd the Korean
    language charaters rather than or as well as the Latin characters
    for any given FONT SYMBOL. If I could do that, then, when I enter
    Korean text into my XML files the correct characters will be
    available to Flash. As it is now, the characters are not available
    and thus the text doesn' t display.
    Make sense?
    Many thanks,
    Mike

  • Can not copy text from pdf with unicode font embedded.

    Hello,
    I have a pdf with unicode font embedded in it. The pdf has no restrictions. When i try to copy some text text fro m pdf and then paste itin word, the text is not the same which i copied from the pdf. it changes.
    I have tried multiple softwares which converts pdf to word or pdf to excel. but none can do my job. what should be the problem? Kindly guide me.
    Thanks & Regards-
    rashmi

    Thanks for your prompt reply.
    As i said i have the font installed on my system. for your reference,
    following is the link to the pdf file. also the second link is the link to
    the fonts used. Kindly help me to sort this issue.
    https://www.yousendit.com/download/T2dkcHBEVEh0QTIwYjhUQw
    https://www.yousendit.com/download/T2dkcHBFQXBrYUJYd3NUQw

  • Font embedding problem PPT plugin Acrobat 9 Pro

    Hi,
    having just updated to Acrobat 9 Pro I encounter a font embedding problem when using the PowerPoint plugin (PPT2007) to create a PDF of my presentation. I am working under Windows 7 (64Bit) and use fonts from Mathematica (Wolfram). The generated PDF shows problems displaying the fonts, indicating that they have not been embedded (although font embedding of these fonts is set in the options). The problem does not occur if I directly print to the PDF printer - here all Mathematica fonts are correctly embedded (but this has other disadvantages since videos/animations are not integrated). The problem seems to be specific to Acrobat 9 since under Acrobat 8 everything worked correctly as well.
    Any ideas/solutions for that issue?
    Thanks & best regards
    Ralf

    Perhaps you may need to upgrade to version 9.2 (Acrobat support of Windows 7 begins at this dot release)?
    Be well...

  • Font substitution for Times New Roman? Why is Adobe doing this?

    I'm using Adobe Acrobat Pro version 9.2 to read pdfs created by a number of different authors. I'm running Windows 7 64 bit OS. These are NOT pdfs I have created. Some of these pdfs display an incorrect font substitution for Times New Roman and I can't figure out why. In the File/Properties dialog the font property comes up as Times New Roman, True Type, ANSI encoding (Times New Roman has spaces between the words). This font is not embedded. Adobe Sans MM is the font that my Adobe 9.2 substitutes for it, even though I have a true type Times New Roman already installed in Windows.I have installed all updates for both Acrobat and for Windows. If I select the text touch up tool to look at the text, a box comes up saying that the original font is not available and a substitute font will be used. When I look at the drop down box for fonts in Adobe, I see among all of the various fonts available, TimesNewRoman without spaces, but no Times New Roman with spaces. Does this matter?
    When I go to my Windows Control Panel Fonts screen, I see a Times New Roman truetype font available (with spaces, the same as the font the document is requesting). It says OpenType Layout, Digitally Signed, TrueTyepe Outliers. I use it all the time.
    What is required to get Adobe 9 to display this font? It looks like the document is asking for the font I have available on the system and Adobe 9 Pro just isn't identifying it. These same pdfs display just fine on Adobe Acrobat Standard 7.0 on another Windows 7 64 bit OS machine. Is there a separate font library that Adobe has independent of the Windows font library and I simply don't have a complete set of fonts for my version? I don't have the option to have the authors recreate their documents. And they display just fine on an older version of Adobe on a different machine.
    UPDATE: Adobe 9 required more than one update. I did the 300 mb update and the problem described above was still there. I checked again just now for updates, and there was another one. This one, whatever it was, fixed the font substitution problem. So the moral of the story is... update, then update again, and keep doing it until there are no more. Adobe doesn't say "there are xx updates available." You just have to keep on asking for them until it says 'no'.

    The font Radioactive is the problem. It has an incorrect internal name that conflicts with Times New Roman. Delete Radioactive and ban it from any Mac you use.

  • Font Embedding Question in PDF exported from PageMaker v7

    I am having difficulty embedding the majority of my fonts in PDFs exported from PageMaker v7. When exporting to PDFs, a "cannot embed font" error is generated.
    Technical Details:
    The fonts I have are ALL LEGAL, and were purchased with complete licenses when required.
    The fonts properties show them to be completely embedable, with no restrictions in terms of installation, etc.
    The fonts can be placed and embedded in PDFs from all other programs I've attempted this with (Illustrator, Acrobat, MSWord, WordPerfect, etc.).
    Disclaimer:
    Yes, I know PageMaker is old, and yes, I am in the process of upgrading to Creative Sutie (although, as an aside, it is extremely disappointing that even a token discount is not offered to those who have purchased every Adobe and MacroMedia software package in the past, but I digress...). However, several of my clients require PageMaker files (for a variety of reasons I won't go into here).
    Thank you in advance for any advice on what might be the underlying problem.

    When generating PDF output from Pagemaker, I've used 2 methods:
    1. File>Export>PDF
    This method works fine for a limited number of fonts (AGaramond for example), which is why I started this post. Bob Levine had suggested using Distiller instead.
    2. File>Printer Styles>Acrobat
    I usually used this method when an offset printer requires crop marks, since the other method does not provide an option for crop marks.
    This opens a window with numerous options, the pertinent ones to my question are:
    Printer: New 2002 PPD for Adobe PS Driver on file
    PPD: Adobe PDF 3015.102
    Postscript: Download Fonts (3 options):
         None
         True Type and Type 1
         True Type Only
    When I choose download "True Type and Type 1", I get the same "cannot embed font" error if I use most of my fonts (with the exception of a few that work).
    When I choose NONE for the option, the PS file is generated without errors.
    Once the .ps file is generated, I then use Distiller 4 to open the file and output PDF file.
    If I used "True Type and Type 1" for download font option, and the font does not generate an error, the PDF file is fine.
    If I used "NONE" for download font option, when I open the PDF, it indicates that the fonts are embedded. However, since I do not download the font, I am nervous that this might cause problems when I go to an offset printer.
    I do not print to a file using a printer driver (for example Linotype, Acrobat, etc.). The 2 processes I've used seem to be independent of what the default printer is on the operating system (XP).
    Thanks!

  • Font embedding works in 1.8 preview, not in 1.7.2

    Hello,
    I'm currently creating epubs and testing them in ADE. I am embedding Google Webfonts.
    I'm finding that many fonts embedding using @font-face are ignored by ADE 1.7.2. However, ADE 1.8 preview appears to show them as intended. Incidentally, the fonts are always shown correctly on ibooks.
    Could you please let me know what is wrong - is it a bug with ADE 1.7.2, or would there be a reason why it would not 'like' my Webfont TTFs? I've found at least one other user having a similar problem, apparently: http://www.mobileread.com/forums/showpost.php?p=1725479&postcount=7
      @font-face {
      font-family : 'FanwoodItalic';
                                            src: url(fonts/Fanwood/Fanwood-Italic-webfont.ttf);
      font-style: normal;
                        h2 {
      font-family: 'FanwoodItalic';
    Thanks for your help.

    Are the fonts obfuscated? If so, using what method?

  • How to extract Chinese text from font embedded text PDF?

    This is actually font embedded text PDF (Used: type 1 fonts & custom encoding) and not scanned PDF, however I am unable to extract the "Chinese language" text properly and found only the garbled text when "Copy & Paste" (or save as RTF). Kindly refer the sample PDF attached for your reference.
    Kindly advise how could I solve this problem.
    Thanks in advance for your better solution.

    As I was unable to upload the sample page PDF in my original thread, I have shared now in the following path. Kindly look into this and guide me how to extract the chinese text as UNICODE text.
    Downloading: Chinese_Text_Extraction.pdf - Uploadingit

  • CSS & AS3 Font Embedding

    We have an application which is built like so:
    Framework SWC
    Application SWC
    - Sub-application for web
    - Sub-application for desktop
    - Unit test runner
    - etc.
    The applications all share a look and feel including fonts. This was easy to achieve with Flex 3 using the trick with placing a defaults.css file at the root of the Flex Library Project. This would apply the CSS in the defaults.css file as the default theme, and font embedding calls in the CSS could refer to font files in the Flex Library Project. It worked great because we are also using a Sprite-based custom label class which embeds its font using AS3.
    Now, the CSS font embed lines only work if we also place the fonts in the Sub-application. This means we have to have the fonts copied in every sub-application for the CSS as well as in the SWC for the AS3 embedded label class.
    Is there a better way to achieve this in Flex 4, if we want embedded fonts in AS3 as well as Spark components?
    Thanks!
    Patrick

    Flex harUI wrote:
    I'm not sure exactly why you can't use Label and RichEditableText.  You
    might want to revisit that decision.
    If the font is embedded in the main app SWF and is picked up by TextFormat,
    then the most common possibility is that somehow other SWFs are being used
    to factory the FTETextField.  Maybe since styles are now per-SWF that's what
    is going on.
    I cannot use Label or RichEditableText because that particular text is being displayed in a completely Sprite-based view. We feel for that portion of the view that it is worth giving up the advantages of UIComponent to get something lighter weight.
    The font for the Sprite-based text is embedded in the class for that text field. The font for the UIComponent-based text is embedded using CSS. Is there a way to use a single compiled SWF for both? Would the SWF just be a single class embedding the fonts? That way we could pull it in at runtime. Would that work for the TextFormat as well?
    Thanks,
    Patrick

Maybe you are looking for

  • How do I move Photos from PC to Macbook Pro

    Hello Just purchased LR 2 and a new Macbook Pro.  After two weeks, glad I did it, but its about to give me Brain overload.  I've read 4-5 books and watched a dozen videos. I just installed 2 Ext HDs and want to put my catalog, library on one Ext. HD

  • Error on installing 10.2.0.1 on RHEL ppc64

    I'm trying to install 10.2.0.1 on RHEL (uname -a: Linux TEMP 2.6.9-89.EL #1 SMP Mon Apr 20 10:25:13 EDT 2009 ppc64 ppc64 ppc64 GNU/Linux). The server under that linux is IBM p5 with power processor. Therefor installation pack is 10.2.0.1 for linux on

  • Double sided printing with 6700 e

    Hi I'm using MS office on a Mac 10.8.4 I ahve searched simialr posts, but advice given conflicts. Some say this printer will not do duplex printing. I haven't the time to do the manual odd/even pages workaround, I print docs with many pages, it's too

  • Setting up Hotmail in Mail.

    Hi Everybody, question:How can i get my hotmail messages to be delivered in mail.?? thanx Maarten

  • 24" iMac don't restart!

    Hello, I run a data recover data program last night. This morning the computer was on the screen saver mode but when I restarted it, nothing happened. I just have the Apple logo with the gray wheel or simply a white screen with a DON'T sign on it (a