开发者

Flash Builder 4: MovieClip looses embedded fonts when s:RichText component added

I have a problem with one of the projects I'm working on where fonts are not being embedded correctly. I have a movieclip from Flash embedded in a Flex project. As soon as I add a s:RichText to anything the movie clip looses it's embedded fonts and it just shows up as Times New 开发者_开发百科Roman. I can reproduce this in every project I'm working on. I'm using a seperate computer with the relevant fonts deleted from the font folder to test.

I was using mx:Label before with the htmlText property, but I found they would randomly dissapear so I switched to s:RichText.

I am using the new TLF text boxes in flash. It seems that only some movieclips are being affected. The movieclips I am using to skin buttons show up fine, but movieclips I am using for animations are not working.

I am embedding my fonts both in the css and in the fla... seems to only be using the one from the fla though.

Not sure at this point if it is an Adobe bug or not...

Edit: I have also found this only occurs when adding a movieclip to a component after the app has loaded. If the movieclip is added in the mxml there is no problem. I am thinking that some font initialization stuff went on, that does not happen when the movieclip is dynamicly added. Still not sure why this is triggered by having a s:RichText in the app.

2nd Edit: After trying to apply my workaround of simply adding the movieclip to the stage with mxml I found another problem. The fonts are only embedded correctly in the first frame of the animation, and only on the first time the movieclip is played. I'm thinking this is an Adobe bug at this point, will report it in the near future.

In any case I now have a sample project that displays this error. Will attach it if anybody needs help reproducing this error.

thanks,

Chris

P.S. The problem also seems to apply to s:TextArea as well.


When you embed the fonts, did you add the "embedascff" property? Try setting it to false. I don't have any personal experience with using MovieClips, but I know the CFF font thing seems to cause some trouble. Here's a good article on troubleshooting fonts: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6320a-7fec.html

I've also run across the "Times New Roman" thing when I tried setting a font to bold that didn't have a boldface version included in the font file. You need to embed it again with the same name and set it's font-weight to bold.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜