Embeded Fonts and Externally Loaded Text?

Just curious, I am designing a site with two embeded fonts. I am also using many externally loaded textboxes styled by a CSS. When I use the inline HTML in the .txt file, can I specify the embeded fonts for the text boxes or will they just use default browser fonts?
Thanks in advance,
Jeff

I think what I need to do is place an instance of a text box on each page, so when you navigate away from the page the existing text box will leave. This works, but I can't get the CSS to do the formatting. Here is the code I have, any suggestions?
var fileTxt:String;
var myTextLoader:URLLoader = new URLLoader();
var cssLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
myTextLoader.load(new URLRequest("text/tgc.txt"));
function onLoaded(e:Event):void{
    fileTxt=myTextLoader.data;
    callCss();
function callCss():void{
    var cssRequest:URLRequest=new URLRequest("styles.css");
    cssLoader.addEventListener(Event.COMPLETE, onCss);
    cssLoader.load(cssRequest);
function onCss(e:Event):void{
    var css:StyleSheet = new StyleSheet();
    css.parseCSS(cssLoader.data);
    tgc_txt.styleSheet=css;
    tgc_txt.wordWrap=true;
    tgc_txt.htmlText=fileTxt;
Like I said, it loads the text fine and eliminates the embeded HTML tags in the .txt file. It does not change color, size or weight as I have in the CSS.

Similar Messages

  • Embedded fonts with rich editable text

    Hi, I am trying to use my embedded fonts in rich editable text field, but it only works for users that already have that font installed on their system.
    This is what I do.
    I embed fonts like this:
         @font-face {
                src:url("fonts/Cantarell-Regular.ttf");
                fontFamily: Cantarell;
                advancedAntiAliasing: true;
            @font-face {
                src:url("fonts/Cantarell-Bold.ttf");
                fontFamily: Cantarell;
                fontWeight: bold;
                advancedAntiAliasing: true;
    Then in my DropDownList (id=fontPicker) I add a new string entry that references my new font (in this case "Cantarell")
    I have a custom item renderer which makes sure to print out the name of the font using the font itself, so that for example font name "Cantarell" will be printed out using Cantarell font. Code in my custom font item renderer looks like this:
    <s:Label id="labelDisplay"
                 fontFamily="{data}"
                 verticalCenter="0"
                 left="3" right="3" top="6" bottom="4"/>
    And this part works, even if you dont have the font installed on your system, the name of the font is displayed propperly.
    The thing that I want to do is to select some text in my rich editable text field and change the font of the selected text depending on what user selected from the dropdownlist. I added an event which is called once user selects new font type, and it performs following code on the selection in rich editable text:
                   if(fontPicker.selectedIndex == -1){
                        //user did not select anything, we do not change the font
                        text.setFocus();
                        return;
                   //we get the text layout format of the selected text
                    var txtLayFmt:TextLayoutFormat = text.getFormatOfRange(null,text.selectionAnchorPosition,text.selectionActivePosition);
                   //we change fontFamily of the selected text to the font that we just picked
                    txtLayFmt.fontFamily = fontPicker.selectedItem;
                    // I even tryed to add those two following lines without much help
                    //txtLayFmt.fontLookup = FontLookup.EMBEDDED_CFF;
                    //txtLayFmt.renderingMode = RenderingMode.CFF;
                   // we update our selected text with new font
                    text.setFormatOfRange(txtLayFmt,text.selectionAnchorPosition,text.selectionActivePosition );
                    text.setFocus();
    This code works perfect if user has the font installed on their system but it does not work if they dont have the font even if I embed the font.
    What I am doing wrong, any suggestions, tips, links?
    Thanks,
    Dal

    Thanks I will take a look at your blogs, maybe I find some explanations.
    Once it comes to my problem, I found a solution, I just needed to add a simple style:
            .mystyle1 {
                 fontFamily:Cantarell;
    and set the styleName of my text to it:
    text.styleName = "mystyle1";
    Afterwards I can dynamically change fonts and sizes of the text selections in my rich editable text field as much as I like.
    Also I need to make sure that I set embed-as-cff: true;
          @font-face {
                src:url("fonts/Cantarell-Bold.ttf");
                fontFamily: Cantarell;
                fontWeight: bold;
                advancedAntiAliasing: true;
                embed-as-cff: true;
    I hope this helps someone.
    And if anyone has explanation to why embedded fonts work only after I change styleName of a text to a random style, please share with me.
    Cheers,
    Dal.

  • When Patch for embedded fonts and Lion OSX to be released?

    Was reading through the thread about the problem with embedded fonts and Lion OSX and a patch being released the 3rd week of August. Does anyone know about the patch being released?

    This patch was released as 11.5.9 a couple of weeks ago. See this thread:
    http://forums.adobe.com/thread/895280?tstart=0
    You should be able to get it through the Help / Check for Updates menu - but I would definitely be aware that it seems to have created a couple of new issues for some users (documented in other forum posts at forums.adobe.com).

  • Embedded fonts and hidden text

    I've just discovered that any font used in hidden text only isn't embedded. Has anyone else found this?
    My hidden text includes Times New Roman italic. This text becomes visible on the preprint event. TNR italic isn't used for any non-hidden text. If the user fills out the form and prints it, fonts are perfect. However, if the user fills out the form and saves it, TNR italic isn't embedded in the form. Later when the user opens the form to print, the previously hidden text actually prints in Arial!

    Yes, you can dynamically load the needed fonts at run time.
    Doc is here:
    http://livedocs.adobe.com/flex/3/html/styles_10.html
    hth,
    matt horn
    flex docs

  • Embedded Fonts and HTML Text

    I am attempting to use a non-standard font in an HTML dynamic textbox using the <font> tag.  I have embedded this font using the textbox properties box and the fonts appear in the library.  According to previous posts to this form, that should do it.  But, my fonts are not appearing correctly.  Any advice?

    OK,
    I have given up messing with stylesheets, trying display:
    block, inline, different ways of formatting the XML, messing with
    XML.ignoreWhiteSpace, and XML.prettyPrinting etc.
    I went down the route of encodeURI, using a RegExp to strip
    out all tabs, linefeeds and carriage returns. This now gives
    consistent results for all situations, even embedded and none
    embedded fonts.
    e.g.
    _text:String = TEXT FROM XML, HTML TEXT etc
    var st:String = encodeURI(_text);
    var pattern:RegExp = /(%09)+|(%0A)+|(%0D)+/g;
    st = st.replace(pattern, "");
    st = decodeURI(st);
    YOUTEXTFIELD.htmlText = st;
    The <p> tags still behave as a <br/> tag, but you
    can add an extra <br/> to simulate a paragraph.
    Here is the example again with the updates,
    Hope this helps someone

  • 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

  • How to make mouseover scroll buttons attached to textarea with external loaded text ?

    Hi,
    I am working in Flash CS3 and AS3, and I'm not good in
    scripting.
    I want to make a dynamic textarea with loaded text from an
    external textfile, and then I want custom made arrow buttons to
    start scrolling the loaded text on mouseover (not click) andt stop
    scrolling on mouseout. Ala like in this webpage:
    http://boomjinx.com/
    The part with the loaded text is fine, but I can't manage to
    script the arrow buttons to do what I've just described. Even
    though I have searched the Internet for recipes I just find how to
    scroll loaded text on click or with a scrollbar. This problem is
    starting to drive me crazy!! Is there anyone that have a recipe for
    this??

    Here's one approach:
    First you need to create a dynamic mutline textfield that has
    autoSize properties set to handle a varying amount of text.
    Then you need to embed the font because you are going to use
    a mask over the textfield to define the viewable area of it.
    Then you will use the buttons to change the textfield's y
    property to move the textfield up/down vertically. You will
    probably need to use an ENTER_FRAME event handler so that a
    continuous hovering of a button will cause the textfield to
    continue moving until it either reaches one end or the other or
    when the hovering ends.
    Before you try to tackle that though, just make it so that
    hovering a button will cause the textfield to move up or down one
    increment of distance. Just take it one step at a time.

  • 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 and images for printing (press quality PDF)

    I have a question about a document I have produced in InDesign that needs to go to the printers. They have told me to make sure it is a print ready document with all of the fonts and images embedded. When I convert an indd document for printing 'locally', I normally just use the Adobe PDF presets and select press quality. I thought ID works its magic and does everything required to make it print ready. Is there anything else I need to do regarding fonts and images to make the PDF ready for print?
    Thanks
    Mark

    Thank you.
    As to bleeds, the printers came back and said my pdf is okay but that yes, I need to set an extra bleed edge of minimum 3mm. Do I set this when converting to the print quality pdf or do I set this whilst working in the actual INDD document itself?
    Is the bleed then on every page regardless of the content?
    What are the steps for setting bleed and crop marks. Does that mean when I place an image for example on a page the image needs to hang slightly off the edges by 3mm or am I barking up the wrong tree?

  • Understanding DirectAccess and external load balancer

    Hi,
    I'm trying to understand the concept of DIPs with a external load balancer. We're trying to create a Directaccess cluster with to DA-servers in edge. I'm at the wizard for creating load balancer and choose external. Then it asked me to enter the DIPs. But
    why is that? Should it not be sufficient with the current IP-address, since they are configured in the external LB. Or do I need to add a secondary IP-address and enter that in the wizard and enter them has the VIPs inte the external LB. Same goes for the
    internal one.

    Does that mean that i could choose any IP-address in the private range, despite that i have an edge configuration with one public ip-address and one internal address? Or do i need to allocate another public IP-adress?
    Edit:
    http://blogs.technet.com/b/mspfe/archive/2013/01/24/how-to-configure-directaccess-in-windows-server-2012-to-work-with-an-external-hardware-load-balancer.aspx
    When following the guide, I use the current IP-address of the first nods external NIC. And get an warning I can't use that IP. Should I use the VIP that we have for the load balancer?

  • Embedding font and animating

    Hi
    I want to use and embedd a windows 7 font.
    Whats the best way to animate this font? It's just moving slowly but its not as smooth obviously as static.
    I could vectorise, but this still isnt that smooth. Whats the best solution you guys use? I've seen websites with unusual font and animating smoothly before but I don't know how they do this!
    Thanks

    Oh...I didn't specify this, but it is people using the actual AOL client (both windows and mac) that can't see it.

  • Embedded Fonts shift on load/during animation

    I am running into a display issue with fonts on a s:ButtonBar in my application and I can't seem to find this documented elsewhere. My fonts shift on my buttons when either an animation is occurring or when the Module (in a mx:ModuleLoader) is loading. I can consistently reproduce this by clicking a button on the ButtonBar, and moving my mouse over other buttons while the animation on the page is happening. This causes the fonts that were hovered over to "jump" around. They seem to position top left. The fonts DO end up positioning correctly in the end. Any ideas would be greatly appreciated. (screenshots attached)
    Some things to note:
    - I am loading CSS stylesheets on the fly, but they are not loading on this page. At this point they should arleady be loading.
    - The are embedded OTF fonts.
    Normal:
    During animation / loading:

    It looks like removing all font embeds (use the default font) still causes this to happen.
    Normal:
    While loading / animating:

  • Map and externally loaded swf working together

    Here's the setup:
    I have a panoramic viewer, and i'd like to have a map go
    along side it. The panoramas are loaded externally into the player.
    Inside these external swf files are "hotspots" that link to other
    panoramic swf files that load and take the previous swf's place. I
    have all of this set up, and you can see how I did it in my
    previous post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1274410&enterthread=y
    So now my new question is... how can I have a map with points
    on it, that when you click on a point, it will load a corresponding
    swf file into the player. I believe that part is easy. My big
    problem is if someone clicks on a hotspot in the external swf file
    first, which in turn loads another swf file, and if that person
    goes back to the map, I want the map to change the position of lets
    say, a marker or a pin to indicate the new position on the map that
    correllates to the new external swf that was loaded.
    make sense? Any ideas? I was thinking maybe it would be some
    kind of listener or something so that should a specific swf load,
    it will recognize it and automatically change the location of the
    marker on the map to the point that relates to the loaded swf or
    something...

    Hi Thanks for your reply, I tried with a small AS3 file as
    well and I get the same ERROR.

  • Embedding fonts and broken up type in PDF's created in MS Word

    Win 7, Acrobat 9, MS Word 2010
    As we all know, Word by default doesn't embed fonts when saving as a PDF. We usually solve that problem by using the embed font preflight. The problem is that sometimes the paragraph text is broken up into a billion (well maybe a couple dozen) small chunks of text. When you apply the preflight, it can cause the type to shift position as in the sample:
    Any idea why Word will sometimes do this and other time will not?
    Thanks!
    Mike

    Thanks, Bill. I'm in a school district copy and print center and we don't have control over how the PDF files are generated most of the time. My initial testing did show an improvement printing to the Adobe PDF printer vs. saving as a PDF when it comes to chunking up the text. It doesn't solve my problem but it does throw some light on Word's behavior.

  • [svn:fx-trunk] 6191: Fix more bugs related to embedded fonts and TLF, including TLF in an RSL.

    Revision: 6191
    Author:   [email protected]
    Date:     2009-04-21 22:02:29 -0700 (Tue, 21 Apr 2009)
    Log Message:

    Gordon, it looks like its been a while since you made this post.  Not sure how valid it is now...   I am particularly interested in the LigatureLevel.NONE value.  It seems that it is no longer supported.
    How do I turn of ligatures in the font rendering?
    My flex project involves trying to match the font rendering of Apache's Batik rendering of SVG and ligatures have been turned off in that codebase.  Is there any way (even roundabout) to turn ligatures off in flash?
    Thanks,
    Om

Maybe you are looking for

  • File Content Conversion Error in PI 7.1 (file to Proxy)

    Hi I am working on File to Proxy Scenario and I gave the File content conversion as below, File is picking up by the PI Server when I look at Communication Channel Monitoring, However when I open the Message ID in the CC monitoring it says as 404 Not

  • Read only table in jdeveloper11

    I use a read only af:table in my page.. 1-as the page loads for first time , I want to navigate between rows as using up/down arrow keys. How can I focus on the first row to navigate... 2- if I can make partial trigger script , I think I will be able

  • A VERY Strange Eclipse Error

    I have a test class which I am running as an application in Eclipse to test the behavior of another class, MyClass: public class TestMyClass {      public static void main(String[] args) {           MyClass mc = new MyClass();           mc.method1();

  • CHS 435HDC error code Er:21

    Tried resetting the modem and cable box but the box will not turn on. It keeps displaying Er:21 error code. I believe the box is dead but Does anyone know what that error code is? Thanks, CT Solved! Go to Solution.

  • Avg_space in dba_tables

    Hi I want to confirm that whether avg_space in dba_tables indicate free space below high water mark or not. Regards Jewel