×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    India
    Posts
    25

    Smile Monospace font in Nokia 6270

    Hi,

    I am working with CustomItem class and created a custom list component. I have to use monospace font in my list.

    For this, I have used g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_PLAIN,FONT.SIZE_MEDIUM));

    before drawing string on screen.

    In WTK emulator, it works perfectly and shows the output list in monospace font. However when I tried this in my Nokia 6270 mobile phone, it doesn't show monospace font.

    Any clue ?

    Thanks, Kirtimaan

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    62

    Re: Monospace font in Nokia 6270

    Quote Originally Posted by kirtimaan
    I have to use monospace font in my list.

    For this, I have used g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_PLAIN,FONT.SIZE_MEDIUM));

    before drawing string on screen.

    In WTK emulator, it works perfectly and shows the output list in monospace font. However when I tried this in my Nokia 6270 mobile phone, it doesn't show monospace font.
    The MIDP spec defines three font faces, three font sizes and three style modifiers (which can be combined).

    So in theory, you have the possibility to request for 72 different fonts (3*3*(2^3) combinations).

    But the MIDP Javadoc for the Font class http://java.sun.com/javame/reference...cdui/Font.html also reads:
    Quote Originally Posted by Javadoc
    Fonts cannot be created by applications. Instead, applications query for fonts based on font attributes and the system will attempt to provide a font that matches the requested attributes as closely as possible.
    and also:
    Quote Originally Posted by Javadoc
    getFont() obtains an object representing a font having the specified face, style, and size. If a matching font does not exist, the system will attempt to provide the closest match. This method always returns a valid font object, even if it is not a close match to the request.
    So the case here is that the Nokia 6270 does not support more than the one font you already are using. Requesting for fonts with different faces all return the same font. More generally, I don't think that any Nokia device that I have seen supports the monospace font face.

    The WTK is a PC emulator, and it supports a more diverse set of fonts.

  3. #3
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: Monospace font in Nokia 6270

    Take a look at this document, the Series 40 UI Style Guide v3.2: http://www.forum.nokia.com/info/sw.n..._2_en.pdf.html

    The "Font" chapter says that most of the S40 fonts are proportional, so a proportional font uses varying widths for characters.

    I guess Nokia did it in order to utilize screen spaces more efficiently, and that's why monospace isn't available on 6270.

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    India
    Posts
    25

    Re: Monospace font in Nokia 6270

    knorring and axs,

    Thanks for your reply.

    So, is there any alternate of showing a list with mono spaced font in nokia devices ?

    Thanks, Kirtimaan

  5. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    2

    Re: Monospace font in Nokia 6270

    I use the MicroFont library to draw strings in all of my games. MicroFont allows you to use fonts other than the default ones and I find it a little faster than the normal graphics.drawString method.

    This will let you use the font you want but may add as much as 15k to your game.

  6. #6
    Registered User
    Join Date
    Dec 2005
    Location
    India
    Posts
    25

    Smile Re: Monospace font in Nokia 6270

    Quote Originally Posted by aclelland2
    I use the MicroFont library to draw strings in all of my games. MicroFont allows you to use fonts other than the default ones and I find it a little faster than the normal graphics.drawString method.

    This will let you use the font you want but may add as much as 15k to your game.

    aclelland2, Thanks!!

    I think this is what I should look for UI and as far as size increased by 15k, currently my app is around 65k in jar file, so I think if it goes to 80k, thats fine for now. I will give a try to this library.

    Again thanks.

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58
  2. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  3. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •