5 Replies Latest reply on Jan 17, 2011 11:06 AM by Flex harUI

    Dynamically detecting a font's font-style or font-weight support


      Hello guys!


      How do I determine if a font that's about to be embedded, supports a certain font-style or font-weight?


      I have a couple of scenarios:

      - I'm going to load AnUnknownNewFont.ttf dynamically on my running Flex app and I want it to be embedded at runtime

      - Let's say I recently acquired 20 new raw fonts.  I can't write a code for each of those fonts to embed them manually on my application because it'll take forever.  So I'll just have to to auto generate a .AS file based on the font's properties so that later on, I can then compile it using Ant or any build tools


      Never mind if it bloats my app's file size.  Is there a better or faster way to dynamically detect if the font is capable of supporting normal, italic, bold, bold-italic?