Inspiring
September 30, 2009
Question
Embed font with smoothing in TextLayout
- September 30, 2009
- 2 replies
- 2059 views
Hi..
I need your help again...
I try to embed a font into my TextFlow, I try by diferent ways and this works for me:
In flex I build a swc:
| package { public class FontsFontsFonts { [Embed(source="C:/Windows/Fonts/ctmgoodgirl.ttf", fontFamily="GoodGirl", embedAsCFF="true")] public const GoodGirlFont:Class; } } |
|---|
then, in a class of my Flash Project I put this:
| private function textConfiguration():Configuration { var myFont:Font = new FontsFontsFonts_GoodGirlFont(); var config:Configuration = new Configuration(); var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat(); textLayoutFormat.fontFamily = fmt.font; textLayoutFormat.color = 0x000000; textLayoutFormat.fontSize = 14; textLayoutFormat.kerning = Kerning.ON; textLayoutFormat.fontStyle = FontPosture.NORMAL; textLayoutFormat.textAlign = TextAlign.LEFT; config.textFlowInitialFormat = textLayoutFormat; return config } |
|---|
And all works fine, my textFlow can use GoodGirl font, but exist a problem, this font is showed without smoothness ![]()
How can I enabled smoothness in TLF?
