Tutorio.com

Flash fonts : Complete Tutorial
An explantation of the sometimes confusing nature of fonts inside Flash.

Introduction to fonts for flash

When you create a html document in a certain font and want to share it with others on the internet, they wont be able to view the font unless they download it and install it on your computer. Unless of course you embed the font within the document.

Flash also allows you to embed fonts, the difference is that while embedding fonts in HTML is problematic, Flash allows you to embed fonts flawlessly. So the person viewing the flash file can any fonts used within it without having the font installed on their computer.

Despite the fact the flash makes embedding fonts so easy, they remain one of the most frequently reported sources of problems on flash forums.

Static vs Dynamic Text

When you create a text field in flash, there are three options available to you Static, Dynamic, and Input. As far as embeding fonts is concerend, you can further divide the text fields into two types.

  1. One, where the value of the text field is set permanently when the movie is published i.e. static text fields
  2. And two, where the where the value of the text field may change on the fly, as with Dynamic and Input text fields.

Static Text

Some people will tell you that static text doesn't need to be embedded, this is true but only partially, because while you don't need to do anything to embed the font, flash 'auto-magically' embeds the font for you. So the system for embedding fonts in static text is 'foolproof'. Which may leave you wondering, why Flash wont 'auto-magically' embed fonts in dynamic text fields also.

So why cant flash do the same for dynamic text ?

To understand this you have to first understand how fonts work in Flash. Flash doesn't embed the entire font with all the characters, no that would take up far too much space, and the movie would take too long to load. Instead the font is broken down into smaller bits called glyphs. Each glyph contains the font outline of one character / letter.

Now say for instance I make a static textfield with the word 'Tutorio.com' and then publish the movie as a .swf file

Flash will embed the glyphs for the characters : T u t o r i . c m into the file.

The letter o is repeated but it only needs to be embedded once and then reused. The letter T is also repeated but one time its a capital and the other time its a lower case letter, so they will have different font outlines both of which need to be embedded.

With dynamic fonts its not possible to know the characters for which the font outlines need to embedded. So flash doesn't embed the letters automatically, instead the developer chooses which characters should be embedded within the file.

Embed fonts for dynamic text

Its easy to embed fonts in flash. Just create a dynamic text field and from the properties panel select 'character'. Then choose the character ranges that you want to embed (hold down ctrl to select more than one) or manually type in the character ranges that you require.

Note: Make sure that you choose all the range of characters that may appear in the textfield

Pros and Cons of Embedding Flash Fonts

Cons

  • Larger file sizes
  • Sometimes its difficult to predict which character outlines to embed.

Pros

  • Consistent, predictable viewing of fonts in flash
  • Embedding fonts gives you the ability to mask , tween and skew dynamic text fields

Flash Fonts FAQ

My fonts are blurry
Solution: Sometimes this happens when the font size is too small, increase the size or use a pixel font specifically designed for a small size.

I increased the size and my fonts are still blurry
Solution: Make sure the x and y properties of the font, in the properties panel are rounded to the nearest whole number

The pixel fonts I am using are blurry
Solution: Set the font size for pixel fonts to multiples of 8 such as 8, 16, 24, they may looks strange at other sizes.

My fonts are stretched, compressed or distorted
Solution: This happens a lot when people use textfields inside a movieclip, then resize the movieclip, as a result the fonts also get resized and end up looking ugly. Solution is to set the font size using the properties panel, and never resize a movie that contains text fields.

I can't mask my dynamic text
Solution: You need to embed the font.

Rating(202) +-
Tutorio.com. Privacy Policy, Contact