You Are Here:

Community: Developer Discussion Boards

#1 Old Spacing below text for any paticular font is different in different phones. - 2008-10-13, 17:28

Join Date: Jan 2008
Posts: 533
Location: Amravati, India
arpit2agrawal
Offline
Super Contributor
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);
Reply With Quote

#2 Old Re: Spacing below text for any paticular font is different in different phones. - 2008-10-14, 13:35

Join Date: Mar 2003
Posts: 6,215
petrib
Offline
Forum Nokia Champion
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).
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
[PyS60 1.4.4] Font on image example cyke64 Python 0 2008-06-29 03:15
Rendering text in multiple languages TheLittleBird General Symbian C++ 0 2007-06-05 13:52
Font Size (Pixels) on Series 40 Phones lin_albert Mobile Java General 3 2003-06-03 14:57
Font size (in pixels) for Series 40 phones lin_albert Mobile Java Media (Graphics & Sounds) 1 2003-06-03 12:00
Transferring Text messages between 2 phones scottylowe General Messaging 1 2002-09-30 11:38

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia