Friday, March 13, 2009

Flex embedding fonts within Buttons

I was using embedded (ttf) fonts within some Flex labels and they rendered fine; however, when I tried using the same font-family with Flex Buttons, they did not render at all. After some testing, I think I have it figured out,: if your embedded fonts don't render correctly, they may be using default flex font settings that are not supported within the ttf file. I had to make sure that my font-family was using 'fontWeight: normal' to make my own embedded font appear.

Here is an example, notice (in purple) what I added:



@font-face {
src: url("TravelingTypewriter.ttf");
fontFamily: TravelingTypewriter;
advancedAntiAliasing: true;
}

.myStyle {
embedFonts: true;
fontFamily: TravelingTypewriter;
textRolloverColor: red;
fontWeight: normal;
}




1 comment:

eSwami said...

Rishi,
I saw your virtual tabla...
Did u know about beatkeep.net?
Is it possible 4 u to create something similar for tabla and dholak?