Jon and Dan,
Thanks much. Very helpful.
So when the warning says "fontName" it really means "fontFamily", at
least in this case. (Snort!)
So I changed my fontFamily in the CSS to VerdanaEmbed, as Jon suggested,
and set my components fontFamily to VerdanaEmbed, and it works, except
for one more minor detail. One of the components I'm rotating is a Panel
and it seems to want a bold font. So I need to embed both normal and
bold weights. My CSS now looks like this:
@font-face {
src: local( "Verdana" );
fontFamily: VerdanaEmbed;
}
@font-face {
src: local( "Verdana" );
fontWeight: bold;
fontFamily: VerdanaEmbed;
}
And it works. :) Thanks!
Douglas
Jon Bradley wrote:
>
> First thought is to rename your 'family' to something else:
> @font-face {
> src: local("Verdana") ;
> fontFamily: VerdanaEmbed;
>
> Is that what you mean? The "fontName" part is when you embed a font
through SWF font embedding:
>
Daniel Freiman wrote:
>
> I got this warning a long time ago. Basically, it does want you to
pick an alias for the fontFamily property so it doesn't get confused.
(livedocs: http://livedocs.adobe.com/flex/201/html/fonts_070_04.html)
>
> There's a reason this is a warning and not an error. Your program
will work, but it may start to cause problems if you do some advanced
things such as call methods of the Font class. Additionally, there may
be some components that automatically chose whether or not to use
embeded fonts and you may have to manually set these components to use
embeded fonts (usually there's a style and in TextFields there is a
property). So this is one of those, "proceed at your own risk" times.
Just know that it is a bad and unsafe practice.
>
> Dan Freiman
> nondocs
>
> On May 22, 2007, at 4:26 PM, Douglas McCarroll wrote:
>
>> "the embedded font 'Verdana' may shadow a device font of the same name.
>> Use fontName to alias the font to a different name"
>>
>> It seems that the compiler is concerned that I'll be colliding with the
>> device font version of Verdana that will be in many (all?) of my users'
>> computers.
>>
>> I'd like my app to ignore the device font and use the embedded font.
>>
>> I've searched the net fairly thoroughly but have found no guidance on
>> how to follow the rather cryptic suggestion in the second sentence of
>> the warning.
>
>
>
>