request for font handling changes in Gui.py.......

40 views
Skip to first unread message

mung kie

unread,
Dec 19, 2017, 7:35:30 PM12/19/17
to pi3d



I have just been looking at some old code I have not played with in a while and did an upgrade of pi3d and found it broke stuff that I changed in Gui.py

Any chance someone can add this to Gui.py on git hub to make font scaling easier where pngfont is used.

Should just require three lines to be changed.

def __init__(self, font,fontscale=0.24, show_pointer=True):

   self.fontscale = fontscale

 camera=gui.camera, justify='L', size=gui.fontscale )


def __init__(self, font,fontscale=0.24, show_pointer=True):

self.fontscale = fontscale

 camera=gui.camera, justify='L', size=gui.fontscale )

in theory it should not effect anything else????

Paddy

unread,
Dec 20, 2017, 1:22:33 PM12/20/17
to pi3d
Hi, this looks sensible and doesn't break any of the demos in RunTests. (Hard to see how it could impact anything apart from Gui.py)

I will push the mod to the develop branch later today (and maybe do a new master version after testing on RPi and windows). Did you make any other improvements that should be added at the same time?

Paddy

mung kie

unread,
Dec 20, 2017, 9:27:44 PM12/20/17
to pi3d
Unfortunately nothing else to add that would not cause you lots of headaches fixing, the font scale thing was the last thing from some hacks I did a couple of years ago on x86 vmware that the hard drive died on, someone just recently gave me a broken desktop and so I was routing through some old drives trying to find parts. I think that I did some stuff in the pi3d tree that botched X11 mouse handling into something I required but I think that was not worth continuing.

Most stuff more recent than that has been on a rpi and I have not added anything in the pi3d source tree so I don't think would be easy to add.

I have not really done much with pi3d anyways, a botched sdf file importer and some methods for cross platform input handling (gtk and android) are the only things that maybe of interest, but I do not have the time to integrate them for you, so they would cause you a weekend or twos work to add and they could break stuff.
Reply all
Reply to author
Forward
0 new messages