Some font advice.

15May05

To use fonts in my applications I use a few simple calls to setup my StaticText boxes with the right font. First create a Font variable — Font mFont; — where mFont will be the font object we create. Once you have the variable declared it’s easy to assign it a font. There are quite a few calls that allow you to set your font to generic types — mFont = Font.findBoldSystemFont(). If you know the name of the font you can have the system set your font according to the font name as well — mFont = Font.findFont(“Bort7”) — which would work for any font name.

Font mFont;
mFont = Font.findFont(“Bort7”);
mFont = Font.findBoldSystemFont();
StaticText mStaticText = new StaticText(“Bort 7 Font Text”);
mStaticText.setFont(mFont);

If you would like to see exactly what fonts are available on the Sidekick you should certainly check out Fontchooser, written by Micah Gorrell (unfortunately his website is down, but check back at a later time to see if it’s up).

Just a simple pointer for any new Sidekick programmers out there. Any comments or suggestions please leave some feedback.

Advertisements


No Responses Yet to “Some font advice.”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: