×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546

    Spacing below text for any paticular font is different in different phones.

    This code prints "abcd" on first line and "pqrs" on second line.
    However the spacing between these 2 lines on Nokia 2626 is very less while on Nokia E61i is very more.
    I wish to have a constant line spacing on all devices. Please tell me how to achieve this.

    Code:
    Text1 = "abcd";
    Font1 = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE);
    MyGraphics.setFont(Font1);
    MyGraphics.drawString(Text1, 0, 0, Graphics.LEFT | Graphics.TOP);
    
    Text2 = "pqrs";
    Font2 = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
    MyGraphics.setFont(Font2);
    MyGraphics.drawString(Text2, 0, Font1.getHeight(), Graphics.LEFT | Graphics.TOP);

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,553

    Re: Spacing below text for any paticular font is different in different phones.

    It'll be hard as the devices are not using the same operating systems, same fonts and same font rendering technologies/algorithms.

    If you want better control, draw the characters yourself (your own fonts or bitmaps).

Similar Threads

  1. [PyS60 1.4.4] Font on image example
    By cyke64 in forum Symbian
    Replies: 0
    Last Post: 2008-06-29, 02:15
  2. Rendering text in multiple languages
    By TheLittleBird in forum Symbian
    Replies: 0
    Last Post: 2007-06-05, 12:52
  3. Font Size (Pixels) on Series 40 Phones
    By lin_albert in forum Mobile Java General
    Replies: 3
    Last Post: 2003-06-03, 13:57
  4. Font size (in pixels) for Series 40 phones
    By lin_albert in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2003-06-03, 11:00
  5. Transferring Text messages between 2 phones
    By scottylowe in forum General Messaging
    Replies: 1
    Last Post: 2002-09-30, 10:38

Posting Permissions

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