Categories: Python | UI | How To | Code Examples
This page was last modified 18:32, 26 May 2008.
Python Fonts
From Forum Nokia Wiki
This article provides information about the types of fonts used in PyS60.
To display all available fonts, use these commands:
import appuifw print appuifw.available_fonts()
This displays "Nokia Hindi S60", "Nokia Hindi TitleSmBd S6", "Series 60 ZDigi"
The size and style of a font can be changed.
fnt=appuifw.Text() fnt.font=u"Nokia Hindi S6016b" # sets font to Nokia Hindi S60 16 bold
On a canvas, fonts a bit different. If you use their names as given by available_fonts(), these names must be in unicode. More common names for the most used fonts are:
font='normal' - displays large text
font='title' - displays very large text
font='annotation' or 'legend' or 'symbol' - displays small text
font='dense' - displays slightly thinner text
If the font is not specified in canvas.text the default font is used, which displays very small text.
Example:
canvas.text((20,20), u"Text here", font='normal') #or canvas.text((20,20), u"Text here", font=u"Nokia Hindi S6016b")
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple languages!! | psm78 | Mobile Java General | 8 | 2003-09-18 12:53 |
| ListBox and multiple fonts | Jeepy | General Symbian C++ | 0 | 2002-12-10 17:49 |
| How to view Indian languages(telugu,tamil etc) font on S60 Browser | spark55 | General Browsing | 3 | 2008-05-08 16:50 |
| typing arabic in wat | AnWaR | Browsing and Mark-ups | 0 | 2004-11-20 12:12 |
| multiselectionlist with editable fields | sagars | Python | 6 | 2008-05-03 10:40 |

