Custom Fonts CS5
From Showit Manual
Back to Custom Fonts
The following tutorial will walk you through the process of creating a custom font file for Showit.
- Click on any thumbnail to see a bigger version of the image.
- If there are problems when adding the font, remember to restart Showit after each attempt.
Contents |
Inside Adobe Flash CS5
To begin with the tutorial open Adobe Flash CS5.
1. Add Font To Library
In the Library panel on the right side of Flash, right click in the open area of the Library to show the context menu pictured. From the context menu that appears, select New Font...
You will now need to choose a name for the font you are embedding. We suggest starting with an underscore and then naming both the font and style. Do NOT use spaces. In the example we chose _GeorgiaRegular.
In the example, you can see the unique names that we used to add the 4 different font styles in the Georgia font family.
_GeorgiaBold
_GeorgiaBoldItalic
_GeorgiaItalic
_GeorgiaRegular
2. Test Font Name
Once you have added all the font styles that you want to use, we will begin the process of finding how Flash labels these fonts.Open the Windows menu and select Actions. If the Actions panel is already open then this option will already have a check next to it.
import flash.text.Font;
var array:Array = Font.enumerateFonts();
for each(var font:Font in array)
{
trace(font.fontName);
}
|
When you have made this change, select OK.
Give the file a name that will let you know what font you've put into it.
From the File menu, select Publish Preview - Default.
Another panel that should now be open is the Output window. You will need the EXACT name that appears in this panel in the next step.
IMPORTANT: If you see more than one font family or name in the Output panel, you are trying to put two font types into one file. Even if they seem close or a part of the same font family, you can not put these two fonts in the same file. You will need to remove fonts from the Library panel until only one name shows in the Output panel after a Publish Preview.
Now we return to the Actions panel to finish our font file.
3. Add Showit Font Code
In the Actions panel REPLACE the code we pasted into the Actions panel with the following code:
import flash.text.Font; // fontName is displayed in Showit var fontName:String = "REPLACE"; // cssName is from output panel var cssName:String = "REPLACE_OutputName"; // Names in parantheses are from library panel Font.registerFont(REPLACE_LibraryFontName1); Font.registerFont(REPLACE_LibraryFontName2); Font.registerFont(REPLACE_LibraryFontName3); Font.registerFont(REPLACE_LibraryFontName4); |
Where it says REPLACE, type a name that will appear in Showit.
Where it says REPLACE_OutputName, type the exact name displayed in the Output panel from the steps above.
Where it says REPLACE_LibraryFontName, type the names of each font listed in the Library panel.
REMOVE any extra Font.registerFont lines of code that are not necessary.
From the File menu, choose Publish.
You can also choose to Save as well. We are now ready to jump over to Showit.
Adding Font Inside Showit
Now back in Showit, with our site open. From the Site menu, choose Custom Fonts...
If there was an error adding the font file or the font does not appear the way that you would expect, immediately delete the font file from the Custom Fonts window and restart Showit. This is necessary to remove any references to the font that may have only been partially added to Showit.
After removing and restarting Showit, you can try to add the font again. Make sure to follow all the steps above and only add one font per file.





