I'd like to describe embedding fonts in a FlashDevelop widget, adding to what Raff said about embedding pictures. Its not hard once you know how and has some significant advantages.
First, get a true type font. The liberation family appears to allow free use without violating anyones license. You can read about the project here: https://fedorahosted.org/liberation-fonts/ or download the v1.04 zip file from here: https://fedorahosted.org/releases/l/i/l … s-1.04.zip. They have a serif font, a sans-serif font, and a mono-spaced font. I used various sizes of the sans font in my ClearSync calendar widget which you will be able to download from the Chumby web site in a couple days and view on your Chumby to see an example of that font's usage.
From the download, unzip it and copy the .ttf file of the font you want to use into the directory of your FlashDevelop widget project. I put mine along with the .as files under src, but I noticed others tend to make a "library" subdirectory to store fonts and pictures.
Once you've copied the file, when you look at the right side panel within FD you will see the name of the file you copied. Note that the filename is black. Next right click on the file name and from the pop-up menu, select Add to Library. Then the filename will turn blue. Although you don't need to know this, the next time you compile (i.e. hit the Run Movie command - F5), the FD system creates an "obj" subdirectory and puts in it an XML file that has in it a linkage between your filename and a name you can refer to in your actionscript code. It also has a list of characters that will be embedded from the font into your widget's swf file. But the FD system takes care of getting the font info into your widget file, so you don't have to pay attention to the obj directory or the XML file in it.
The default for a font is to include "All" letters, which isn't really All but corresponds to the following set of characters:
1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ `~!@#$%^&*()-_=+[]{}\|;:'",./<>?
You can see this list by looking in the XML file mentioned above under the "glyph" tag. This set of characters may be sufficient for many widgets. For the liberation sans font, this added about 10k to my widget size. However, my calendar widget needs to display events entered by users on a PC, Mac or Linux box and users may use more than just English. After a font file is added as a library item to your FD project, when you right click on the file name, there is a pop-up menu item called Options. Clicking on that brings up a dialog box where you can select "Embed these characters:" and type in a list. I used the following:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
which correspond to 0x20 to 0xFF with a block of poorly defined characters and the <del> character removed from the middle. Be sure your <space> character at the beginning of this list doesn't get eaten along the way, or your text will look funny withnospacesbetweenwords. This set of characters expanded my widget size by another 7k or so over the shorter list of characters for a total of 17k added and should cover many European languages.
To use the embedded font in your ActionScript code, write the following:
var fmt:TextFormat = new TextFormat("src.LiberationSans-Regular.ttf", height, color);
var tf:TextField = mc.createTextField("tfName", mc.getNextHighestDepth(), x, y, width, height);
tf.setNewTextFormat(fmt);
tf.text = "Hello world!";
where you have defined x, y, width, height, color, and mc is the name of your main MovieClip. In the new TextFormat line above, you can get the FD environment to insert the string src.LiberationSans-Regular.ttf into your code window by double clicking on the file name in the right hand panel. Note that this string is not quite the file name and path, but the correspondence between this string and the file name is maintained in the XML file.
Once you have embedded your font, then the font that you see in the FD debug environment and the Chumby hardware is now the same font. And before embedding, I got no characters whatsoever on the Virtual Chumby. Now my text shows up consistently everywhere.
I hope this post saves you some time. If someone knows how to move this explanation to kayakpete's wiki for FlashDevelop, please feel free.