//richinternet.blog

Viewing By Entry / Main
Tuesday, May 9, 2006
Using FlashType in Flex 2 Beta 3

Flex 2 Beta 3 provides an easy way to use the improved FlashType font rendering for embedded fonts inside your Flex 2 application.

Currently, the Flex 2 compiler is not capable of creating FlashType fonts for you - instead, you'll have to create a Flash 8 SWF file that embeds the according font. Then, inside your Flex 2 CSS definition, you embed the font as you did before, but refer to the SWF file instead a TTF file. Here's a little demo that shows the difference between the default font embedding and a FlashType font (Flash Player 9 beta 3 required). While the upper Labels appear very blurry, the Labels on the bottom appear very crisp and clear.

Dirk.

Comments

Hi,

I can't get it to work... Can you please publish your source code?

If I try the following as3 code in Flex beta 3 I always get a compiler error:

[Embed(source="2.swf", fontName="Verdana")] public var fontBold:Class;

Error: The definition of base class FonteAsset was not found.

(Used to work in Flex beta2.)

Hmmm... can you help?

Lorenz


Hi Lorenz,

you'll have to add the framework.swc file to your projects build path (in Flex Builder 2 go to the project properties, choose ActionScript Build Path --> Library Path --> Add SWC... and locate the framwork.swc, e.g. D:\Programme\Adobe\Flex Builder 2.0 Plug-in Beta 3\Flex SDK 2.0\frameworks\libs\framework.swc)

Dirk.


Hi Dirk,

thanks a lot!!!

Now it's working fine. I can either include an swf or ttf file.

The rendered text looks much cripser and sharper if you use an swf file.

Greetings,

Lorenz




Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30   

About this blog
www.richinternet.de

AIR (9)
Apollo (3)
BlazeDS (8)
Breeze (1)
Central (5)
ColdFusion (54)
Flash (57)
Flash Media Server (6)
Flex (160)
Flex Trace Panel (6)
FXUG (3)
J2Flex (4)
MAX (31)
Mobile (1)
mxmlc (1)
Other topics (42)
Plugins (5)
Video (4)

Copy Fully Qualified Classname Plugin for Flash Builder 4 (CFQCN)

Recent Flex Technotes
Recent ColdFusion Technotes
Recent Flash Technotes

http://www.flexperten.de
http://www.flexforum.de
http://www.flex.org
http://www.bloginblack.de
http://www.cflex.net
flexcoders mailing-list
flexcoders archive
more links...

Aggregated by fullasagoog.com
Aggregated by MXNA

Short Mode | Full Mode

Herrlich & Ramuschkat