Apply html tag to embedded fonts

hi,
i have a textfield, i embedded fonts and assigned htmlText, i.e.
txt.embedFonts = true;
txt.htmlText      = '<b>my text </b>';
but it doesnt aplly html tags because of embedFonts... i tried to make style using css but didnt work....
is there any way to accomplish this?

I dont know it its possible in this way. I would load a text file with the html and another with the style as described here  :
http://www.republicofcode.com/tutorials/flash/as3css/

Similar Messages

  • HTML Tags in data field

    Does Documaker support reading and applying HTML tags in data fields? For example, we are publishing a list of questions that are being passed to me from the database. These questions contain embedd HTML formatting tags:
    Are you a member or do you intend to become a member of the armed forces <.i>including reserves</.i>?
    ** Please note: I had to add the . into the tag because the forum was formatting italics tag appropriately.
    I want Documaker to read the sting and apply the formats that the tags specify.
    Any help would be appreciated.
    Dave

    Dave,
    Have a look at the rule MessageFromExtr, it may help you.
    Gaétan

  • 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

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

  • Arabic characters appear as empty squares when using certain HTML tags or font styles

    Only when HW acceleration is on. Arabic characters appear as empty squares when using "italic" or "oblique" font styles or when using &lt;i&gt; or &lt;em&gt; html tags.
    Try this code to replicate the problem
    <pre>
    &lt;p&gt;مشكلة ظهور المربعات الخالية بدل الحروف&lt;/p&gt;
    &lt;p style="font-style: italic;">Italic مشكلة ظهور المربعات الخالية بدل الحروف&lt;/p&gt;
    &lt;p style="font-style: oblique;">Oblique مشكلة ظهور المربعات الخالية بدل الحروف&lt;/p&gt;
    &lt;i&gt;i tag مشكلة ظهور المربعات الخالية بدل الحروف</i> &lt;br&gt; &lt;br&gt;
    &lt;em&gt;em tag مشكلة ظهور المربعات الخالية بدل الحروف &lt;/em&gt;
    </pre>

    After lots of research, I found the problem. The boxes (squares) show up whenever there is a font in the webpage that does not have Arabic within its Unicode range such as Times New Roman Italic or Oblique. Normally, Firefox will pick another font to display the characters but now, a newly introduced feature is interfering.
    To fix the problem without turning off hardware acceleration.
    Go to about:config
    locate: gfx.font_rendering.directwrite.use_gdi_table_loading
    which is True by default in FF4.0 Beta 10, and change it to False.
    This is a bug that has to be fixed.

  • 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

  • Unable to undo applied embedded fonts

    Hello All,
    I have application with text box created with  container controller and textflow.
    Also I have applied embedded fonts dynamicaly using
    styleManager.loadStyleDeclarations2(url,false);
    but after this when I try to undo, previous font is not get applied.
    When I debug the application, i fonund that generation is number is mismatch.
    please anybady know why it is? When I apply different font size or any other property link color, Undo works properly.
    Thanks,
    Vikram

    Undo can only undo those changes that are inside operations. If there are direct model changes (changes resulting from an API call that is NOT in an operation), this will cause a generation number mismatch. Undo will be blocked because the model has changed. I would suggest finding out what it is you are calling that is incrementing the generation number, but is not inside an operation.
    - robin

  • Using HTML text with an embedded font in Flex 4

    I have spent a day searching the interwebs and have not found a working example of how to use an embedded font with html formatting.
    Anybody know if it can even be done??

    Should be doable, but all fonts used in the html have to be embedded, and
    one of the fonts should be specified as the fontFamily for the component.

  • Unable to apply embedded font swf to text in text layout framework

    Hello,
    We have created a swf for a given font (for e.g., Calibri.swf) which contains all the styles (Regular, Italic, Bold, BoldItalic).
    We have created a xml which lists the name of the font and the corresponding swf file path. The names from the xml are loaded into a combo box in the application.
    When we try to apply the selected font to a text in the text layout framework, it does not apply the same. It sets the font to default "Times" font.
    Following is a snippet of code to apply the font to the text:
    private function selectFont(fontXML:XML):void {               
                    var path:String = fontXML.@source;
                    var myEvent:IEventDispatcher = styleManager.loadStyleDeclarations(FlexGlobals.topLevelApplication.url.substring(0,FlexGl obals.topLevelApplication.url.lastIndexOf("/"))+"/"+path);
                    myEvent.addEventListener(StyleEvent.COMPLETE, function(event:StyleEvent):void{
                        var editManager:EditManager = textFlow.interactionManager as EditManager;
                        var itextLayout:TextLayoutFormat = new TextLayoutFormat();
                        itextLayout.fontSize = 20;
                        var fontName:String = fontXML.@name;
                        Alert.show(fontName);
                        itextLayout.fontFamily = fontName;   
                        Alert.show( "itext = " + itextLayout.fontFamily);
                        editManager.applyFormat(itextLayout,itextLayout,itextLayout);
                        var flowLeafElement:FlowElement = textFlow.findLeaf(editManager.anchorPosition) as FlowElement;
                        editManager.changeStyleName(fontName,flowLeafElement);
    Can anyone please let us know what is missing in the implementation?
    Thanks in advance.
    Vikram

    My recommendation: unless you really care about ISWFContext implementations and the application domain issues, ignore Alex's post about embedded fonts.
    It is a nice discussion about the inner workings of the domain and security of how this works but it is imho broken and is an insane concept to require an ISWFContext to just use an embedded font. It also breaks runtime CSS loading that has fonts embedded in it because the Flex compiler (last I checked) was also busted – it doesn't include the function necessary to create within context the font embed so that it may be applied. You can't create an ISWFContext with a compiled CSS file.
    These issues were introduced in the last Flex SDK beta before FB4 was released in final form. There are multiple bugs logged against the issue of applying loaded font files to TLF text (in short, SWFContext is broken and you have to override GlobalSettings.resolveFontLookupFunction to return embedded or null, all the time).
    Here's some more details to get you started - with links to at least one of the SDK bugs that were filed:
    http://forums.adobe.com/message/2656152
    For example:
    import flashx.textLayout.elements.GlobalSettings;
    import flash.text.engine.FontLookup;
    GlobalSettings.resolveFontLookupFunction = function makeValid():String { return FontLookup.EMBEDDED_CFF };
    And you may need to do this after your font is loaded:
    yourTextBlock.textFlow.invalidateAllFormats();
    Disclaimer: I haven't seen the latest Flex SDK release to see if this was fixed. I have an AIR application with native process that builds embedded font SWF files for use and stub code for FB4 usage but haven't updated to the latest SDK yet to see if it's working properly.
    Anyhow, your best bet is to look at the Flash Builder forums. I think this is/was a Flex team issue, not TLF.

  • Embedding html tags within a report

    I have an interactive report in which I'd like to indicate new table entries.
    I have a case statement on a column that checks the date that the entry was added and if it was added recently I concatenate a gif to the column value which indicates "New" entry. This works great in a standard report but when I add the code snippet to an interactive report it displays the html img tag rather than the actual image. Can anyone tell what I need to do to cause the report to render the image rather than just display the html tag?
    Thanks.

    Hello,
    In your Report Attributes, make sure that your columns Display Text As is set to Standard Report Column. I expect it's set to display as text?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Help needed in adding effects of certain HTML tags in Flex spark Richtext

    I want to apply the effects of the following HTML tags/ attributes, in my HTML text rendered in Flex Spark Richtext Component.
    Superscript - <sup>
    Subscript - <sub>
    Blockquotes - <blockquotes>
    Ordered Lists - <ol><li>
    Unordered List - <ul><li>
    Horizontal Rule - <hr>
    Direction Attribute for <p> - <p dir="rtl">Hello</p>
    Background Color for <font>
    I have observed that the above tags have no effect in RichText. Is this a limitation?
    Any solutions, tweaks and tricks will be appreciated...
    Thanks,
    Mangirish

    check this out . this should be able to answer you question.
    http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
    Miguel

  • Embedded font flips in combo box

    I have an Flash builder 4 project with 3.5 backwards compatibility
    i'm using an mx combobox. as soon as i set an embedded font to it, the drop down gets flipped as if xScaled to -1
    i'm embedding my font like this
    @font-face {
        src: url('../libs/fonts/helvetica/HelveticaNeueLTStd-Roman.otf');
        fontFamily: "_HELVETICA NEUE LT";
    @font-face {
        src: url('../libs/fonts/helvetica/HelveticaNeueLTStd-Bd.otf');
        fontFamily: "_HELVETICA NEUE LT";
        fontWeight: bold;
    /* CSS Document */
    Canvas {
        font-family: "_HELVETICA NEUE LT";
        font-size: 16px;
        color: #333333;
    and all i have on my application is this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    layout="absolute"
                    width="1400" height="768"
                    frameRate="99"
                    backgroundColor="#000000"
                    backgroundGradientColors="#000000,#000000">
        <fx:Style source="../libs/MXMLStyles.css"/>
        <mx:Canvas>
            <mx:ComboBox dataProvider="{['a','b','c']}"/>
        </mx:Canvas>
    </mx:Application>

    Hi,
    You are using flex 3 (sdk 3.5), fx tag is flex 4.
    Call your css file like this:
    <mx:Style source="../libs/MXMLStyles.css"/>
    Here is a help for css
    http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html
    Rgds
    Johnny

  • Best way to format text: HTML tags or CSS?

    Probably a silly question, but...  I can format the text within a div using CSS Styles (Font-size, Font-Style, Font-Weight, etc.) or by applying an HTML tag, such as <H1>. (Or, I guess a combination where I use CSS to format the tag, but let's skip that one for now.)
    In general, is one approach better than the other? Thanks!

    +1 Nancy. The specific tags exist today simply because of the meaning it adds to your site at the backend - especially for search engines to understand what's going on with your site. And since search engines dont 'see' your page, but 'read' your code, these tags are the only hope for them to figure out what your site contains and how to place it on their results.
    On a sidenote, the first method of using inline styles is time-consuming and results in larger filesizes since you'll end up doing it for each div tag. The second method is much simpler as you can style each individual tag in CSS and re-use them anywhere you want on your site.

  • Gumbo text elements and embedded fonts

    Hi again,
    ok I found the solution. The first time, I searched in the "CSS Advanced Selectors" spec document for the solution and I found nothing about it. Then I had the "great" idea to look in the only right place which is of course "Text Primitives (TextBox, TextGraphic, and TextView)". There I found the hint about "DefineFont4" which, with some search, led me to the solution:
    1. Add the new property "cff: true" in the "@font-face" css block
    2. Set the property fontLookup="embeddedCFF" for the text element
    et voilà!
    I hope this will save somebody else some time!
    Haykel Ben Jemia
    Allmas
    Web & RIA Development
    http://www.allmas-tn.com

    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

  • Stripping selective HTML tags?

    Anyone have a "best practice" for stripping (or allowing) certain HTML
    tags on an insert/update transaction? I'm using TinyMCE in my forms
    which does this automatically, but if a user has javascript disabled
    they can bypass the TinyMCE stripping and still submit text with all
    sorts of dangerous HTML code.
    Is there a preferred method anyone has?
    Alec
    Adobe Community Expert

    Hi Alec,
    I´d first suggest to define all your "disallowed stuff" rules in an external function, which basically uses preg_replace (or str_replace in simpler cases) plus some regular expressions to replace whatever patterns with '' -- in addition you could also integrate the strip_tags function right here, like this:
    function block_content($what){
    $what = strip_tags($what, '
    $what = preg_replace('/<\/{0,1}font[^>]*>/i', '', $what);
    $what = preg_replace('/^
    <\/p>/i', '', $was);
    $what = preg_replace('/^(?:
     <\/p>)/im', '', $what);
    $what = preg_replace('/style="BACKGROUND:.*"/i', '', $what);
    return $what;
    But I'd like to clean it when it's actually written to the database
    rather than when I'm pulling it out
    please try with establishing as Custom Trigger (type: BEFORE) and clean the contents by applying the "block_content" function to $tNG->getColumnValue("columnname"):
    $tNG->setColumnValue("columname", block_content($tNG->getColumnValue("columnname")));
    it´s a little experimental, as I haven´t done that before, but I think it should work ;-)
    Even so, users can still insert dangerous attributes
    well, good luck with trying to capture all possible dangerous stuff in this function :-)
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for

  • How many iCloud accounts can you create on Mac?

    I use different emails for different purposes (subscriptions,  shopping, forums, iTunes, etc.). With that in mind, I created 3 iCloud email accounts on my iPad and upon trying to register a 4th one I was told that this device is no longer eligible to

  • Retrieve the sales orders for a particular customer in selection screen

    Hi I want to retrieve the sales orders for a particular customer(entering customer number field in the selection screen and then clicking on f4 help on sales order field in the selection screen I should get only sales order numbers for that particula

  • XI sync communication

    hi, what are the advantages and limitations of using synchronous communication on an XI perspective. thanks in advance

  • Error in printing - error code 80070003

    HI, We have report viewer control redistributable 2010 and it was working fine. But Recently we install Microsoft updates and now while printing from report viewer we are getting error "error in printing 0x80070003". We installed below updates. KB292

  • Plantage d'illustrator avec des images importées (CS6 64 bits pour Windows)

    Bonjour, Je travaille (en entreprise) sous Adobe CS6 (64 bits). Depuis ce matin, lorsque j'essaie d'enregistrer (ou d'imprimer) mes compositions qui contiennent une image importée, Illustrator se ferme avec une petite fenêtre windows "Illustrator a c