Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-12-2009 02:38 PM
How can I set the font size to a system font size. For example, if I wanted to set the font to the same size as it appears when you set the size to 10 under the Options screen.
Solved! Go to Solution.
03-12-2009 03:46 PM
03-12-2009 03:54 PM
Not quite, unless from Font.getDefault() I can get the size (again, not in pixels).
I want to allow the user to select the font size for use within my program:
ie: 7,8,9,10... or System font size
And since the screen resolution is different for various devices, I can't just set the height using the setHeight(int pixels) method, since a size 10 on one device will require a different height than a size 10 on another device.
I'd like for my font heights (7,8,9, etc) to match up with the devices...
03-24-2009 03:50 PM - edited 03-24-2009 03:55 PM
Okay so i have just spent the past 2 hours googling and searching including this forum on a simple example on how to set the font size for a handheld application and ran across this forum posting several times. I am not clear on how to implement the Font on the handheld.
Could you clarify exactly how to use the Font.derive please.
I tried the following but eclipse is yelling at me.
Font f = new Font();
Font.derive(Font.PLAIN, 10, Ui.UNITS_pt);
Current time is 3:55pm EST. I am online for chat at PowerMountain Chat just enter in any user name to connect or post response to this forum please.
03-30-2009 01:04 PM
04-26-2009 04:46 PM
Hey, just in case someone else is wondering, here is the solution:
// First, derive the default font and modify it to be PLAIN and 10 pt
Font myFont = Font.getDefault().derive(Font.PLAIN, 10);
// Then, set the font to what you derived above
// Then draw the text
graphics.drawText("Hello World", xpos, ypos);