Lucas
Lucas

Reputation: 578

Why text on SWC doesn't show up when imported from FlashDevelop?

I created many SWCs with graphics and code for my project so that the compiling time has a really better performance. I just found a problem, tough.

One of the SWCs is a 'text container'. It is just a set of graphics with a dynamic text field in it. When I import the SWC from Flash CS5.5 apps, it behaves normally. I mean:

var swcInstance:SwcClass = new SwcClass
swcInstance.textFiel.text = "hello world!"
addChild(swcInstance)

and the swcInstance object is shown on screen with the text in it. When I do the same on FlashDevelop, tough, it appears on screen but text is not shown. Is this a known bug? Am I doing something wrong?

EDIT: I'm using Impact font with a drop shadow filter. Also, I made another test and Static text fields work properly.

EDIT 2: The same problem happens partially with Arial. Some letters don't show up but others do. When I embed "All", it works fine with Arial. But even when I embed "All" with Impact it refuses to work, anything shows up.

Upvotes: 0

Views: 652

Answers (2)

Philippe
Philippe

Reputation: 2631

To me it sounds like you may have these fonts included in other SWCs - if these SWCs are included first by the compiler the font they contain may hide other SWCs' fonts.

You could try un-adding all SWCs of your project, then adding them back starting with those with complete fonts.

PS: don't "embed all" chars of a font, choose the appropriate charsets - typically "Basic Latin" (US) and "Latin 1" (accented characters).

Upvotes: 0

rzetterberg
rzetterberg

Reputation: 10268

Set the embedAsCFF parameter to false

Unless the SWF file was compiled with CFF, you must set the value of the embedAsCFF property to false for the imported font.

Read more about that here: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6320a-7fec.html

And here: http://www.flashdevelop.org/community/viewtopic.php?f=13&t=6456

Upvotes: 3

Related Questions