Skip to main content

Fonts on phoneME

6 replies [Last post]
Joined: 2010-04-12

Hi all, i wanted to know which fonts are supported by the VM, i tried to use Courier new in a project ( i need all the letters to have the same size ) and the font ilustrated doesn't look like Courier new, thanks in advance,


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-06

As I remember fonts are a phone by phone thing. However, LWUIT allows you add specific fonts to your application which would give you the consistency that your looking for.

Joined: 2010-04-12

Thanks for your response. It's time to be more specific, i'm using phoneME personal profile on Windows mobile 5. I have several windows made on AWT and i need "Courier new" fonts in some objects (like lists), now i've been looking to LWUIT and i'm not pretty sure about how i can port the fonts. Would you please give me an idea? thanks in advance

Message was edited by: m4nti5

Joined: 2003-06-06

Light Weight UI Toolkit. See for everything that you need.

Joined: 2006-04-23

Me too! It seems that it throws a SecurityException and then uses the default one when I try to get a Font from a name.

Internally it calls System.getProperty("Arial");

[java] access denied (java.util.PropertyPermission Arial read)
[java] at Source)
[java] at Source)
[java] at java.lang.SecurityManager.checkPermission(Unknown Source)
[java] at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
[java] at java.lang.System.getProperty(Unknown Source)

I have printed the available fonts and it shows:

[java] Available Fonts:
[java] dialog
[java] sansserif
[java] serif
[java] dialoginput
[java] default
[java] monospaced

Any suggestions?

Joined: 2006-04-23

I am using QT, but it seems it does not load the font properly. The dir path is blank:


[i]static {
String s = File.separator;
String javaHome = (String) AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty("java.home");
// String dir = "lib" + s + "fonts";
File f = new File(javaHome, "lib" + s + "fonts");
// String dir = f.getAbsolutePath();
fontNameMap = new HashMap(10);

String dir = ""; s = "";

/* Initialise table to map standard Java font names and styles to TrueType Fonts */

// Changed all the physical font family names to the names that
// Qt can understand. We were having "times", "helvetica" etc
// as the physical font names and since it did not match what qt
// expects, we were rendering with some font that qt picked up.
// Following J2SE's convention of mapping
// "monospaced" and "dialoginput" has MonoSpaced Font (Courier)
// "sansserif" and "sanserif" has a sans serif Font (We just use
// "Sans Serif" for qt to pick some San Serif font. and the
// "default" font is a Sans Serif font
fontNameMap.put("serif", dir + s + "Serif");

fontNameMap.put("sansserif", dir + s + "Sans Serif");

fontNameMap.put("monospaced", dir + s + "Courier");

fontNameMap.put("dialog", dir + s + "Sans Serif");

fontNameMap.put("dialoginput", dir + s + "Courier");

/* This should always exist and is used for fonts whose name is not any of the above. */

fontNameMap.put("default", dir + s + "Sans Serif");

Is that right?