Font Types and File Size in Flash
When you are adding new text fields to your Flash project, be aware that they can have a large impact on your file size. If you look in your output report, you’ll soon realize that you may be adding 100 kilobytes (or more) to the published file size by adding a simple text field that’s only a few words in length. Why does this occur?
Let’s say you decided that you wanted to create a text field with the words “Hello, World” using the Calibri font face, which is Microsoft Word’s default font type since Vista’s release. Flash will take precautions when publishing your .swf file, as not all computers have this font available. Each unique letter that is used will be bundled into your file, and a dramatic increase in file size will result.
Creating another text field using a combination of these same letters will not do any extra damage unless you decided to use another font type that isn’t a standard device font. Flash includes three generic device fonts for you to use that will not affect the file size in such a dramatic way: (1) _sans is similar to either Arial or Helvetica, (2) _serif is much like Times New Roman, and (3) _typewriter would be your fixed-width Courier.
There is also another option you have to avoid this daunting effect on file size. Let’s say you wanted to use Calibri without taking up 100 kilobytes of space. When you have your text object selected, go to the Anti-Alias option in the character section of the properties panel. If you choose to select “Use Device Fonts”, you can still use your font of choice without all the extra bundled letters into your published file. Here’s the catch; if the person viewing your Flash file does not happen to have that font on their computer, Flash will attempt to find a similar font that does match, and use that instead.
It is a good idea to give your text fields an extra buffer in size just in case that happens. Instead of making the text object’s width match the width of the text in the field, maybe add a few more characters worth of space to prevent your text box from hiding characters from people who may not have that font installed. For the majority of font types, it will not be an issue, but there is always the off chance that someone will view your .swf without that font, and Flash will incorporate another font that causes the field to grow. You wouldn’t want the text to grow beyond the length of your box. Get the picture?
Related Articles:
- How to Use Layers to Organize a Flash Project Organization is of the utmost importance when creating your Flash project. Keeping your project clean and easy to access will...
- Working with Adobe Flash CS4 Professional I recently acquired a license for Adobe Flash CS4 Professional Edition. I must say that a lot has changed since...
- How to Create an Array of Movie Clips in ActionScript 3.0 ActionScript 3.0 is still relatively new at the moment, and as a result there appears to be a shortage of...
- Introducing Planet Yook As I’ve stated in the past, a new Flash-based role-playing game is in the works. The title of this game...