Posted By

adrianparr on 04/21/10


Tagged

embed MIMEtype Flex metadata as3 fonts source SDK registerFont fontName systemFont


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

tspitzr
mitien


AS3 Embed a system font in Flex


 / Published in: ActionScript 3
 

  1. package {
  2. import flash.display.Sprite;
  3. import flash.text.Font;
  4.  
  5. [SWF(width='600', height='400', frameRate='30', backgroundColor='#000000')]
  6.  
  7. public class App extends Sprite {
  8. [Embed(systemFont='Arial',fontName='Arial',mimeType='application/x-font')]
  9. private var arialFont:Class;
  10.  
  11. public function App() {
  12. init();
  13. }
  14.  
  15. private function init():void {
  16. Font.registerFont( arialFont );
  17. }
  18. }
  19. }

Report this snippet  

You need to login to post a comment.