| Reply | « Previous Thread | Next Thread » |
|
not 'normal' and 'legend'.
thanks! |
| anyko38155285 |
| View Public Profile |
| Find all posts by anyko38155285 |
|
you con change fonts they change size too
Code:
.text((125,200),u'text',0x998800,font=u'Alb17b') Code:
import appuifw print appuifw.available_fonts() |
|
If you have a somewhat newer phone (2nd ed. FP2 or newer AFAIK), you can also do something like this:
Code:
.text((125,200),u'text',0x998800,font=('normal', 30))
Code:
.text((125,200),u'text',0x998800,font=('normal', 30, graphics.FONT_ANTIALIAS))
|
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
Code:
.text((125,200),u'text',0x998800,font=('normal', 30))
hi y.a.k why i am getting an error when using the above code as invalid font specification. Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Are you using it on the canvas?
Please post the full line of code where these Fonts wish to be applied. Best Regards, Croozeus |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hey croozeus
the code i have posted below is almost complete. then also let me post it again Code:
canvas.text((125,200),u'text',0x998800,font=('normal', 30))
![]() Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Use
Code:
canvas.text((125,200),u'text',0x998800,font=('normal', 30))
![]() BR, Croozeus
Last edited by croozeus : 2008-07-01 at 12:49.
|
|
@gaba88
Hmmm. Could you try this code? Because it works for me. Code:
import appuifw, e32
canvas=appuifw.app.body=appuifw.Canvas()
canvas.text((125,200),u'text',0x998800,font=('normal',30))
a=e32.Ao_lock()
appuifw.app.exit_key_handler=a.signal
a.wait()
Somethings's wrong with your code, unmatched parenthesis. |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hi y.a.k
again getting the same error as invalid font specification as i was getting previously. I am testing it in n70. @croozeus why to use self.canvas instead of canvas??? Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Yes, I had fixed it!
|
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hi y.a.k
i think the problem is with the font which we have specified as i tried that without font specification and it worked. Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Still not working? Odd. Maybe you should post your whole code and the exact error traceback. Please do not retype the code on the PC, send it as it is and copy/paste here.
|
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
the code is the same you posted i just want to change the text size on canvas. Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Post the exact error message. It is never just "Invalid font specification". There's always a hint after this sentence:
- wrong number of elements in tuple - expected string, unicode or tuple - expected unicode or None as font name Which one do you get? |
|
Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
hi y.a.k
i get only just invalid font specification nothing like that you mentioned. and the only problem is wid th font part i am investigating it. moreover can anybody else try this code and verify the problem. Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| large canvas text | ianw | Python | 2 | 2008-06-12 17:22 |
| Maximum size of text region? | wftomas | General Messaging | 2 | 2005-04-01 09:10 |
| Major problem with delegation to Canvas | bartekn | Mobile Java Media (Graphics & Sounds) | 8 | 2003-10-08 18:46 |
| how do you change the size of the font? | Nokia_Archive | General Symbian C++ | 1 | 2002-05-31 15:42 |
| Change the paintable canvas size of the emulator | Nokia_Archived | Mobile Java Tools & SDKs | 1 | 2002-05-17 19:07 |