0
votes

I'm trying to figure out how to use small caps in text areas in AS3.

Right now I'm doing a work around were i wrote a function that replaces lower case letters with a capital letter in a smaller font size. This works OK, however the real Small Caps glyphs that are included in the font look better.

There is a reference here:

public static const CAPS_AND_SMALL_CAPS:String = "capsAndSmallCaps"

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/engine/TypographicCase.html

however, I can't figure out how to apply it to a text area.

2
ended up just editing the font and replacing all the lower case letters with small caps, flash is terrible at handling fonts. - Danielle

2 Answers

0
votes

If you are using Flex, you can do it through CSS or directly through MXML for the Label class.

.className {
    typographicCase: "capsToSmallCaps";
}

or

<s:Label styleName="className" typographicCase="capsToSmallCaps"/>

It doesn't appear you can set typographicCase on a standard TextField, however. Looks like you need to use different components in order to utilize it. See this Adobe document

0
votes

If you know how to use styles in action script, I would suggest you use font-variant: small-caps for the text areas.