Recipe 7.8. Setting Space Between Characters


Problem

You want to modify the kerning ( spacing between characters) of the text in a text field.

Solution

Select the text you want to modify, and adjust the character spacing value within the Property inspector.

Discussion

Flash lets you quickly adjust text kerning by changing the character spacing value. First, select the text you want to modify (either the entire field or just a portion of the text within it). Then, use the character spacing menu to set the kerning.

Possible values for kerning range from60 to 60, and the units of measurement are points. The physical space that a point represents is relative to the font size such that the larger the font size, the larger the space for a point. The default value for kerning is 0, and this means that there is no space between the imaginary right boundary of one character and the imaginary left boundary of another. As the point value increases, the characters move further apart, and as the value decreases, they move closer together. A value of60 means that the left boundaries of the two characters are aligned. In practical terms, this value means that the characters overlap, and that two matching characters will occupy exactly the same space, so that they appear as one.

You can set the kerning for an entire text field, but you can also assign individual kerning to each character. The kerning value for a character indicates how much space should appear between it and the following letter. So if you want to modify the spacing between two characters, use the mouse to select (highlight) the first of the two, and adjust its kerning value.

Realistically, you can use the kerning features only with embedded fonts. When you try to use kerning with device fonts, you will not get reliable results. The spacing between letters cannot be adjusted with device fonts, but the kerning settings may result in some characters being pushed to another line.




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net