开发者

How can we get BOLD text to work in Classic Dynamic Text (embedded font) in Flash CS5?

开发者 https://www.devze.com 2023-02-23 03:38 出处:网络
In spite of my having embedded Verdana Bold, it does not show as bold. This used to work in CS4. All fonts are exported for ActionScript using Classic text outlines. Fonts in the FLA are Classic Dynam

In spite of my having embedded Verdana Bold, it does not show as bold. This used to work in CS4. All fonts are exported for ActionScript using Classic text outlines. Fonts in the FLA are Classic Dynamic Text.

I can get this working with TLF fonts. This is not a question about TLF fonts. I do not want to use them because they add a LOT of unnecessary bloat to the file size.

I have 开发者_高级运维embedded the fonts. There is no HTML text, and the text fields are not generated by AS — they are physically on the stage. There are four separate text fields and otherwise they all work just fine. This whole thing also works fine if I use Device Fonts.

I've got a loaded XML file feeding text into several differently formatted text fields. Each one has a properly embedded font.

Everything is working fine except … BOLD. I have an embedded Verdana Bold font, which I have checked every which way, but the text in the field shows as regular weight.

I am using Classic Dynamic Text in Flash CS5 (AS3) on Mac OS.

Is this just a bug that cannot be fixed?

Am I forced to write a TextFormat even though the field is on the stage?


Easiest way is to unselect the "Auto Kern" option. Now newly set text will keeps it's "bold" formatting.


Try this. You mentioned that you are not creating the TF's dynamically, so on all TF's set them to be bold and make sure they are set to embed fonts. Use a Text Format as you normally would and any text format you have set to bold will come out bold and those set with bold=false will not. There might be a better way to do this, perhaps creating the TF's dynamically, but that should work.

var norm = new TextFormat("Verdana", 12, 0x000000, false, false);
var bold = new TextFormat("Verdana", 14, 0x000000, true, false);

norm_txt.setTextFormat(norm);
bold_txt.setTextFormat(bold);
0

精彩评论

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