/ Published in: ActionScript 3
Expand |
Embed | Plain Text
// Embed a font that is alreay installed on your system like this ... [Embed(systemFont = 'Arial', fontName = "ArialRegular", fontWeight = "normal", mimeType = "application/x-font-truetype")] private static var ARIAL_REGULAR_FONT:String; [Embed(systemFont='Arial', fontName = "ArialBold", fontWeight="bold", mimeType = "application/x-font-truetype")] private static var ARIAL_BOLD_FONT:String; // Embed a font using it's file like this ... [Embed(source='../assets/fonts/arial.ttf', fontFamily = "ArialRegular", fontWeight="normal", mimeType="application/x-font-truetype")] private static var ARIAL_REGULAR_FONT:String; [Embed(source = '../assets/fonts/arialbd.ttf', fontFamily = "ArialBold", fontWeight="bold", mimeType = "application/x-font-truetype")] private static var ARIAL_BOLD_FONT:String; // You could then use these embedded fonts in your CSS like so ... .title { font-family: ArialBold; font-size: 16px; color: #000000; text-align: center; } .body { font-family: ArialRegular; font-size: 12px; color: #000000; text-align: left; }
You need to login to post a comment.
