Main index > Lost posts > How to change fonts in the weatherforecast desklet?

By Noobuntu (User), on Sat Mar 4 08:54:33 2006: How to change fonts in the weatherforecast desklet?.

THere is no font entry in the config.txt

Shall I just replace all VeraBd entries in weatherforecast.py?
How do I place my new font? Where?

By Noobuntu (User), on Sat Mar 4 08:59:17 2006.

Ok, I did change the entries in weatherforecast.py and now it displays my fonts. I use FreeSansBold. However, it cuts the bottom part, so one cannot see the bottom of the g's or p's or any letter that extends down. Fixes?

By Walt H (User), on Sun Mar 5 17:52:48 2006: changing the image size.

One thing you can try is to change the size of the background image in weatherforecast.

First, back up your copy of weatherforecast.py. Then, open weatherforecast.py with a text editor and look for a line like this (in my file, it's line 118):

Code:

self.buffer=adesklets.create_image(500,120)

The first value sets the width, the second sets the height. Try increasing that second value. You will also need to change the value in the line that reads

Code:

adesklets.window_resize(self.window_w,120)
(in my file, line 133)
Make that value the same. If you changed the first 120 to 150, increase this 120 to 150 as well.

There's one more place you have to change. It's the line (in my file, line 162) that reads

Code:

adesklets.image_fill_rectangle(0,0,self.window_w,120)

This number should be the same as the other two; in my example, it's now 150. Save your file and restart the desklet. I think that will take care of the problem.

By syfou (Core Developer & Desklet Author), on Mon Mar 6 00:16:37 2006.

This belongs to the About existing desklets > weatherforecast thread. Please re-post there. Yours,


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.