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...