Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 913941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:38:16+00:00 2026-05-15T17:38:16+00:00

am having quite alot of problems trying to use embeded fonts in flex 4.

  • 0

am having quite alot of problems trying to use embeded fonts in flex 4. Here is the situation.

I have a main application that fist load the fonts via a URL. This is the font file code:

package{
import flash.display.Sprite;
import flash.text.Font;

public class FontLib extends Sprite
{

    [Embed(source="MyriadPro-Regular.otf", fontWeight= "normal", fontName="Myriad Pro", fontFamily="Myriad Pro",mimeType="application/x-font", embedAsCFF="true")]
    public const myriadFont:Class;

    public function FontLib()
    {
        Font.registerFont(myriadFont);
        var fonts:Array = Font.enumerateFonts(false);
        trace('libsss',fonts); 
    }
}}

That seems to work ok. As the trace shows the embedded font when the font swf is loaded.

[SWF] /assets/FontLib.swf - 89,594 bytes after decompression libsss [object Font],[object FontLib_myriadFont]

Once the font swf is loaded I then load the fist module via a URL using ModuleLoader. In the module I execute the following code on creation complete to see if the fonts are loaded:

protected function bookstoremodule1_creationCompleteHandler(event:FlexEvent):void
        {

            var fonts:Array = Font.enumerateFonts(false);
            trace('bs',fonts); // This shows Verdana as a registered font
        }

Thats loaded module seem to have picked up the font:

load module success: bs [object FontLib_myriadFont]

However when I cannot get it to apply to a spark RichText component. Here is the mxml for it:

<s:RichText fontLookup="embeddedCFF" renderingMode="cff" ai:aa="2" color="#2F4160" columnCount="1" fontFamily="Myriad Pro" fontSize="18.0737" height="20" d:id="4" kerning="on" tabStops="S40.665699005127 S81.3313980102539 S121.997097015381 S162.662796020508" text="Shopping Cart (0)" d:userLabel="Shopping Cart (0)" flm:variant="1" whiteSpaceCollapse="preserve" width="168" x="53" y="12" x.down="54" y.down="13" id="richtext1">
    <s:filters>
        <s:DropShadowFilter blurX="0" blurY="0" color="#FFFFFF" distance="1.41421" quality="2"/>
    </s:filters>
</s:RichText>

The mxml definition is fine when the font is embedded directly in the module. It just stops working when the font is loaded as a swf.

Any ideas? I have tried loads of things but still having no luck 🙁

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:38:16+00:00Added an answer on May 15, 2026 at 5:38 pm

    I unfortunately don’t have too much time to have a deep look at this problem but this article might interest you :

    http://blogs.adobe.com/aharui/2010/03/flex_and_embedded_fonts.html

    It talks about registering fonts and using them in modules

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have started having some serious problems with our Java EE application. Specifically, the
I am having some trouble with really quite simple collision detection. Here is my
I'm quite new to sql and I'm having trouble writing this i have a
Have looked quite hard for this answer but having no luck. I have 3
We are having a few problems understanding how best to use NHibernate. We typically
I have a fairly complex relationship that I am trying to make work with
I've been having a lot of problems with emacs and trying to get the
I have inherited a 20-year-old interactive command-line unix application that is no longer supported
I am working inside of a quite complex eclipse based application, and having a
I am quite new to php and am having problems with the following block

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.