Flash 8, textInput component format font

steverguy
steverguy used Ask the Experts™
on
This seems like it should be easier than this.  How do I change the font on a textInput component.  Everything looks fine on my computer, but when i test it, the font is way to big.  I'm sure I have to embed the font or something like that, but when i cluck on the textInput component, I don't see any options to do that.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
To embed fonts simply follow the instructions at http://livedocs.adobe.com/flash/8/main/00001430.html

To embed a font symbol:
   1. Select Window > Library to open the current FLA file's library.
       Open the library that you want to add the font symbol to.
   2. Select New Font from the library's pop-up menu (upper-right corner of the Library panel).
   3. Type a name for the font symbol in the Name text box of the Font Symbol Properties dialog box.
   4. Select a font from the Font menu or type the name of a font in the Font text box.
   5. Select Bold, Italic, or Alias text if you want to apply a style to the font.
   6. Enter the font size to embed, and then click OK to apply the changes and return to your document.
       Your font now appears in the current document's library.
       After you've embedded a font in your library, you can use it with a text field on the Stage.


To use an embedded font symbol in your Flash document:

   1. Follow the steps in the procedure under Embedding fonts to embed a font in your library.
   2. Use the Text tool to create a text field on the Stage.
   3. Type some text in the text field.
   4. Select the text field, and open the Property inspector.
         1. Set the text field to single-line.
         2. Select the name of the embedded font by using the Font drop-down menu.
         Embedded fonts have an asterisk (*) after the font name.
   5. Click Embed in the Property inspector to launch the Character Embedding dialog box.
       The Character Embedding dialog box lets you select the individual characters or character sets that you want to embed for the selected text field. To specify what characters to embed, either type the characters into the text box in the dialog box, or click Auto Fill to automatically populate the text field with the unique characters currently in the text field. If you aren't sure which characters you will need (for example, because your text loads from an external file or a web service), you can select entire sets of characters to embed, such as Uppercase [A..Z], Lowercase [a..z], Numerals [0..9], Punctuation [!@#%...], and character sets for several different languages.
   6. Select the individual characters or character sets you want to embed, and then click OK to apply the changes and return to your document.
   7. Select Control > Test Movie to test the Flash document in the authoring environment.
       The embedded font is displayed in the text field on the Stage. To properly test that the font is embedded, you might need to test on a separate computer without the embedded font installed.
       Or you can set the TextField._alpha or TextField._rotation properties for the text field with embedded fonts, because these properties work only on embedded fonts (see the following steps).
   8. Close the SWF file and return to the authoring tool.
   9. Select the text field on the Stage, and open the Property inspector.
         1. Set the text field's Text type to Dynamic Text.
         2. Type font_txt into the Instance Name text box.
  10. Add the following code to Frame 1 of the Timeline:
        font_txt._rotation = 45;
  11. Select Control > Test Movie again to view the changes in the authoring environment.
        The embedded font rotates 45º clockwise, and you can still see the text because it's embedded in the SWF file.
Top Expert 2009

Commented:
FYI embedding fonts is going to increase your file size especially if it's a textInput field and you have to cater for all possible inputs.

ps. i don't know what font display size has to do with embedding your font?

Author

Commented:
Thanks for the replies...  I saw this code - but are things different from textInput components? I'm not using a dynamic, or input text field  - it's the component from the component librar.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
No it's the same,  once you select the embedded font with it everything should be fine.

And on blue-genies comment if you only need basic characters then only embed them (ie A-Z a-z 0-9 and punctuation) and you can limit the size increase that you will see.

@blue-genie There will be a perceived size increase if the custom font you are choosing to use looks smaller than a standard font at the standard pt size. I have plenty of fonts where this is the case. 24 pt in one font isnt always the same physical (px or mm) dimensions as 24 pt in another font.
Top Expert 2009

Commented:
danyul - do you mean if you select 24pt font x and the end user doesn't have font x so it displays with font y and there's a difference in percieved size?

Commented:
Depending on the font chosen, yes. I know there are 72 pts in an inch as per digital publishing specs however not all font designers take this into account when designing their fonts.

Frustratingly you end up with size differences in fonts that are supposed to be the same size.

In addition to that there are perceived differences due to the differing size of the ascenders and descenders (see http://www.fonts.com/AboutFonts/Articles/fyti/TypeSizes.htm for examples)

This of course also affects anything you have on your screen as well as print.

Commented:
So actual size difference you be the creator of the font did not think to design it against a set of standards.

And the perceived difference is as aforementioned.

Commented:
difference would be not difference you be.

Slight dyslexic attack.
Top Expert 2009

Commented:
ah okay interesting.Thank god I'm not a designer, I don't worry about that. :-)
I went through these options, and could not get it to work. I ended up using a style sheet.

_global.styles.TextInput.setStyle( "fontSize", 18 )

Thanks for your help.  I'm not sure why, but the methods above didn't work.  Although I know it's hard to communitcate exactly what's going on in a flash application when you can't see it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial