PDA

View Full Version : Flash fonts in Flex


sobaka11
08-14-2006, 10:09 AM
Hi!
I'm trying now to convert font.tff into font.swf in Flash. I follow instructions in - Creating Flash 8 files with embedded FlashType fonts- http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000795.html tutorial. I've made 4 dynamic textfields with augustus.ttf font, embed letters in them(lowercase, punctuation), then exported into augustus.swf file. My code:

<mx:Style>
@font-face {
src:url("augustus.swf");---here is the error
fontWeight:normal;

fontFamily: myFont;
}
.myStyle1 {
fontFamily:"myFont";
fontSize:12pt
}

</mx:Style>

But the error is: font 'myFont' with normal weight and regular style not found

flexy
08-14-2006, 06:31 PM
Why don't you use the CSS font embed to reference the TTFs directly?


// CSS
@font-face {
src:url("Arial.TTF");
fontFamily: customFontName;
}
Application {
fontFamily: customFontName;
size: 10pt;
}

Tink
08-14-2006, 07:32 PM
Why don't you use the CSS font embed to reference the TTFs directly?In my experience this can cause the same errors if the font doesn't support a normal weight and regular style.

What font is it your trying to use and are you embeding just bold or something in your swf?

sobaka11
08-15-2006, 09:31 PM
I'm trying to use augustus.ttf. In swf I've embed normal, bold, italic and bold-italic.

flexy
09-29-2006, 10:26 AM
I'm having this exact same problem! Having realised that managing the fonts across a development team would be easier and (as Tink says) better quality, I've compiled a series of SWFs, and I'm now trying to embed them in Flex.

Problem is I'm getting: "font X with normal weight and regular style not found"

I'm sure I've got the right glyphs and weights embedded (normal, bold, italic, bold-italic), but Flex doesn't seem to agree.

hangalot
10-02-2006, 11:13 AM
also embeding it in a swf allows you to make certain the font does not alias.

flexy
10-03-2006, 11:39 AM
Any idea what's causing the error though? :confused:

thibaud
10-03-2006, 02:02 PM
same problem here...
the font is apparently properly embeded though in the compiled flex application... at least a rotate on the text using that font works.