I don't fully understand what you are having troubles with. This code works (both with inline style and linked to a css file):
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Style> @font-face { src:url("fonts/comic.TTF"); font-family: comic; } .regularTab { fontFamily: comic; color: #000000; fontSize:22; textRollOverColor: #000000; themeColor: #3370ce; fontWeight: normal;} .selectedTab{ fontFamily: comic; color: blue; fontSize:18; textRollOverColor: #000000; themeColor: #3370ce; fontWeight: normal;} </mx:Style> <mx:TabBar x="106" y="43" dataProvider="viewstack1" tabStyleName="regularTab" selectedTabTextStyleName="selectedTab" /> <mx:ViewStack x="135" y="82" id="viewstack1" width="200" height="200"> <mx:Canvas label="View 1" width="100%" height="100%" > </mx:Canvas> <mx:Canvas label="View 2" width="100%" height="100%"> </mx:Canvas> <mx:Canvas label="View 3" width="100%" height="100%"> </mx:Canvas> <mx:Canvas label="View 4" width="100%" height="100%"> </mx:Canvas> </mx:ViewStack> <mx:Label text="Testing Tab Bar Styles"/> </mx:Application> --- In [email protected], "Bruce Denham" <[EMAIL PROTECTED]> wrote: > > I've been pulling my hair out trying to figure out why I can't get > embedded fonts to work with my TabBar. Maybe this has been posted, but > I couldn't find it. So to prevent hair loss for others, here's the gist. > > It seems that the TabBar component has a bug/limitation concerning > embedded fonts used within CSS class selectors. It just doesn't work. > > So, to use an embedded font with a TabBar component, you have to do > this in your CSS file: > > @font-face > { > src:url("fonts/MYRIADPC.TTF"); > fontFamily: myFont; > fontWeight: normal; > > Tab > { > fontFamily: myFont; > fontWeight: normal; > fontStyle: normal; > fontSize: 18; > color:#FFFFFF; > } > > This doesn't work: > > .myTabStyle > { > fontFamily: myFont; > fontWeight: normal; > fontSize: 18; > color:#FFFFFF; > } > > Unfortunately, this sets all the tabs using the same font > characteristics, which I haven't figured out how to override yet. > Using the style inline (within a MXML component) doesn't seem to work: > Doesn't override text styles set in the Tab selector: > > <label:TaskBar x="0" y="20" styleName="myTabStyle" /> > > I'll post more if I figure something out, though I'm not feeling hopeful. > > Bruce > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

