views:

101

answers:

2

Curious if anyone has this problem:

  • I save my (embedded) fonts in an external file (fonts.swf) that gets loaded at runtime. Pretty standard.
  • I also use a bunch of UI artwork generated in the Flash IDE. Some of this artwork contains static textfields (thus, not proper TextFields that can change. Just frozen glyphs).

Here's the problem: if I use the same font in any static textfield and then embed that same font into my collection of runtime fonts, the runtime font will refuse to render. It's the same effect you get if you set a textfield with embeddedFonts=true to use a font that isn't embedded. If I change the static textfields to use a different font, the runtime fonts work just fine.

Note: this only appears to be a problem if your embedded fonts are loaded at runtime. If they're merged into the main .SWF, then there's no problem.

From my (very limited) understanding of static textfields, they automatically embed the font that they're set to use, but only the minimum number of characters required. Thus they embed a partial definition. I suspect that when I try to load the same font at runtime (and publish it through Font.registerFont) that Flash detects a prexisting embedded font of the same name and fails silently. But I don't really know. Is there a way around this problem? I want to maintain typographic consistency between my dynamic and static textfields, but that doesn't seem to be possible...

A: 

I know this was not possible with Flash 8 and lower. I don't think you can do this, I even asked Macromedia back in they day if they could do this and it was NO.

Check the documentation, I was under the understanding this cant be done. Maybe I am too old.

John Ballinger
*Balls.* I'll ask on the adobe forums; see if I can get a dev to respond.
Ender
Fonts and FLASH suck. I really hate it. There are ways to fix it but there are long winded and will probably break when we need to do some stuff in the flash ide.
John Ballinger
+1  A: 

Adobe really needs to make fonts easier. I've had nightmares with fonts and textfields. At one time, I tried to completely understand them but they've completely worn me down, since then. Now instead of trying to understand them, I just focus on getting them working.

When I run into the problem, I redo all my fonts from the ground up. I make sure 1) they're all embedded via CSS and @Embed tags in the code (I don't trust the Flash IDE for fonts) and 2) I have an instance of the font on stage. Sorry that's not a real "solution" but whenever I follow those steps, I get the fonts working again.

Then, I cross my fingers and pray they don't break. When they inevitably do, I start cursing Adobe's name worse than Steve Jobs and start over. lol.

Since my last fix, the fonts in our project haven't "broken" in a long time. Most of the errors have been related to the bold versions of the fonts. To simplify things, I just avoid all uses of bold.

gmale