Link to home
Start Free TrialLog in
Avatar of anotherfn
anotherfn

asked on

Embeding multiple fonts in a pure as3 project

I am trying to write a class which will choose a different font based on which style is chosen. I currently
have two fonts embedded within the class (and plan to have more), but I'm finding that its not possible to
choose one distinct font for each string.

I currently have two embedded font declarations like this,

[Embed(source="Fonts\\HelveticaLTStd-Bold.otf",      
      fontName = "boldFont",
      mimeType = "application/x-font",
      fontWeight = "normal",
      fontStyle="normal",
      fontFamily="Helvetica-Bold",
      advancedAntiAliasing="true",
      embedAsCFF="false")]private var boldFont:Class;

The second declaration is for a lighter Helvetica font style. With these two declarations in the code, the font text is
appearing using the lighter style when being set to the Bold font. Both have different font names, class names and point to different font files.
Currently, the only way to get the bold style selected is to completely comment out the Light font style. How can we include and use multiple typefaces at compile time?
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial