Hello,
I have two questions:
I am trying to embed fonts via this page in the livedocs.
- Can anyone tell me what I need to do to use an external style sheet? Should it be a style sheet or an mxml file? I saw this tutorial, which offers quite a bit of good information (some of which I also found in the livedocs) via the comments.
EDIT: here is what I am trying...
I have a class that I instantiate:
private var myTextDraw:TextSpriteDraw = new TextSpriteDraw();
How can I let this class use the font I have just embedded? See below for details on what I am trying...
Here is how I am attempting to call up the mxml file:
<mx:Style source="..assets/fontSpecifications.mxml" />
Here is my xml:
<?xml version="1.0"?>
<!-- specification for how to embed fonts -->
<mx:Application xmlns: mx="http://www.adobe.com/2006/mxml">
<mx:Style>
@font-face: {
src: url("location") | local("name");
fontFamily: 'myTimesFont', "_serif";
color: black;
fontStyle: normal;
fontWeight: normal;
advancedAntiAliasing: false;
}
</mx:Style>
<mx:Script>
[ Embed(source='../assets/Times.dfont', fontName='myTimesFont', mimeType='application/x-font') ]
</mx:Script>
<mx:Application>
Now what I don't understand is how to use the font that I have embedded (or if I am even doing this properly... note that all i want to do is get a TextField() w/ 'Times' to behave properly when I change its alpha):