Loading Fonts at Runtime with latest Flex 4 SDK
Tue May 11 03:27:29 2010
I wrote a post a while back about loading fonts at runtime. Nothing there has really changed, but I did want to clarify one thing on here. I just discovered that when embedding fonts with the latest Flex 4 SDK, I got an error with the following
[Embed(systemFont='OCR A Std',
fontName="OCR",
mimeType="application/x-font",
unicodeRange="U+0041-U+005A")]
The error read:
Error: exception during transcoding: Cannot embed local font 'nameOfFont' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source' attribute.
I found that adding the following solved this problem.
[Embed(systemFont='OCR A Std',Tweet
fontName="OCR",
embedAsCFF='false',
mimeType="application/x-font",
unicodeRange="U+0041-U+005A")]
← back