×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    2

    Small fonts without using MIDP 2.0

    I'd like to decrease the font size of my first MIDlet.
    The only way I can find is to use the setFont() method,
    which works fine in my emulator, but not on my phone.
    Problem is that setFont() is as from MIDP 2.0 and my phone
    (Nokia 6310i) only supports MIDP 1.0.
    Is tyere a way to use smaller font or text size with MIDP 1.0
    only ? Alternatively, can the phone's JVM be upgraded to
    support MIDP 2.0 ?
    TIA
    Chris

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Helsinki.FI
    Posts
    112
    Hi,

    use this MIDP 1.0 method:

    Graphics.setFont(getFont(Font.FACE_PROPORTIONAL, Font.SIZE_SMALL, Font.STYLE_PLAIN));

    This will set the font setting for the current Graphics entity as small is it gets on that particular phone.

    Kind regards,
    Tinke / FN

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    2
    Thanks for the reply Tinke.
    I thought about using Graphics, but it seems overkill
    for a char-based midlet. I am just using a List with two
    Commands. I'm not sure if and how that can be mixed with
    Graphics. All I can find to get a Graphics object is
    Image.getGraphics().

    TIA
    Chris

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    The advice Tinke gave you is only relevant if you are using a Canvas subclass as your displayable object. If you're using Forms and Lists, then I'm sorry to inform you there is nothing (yes, nothing) you can do to change the font used. It is completely up to the phone.

    shmoove

Posting Permissions

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