×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    42

    Nokia support for MONOSPACE font

    Nokia support for MONOSPACE font

    hi,
    Perhaps Im going mad but my Nokia 60series emulator and 7650 device doesnt seem to support a font with face: MONOSPACE.

    setting a font to MONOSPACE in the default WTK emulator correctly spaces all characters equally. However when I run my code on a Nokia emulator or device, the spaces of characters are unequal and their widths remain unchanged from the SYSTEM face settings.

    If anyone can help with a solution or explanation, pleeezzzz

    thanks in advance,
    Larry

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    You just don't get a monospaced font. While you can specify several parameters to create fonts of different sizes and styles, there's no guarantee that different values will actually give you different fonts. On some phones, even different sizes all come out the same. Basically, the minimum number of different fonts/sizes/styles that a phone has to provide is: one.

    The upshot is that you cannot write portable code that depends on a particular font characteristic, or on two different typefaces/styles/sizes actually looking different.

    If you need monospaced text, I think you will have to write some code to draw it one character at a time. You would have to examine the font somehow to determine an appropriate spacing (say, the width of an "M" character).

    You should be able to ask the Font object you're given what it is, and it should tell you what it actually is (not what you asked for).

    Hope this helps!

    Graham.

Posting Permissions

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