| Reply | « Previous Thread | Next Thread » |
|
This code works fine:
Code:
img.text((100,150), u"hello", fill = (0,0,0), font = (None,50))
canvas.blit(img)
Code:
img.text((100,150), u"hello", fill = (0,0,0), font = (None,50,FONT_BOLD))
canvas.blit(img)
1.4.5 doc - page 32 says: A font can be speci_ed in three ways: _ None, meaning the default font _ a Unicode string that represents a full font name, such as u'LatinBold19' _ a plain string symbolic name that refers to a font setting currently speci_ed by the UI framework _ as a two or three element tuple, where { the _rst element is the font name (unicode or string) or None for default font { the second element is the font height in pixels or None for default size { the third (optional) element is the ags applied to the font or None for default options. The ags are the following: _ FONT_BOLD bold |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
Hi jtullis,
Well, FONT_BOLD is declared in graphics module, so you should assign it: Code:
import graphics img.text((100,150), u"hello", fill = (0,0,0), font = (None,50,graphics.FONT_BOLD)) canvas.blit(img) ![]() Hope it helps, Rafael.
Last edited by Rafael T. : 2008-12-09 at 05:36.
|
|
Quote:
But why my 3230 didn't work either, even though I have done that? |
|
Correct - thank you Rafael.
Code:
img.text((100,150), u"hello", fill = (0,0,0), font = (None,50,graphics.FONT_BOLD))
canvas.blit(img)
Is there a way for us to suggest examples to go in the pdf doc? I have pasted the flags below in case someone searching in future needs help to do the same as me. FONT_BOLD bold FONT_ITALIC italic FONT_SUBSCRIPT subscript FONT_SUPERSCRIPT superscript FONT_ANTIALIAS forces the font to be antialiased FONT_NO ANTIALIAS forces the font to not be antialiased |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
It is obvious because the Documentation is separated by modules, so all you see inside graphics module, should have graphics. in the front and this is valid for all the modules inside the PDF file ![]() BR, Rafael. |
|
But why my 3230 didn't work either, even though I have done that?
|
|
Quote:
There's a module called Image1st or something that should give the methods you need. |
|
Quote:
![]() BR Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
OK I understand a bit better how to use the help doc now - thank you!
Also, is there a diagram of all the modules and their classes/functions etc, like a UML diagram? Or do we always have to trawl through the help doc to find out the options? Thanks again, John www.nottinghamjazz.co.uk |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
![]() Also a good way is checking the Wiki Code Examples, which can also help you very much. BR, Rafael. |
|
May be,But I mean the 3230s are 2nd edition phones?
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| How to get the name of the used font | chrishawaii | Symbian User Interface | 1 | 2007-06-22 07:55 |
| Devenagri Unicode Font for Nokia 6600 | gapata | Series 40 & S60 Platform Feedback | 1 | 2007-01-22 10:59 |
| font file in use, how to uninstall | kmsoomro | General Symbian C++ | 10 | 2007-01-10 09:57 |
| Install font trouble | address2 | General Symbian C++ | 0 | 2003-09-09 06:27 |
| font problem | lczgn | Symbian | 0 | 2003-05-19 05:00 |