Using Adobe® Flex® 4 - Adobe Blogs

Using Adobe® Flex® 4 - Adobe Blogs Using Adobe® Flex® 4 - Adobe Blogs

blogs.adobe.com
from blogs.adobe.com More from this publisher
30.11.2012 Views

Resolved code-reference. @font-face { src: url(../assets/MyriadWebPro.ttf); fontFamily: myPlainFont; advancedAntiAliasing: true; embedAsCFF: true; } .myStyle1 { fontFamily: myPlainFont; fontSize:12pt }

tf1.font = "myPlainFont"; var tf2:TextFormat = new TextFormat(); tf2.font = "Arial"; b1 = FlexGlobals.topLevelApplication.systemManager. isFontFaceEmbedded(tf1); b2 = FlexGlobals.topLevelApplication.systemManager. isFontFaceEmbedded(tf2); } ]]> In this example, the font identified by the myPlainFont family name is embedded, but the Arial font is not. USING FLEX 4 Fonts You can use the Font class’s enumerateFonts() method to output information about device or embedded fonts. The following example lists embedded fonts: Resolved code-reference. @font-face { src:url("../assets/MyriadWebPro.ttf"); fontFamily: myFont; advancedAntiAliasing: true; embedAsCFF: true; } @font-face { src:url("../assets/MyriadWebPro-Bold.ttf"); fontFamily: myFont; fontWeight: bold; advancedAntiAliasing: true; embedAsCFF: true; } @font-face { src:url("../assets/MyriadWebPro-Italic.ttf"); fontFamily: myFont; fontStyle: italic; advancedAntiAliasing: true; 13

Resolved code-reference.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

@font-face {<br />

src: url(../assets/MyriadWebPro.ttf);<br />

fontFamily: myPlainFont;<br />

advancedAntiAliasing: true;<br />

embedAsCFF: true;<br />

}<br />

.myStyle1 {<br />

fontFamily: myPlainFont;<br />

fontSize:12pt<br />

}<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!