Posted By

linkage on 09/24/08


Tagged

as3 fonts embedding


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

Paco
Bonky
THEPWN3R
vip4lyf
zimmen
edsonpavoni
quan
abbey
kojok
tspitzr


Embedding Fonts in AS3 - Assets Class


 / Published in: ActionScript 3
 

  1. package
  2. {
  3. public class Assets
  4. {
  5. [Embed(source='fonts/arial.ttf',
  6. fontName='Arial', unicodeRange='U+0010-U+007F,U+00C4,U+00D6,U+00DC,U+00E4,U+00F6,U+00FC,U+00DF',
  7. mimeType='application/x-font-truetype')]
  8. public static var ArialBold:Class;
  9. [Embed(source='fonts/arialbold.ttf',
  10. fontName='ArialBold', unicodeRange='U+0010-U+007F,U+00C4,U+00D6,U+00DC,U+00E4,U+00F6,U+00FC,U+00DF',
  11. mimeType='application/x-font-truetype')]
  12. public static var Arial:Class;
  13. }
  14. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: linkage on October 7, 2008

if your "Assets" class is in your classpath, and you use mxmlc compiler (eclipse and fdt) just add "-includes+=Assets" to your compile arguments

You need to login to post a comment.