Hi all,
I am presently working on a project that involves
loadable fonts. These are created in Flash CS4 by adding just a font
symbol to the library. The application uses a loader to load the font
and then tries to build a character table.
The problem with that
approach: the font seems to cantain a lot of "ghost" glyphs - the
chacacter code is present, but there is a an empty shape and a zero
width.
When checking character presence with
for(var n=32; n < 65535 ; n++)
{ var ch:String = String.fromCharCode(n);
if(font.hasGlyphs(ch)) ....
}
the glyphs seem to exist. As a test case, Wittenberger Fraktur pretends to have
a full set of eastern Europe characters.
On the other hand, when I try to embed in Flex
package
{ public class myfont extends
Sprite
{
[Embed(source=".....", mimeType="application/x-font-truetype",
fontName="myfont")]
private static const myfont:Class
}
}
the
font seems to be without the ghosts (at least inspection of the
generated swf does not show empty shapes or 0-width characters).
However, the swf structure is different, so the application does not
even load it.
Ideally, I would like to use mxmlc to create font swf that are compatible with
those built in flash.
Also, is there a better way to tell ghost glyphs apart from real ones?