It works for me. Here an example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Style>
@font-face {
src: local("Arial");
fontFamily: myFontFamily;
advancedAntiAliasing: true;
}
@font-face {
src: local("Arial");
fontFamily: myFontFamily;
fontWeight: bold;
advancedAntiAliasing: true;
}
@font-face {
src: local("Arial");
fontFamily: myFontFamily;
fontWeight: bold;
fontStyle: italic;
advancedAntiAliasing: true;
}
</mx:Style>
<mx:Label text="Sample Text" fontSize="32" />
<mx:Label text="Sample Text" fontSize="32" fontFamily="myFontFamily"
scaleX="0.7"/>
<mx:Label text="Sample Text" fontSize="32" fontFamily="myFontFamily"
fontWeight="bold" fontStyle="italic"/>
<mx:Label text="Sample Text" fontSize="32" fontFamily="myFontFamily"
fontWeight="bold" fontStyle="italic" scaleX="0.7"/>
</mx:Application>
On Mon, Oct 20, 2008 at 10:39 AM, akila_ksri <[EMAIL PROTECTED]> wrote:
> --- In [email protected] <flexcoders%40yahoogroups.com>,
> "Haykel BEN JEMIA" <[EMAIL PROTECTED]>
> wrote:
>
> >
> > You have to embed the font with all typeface styles you need. If for
> example
> > you need the plain, bold and bold-italic typefaces, then you have to
> embed
> > the font three times with the different typeface properties:
> > @font-face { src: local("Arial");
> > fontFamily: myFontFamily;
> > advancedAntiAliasing: true;
> > }
> >
> > @font-face { src: local("Arial");
> > fontFamily: myFontFamily;
> > fontWeight: bold;
> > advancedAntiAliasing: true;
> > }
> >
> > @font-face { src: local("Arial");
> > fontFamily: myFontFamily;
> > fontWeight: bold;
> > fontStyle: italic;
> > advancedAntiAliasing: true;
> > }
> >
> >
> >
> > On Mon, Oct 20, 2008 at 7:50 AM, akila_ksri <[EMAIL PROTECTED]> wrote:
> >
> > > --- In [email protected] <flexcoders%40yahoogroups.com>
> <flexcoders%40yahoogroups.com>, "Amy"
> > > <amyblankenship@> wrote:
> > > >
> > > > --- In [email protected]
> > > > <flexcoders%40yahoogroups.com><flexcoders%
> 40yahoogroups.com>,
>
> > > "akila_ksri" <akila_ksri@> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I need to apply horizontal scaling for a text with 'Arial' font.
> > > > > lbl.scaleX = 0.70 simply does not work . I can only see that
> there is
> > > > a
> > > > > change in the width of the label.
> > > > >
> > > > > Is there anything i am missing out to scale the text?? Is
> scaling not
> > > > > applicable for system fonts? ( I tried the same with font
> 'Verdana',
> > > > > but again, no luck!)
> > > > >
> > > > > Any help would be greatly appreciated.
> > > >
> > > > Try one of the following:
> > > >
> > > > 1) Set the blendMode to layer
> > > > 2) Set the container's cacheAsBitmap to true
> > > > 3) Embed the font
> > > >
> > > > HTH;
> > > >
> > > > Amy
> > > >
> > > Hi Amy,
> > >
> > > Thanks for your response. I tried what you suggested, embedding the
> > > font and then applying scaleX to the text.
> > > This works fine if the font is just 'Arial'. It does not work if i
> > > make the text bold/italic. It is necessary for the font to be bold and
> > > in italics. I cant get it to work:(
> > >
> > > akila
> > >
> > >
> > >
> >
> >
> >
> > --
> > Haykel Ben Jemia
> >
> > Allmas
> > Web & RIA Development
> > http://www.allmas-tn.com
> >
> Hi Haykel,
>
> I tried this one too, it still doesnt work..
> It looks like i just cant scale text which is bold and italisized!
>
>
>
--
Haykel Ben Jemia
Allmas
Web & RIA Development
http://www.allmas-tn.com