@@ -297,10 +297,11 @@ def get_wx_font(self, s, prop):
297
297
font = self .fontd .get (key )
298
298
if font is not None :
299
299
return font
300
+ size = self .points_to_pixels (prop .get_size_in_points ())
300
301
# Font colour is determined by the active wx.Pen
301
302
# TODO: It may be wise to cache font information
302
303
self .fontd [key ] = font = wx .Font ( # Cache the font and gc.
303
- pointSize = self . points_to_pixels ( prop . get_size_in_points () ),
304
+ pointSize = int ( size + 0.5 ),
304
305
family = self .fontnames .get (prop .get_name (), wx .ROMAN ),
305
306
style = self .fontangles [prop .get_style ()],
306
307
weight = self .fontweights [prop .get_weight ()])
@@ -567,7 +568,7 @@ def start_event_loop(self, timeout=0):
567
568
raise RuntimeError ("Event loop already running" )
568
569
timer = wx .Timer (self , id = wx .ID_ANY )
569
570
if timeout > 0 :
570
- timer .Start (timeout * 1000 , oneShot = True )
571
+ timer .Start (int ( timeout * 1000 ) , oneShot = True )
571
572
self .Bind (wx .EVT_TIMER , self .stop_event_loop , id = timer .GetId ())
572
573
# Event loop handler for start/stop event loop
573
574
self ._event_loop = wx .GUIEventLoop ()
0 commit comments