|
Post by tsh73 on Apr 25, 2018 15:06:00 GMT -5
Problem #1 non-integer font sizes are ignored, result in default font size Expected result: I expect it at least be truncated, like in drawing graphic commands Problem #2 sometimes in calculation LB gets non-integer result there shouldn't be one like 40*0.5 see here print 40*0.5 x= 40*0.5 print x produces 20.0 20 So on these results problem #1 kicks in. It happens on other forms of font command as well ( initially reported on form "font fontName 0 fontSize", particularly "font fontName 0 ";16*0.5 ) Workaround: use int() on font size How it looks: nomainwin open "Font bug demo" for graphics as #gr #gr "trapclose [quit]" #gr "down"
#gr "place 20 30" #gr "font Times_New_Roman 20" 'Ok #gr "\Font size 20"
'First bug #gr "place 20 60" #gr "font Times_New_Roman 20.5" 'Not Ok #gr "\Font size 20.5"
#gr "place 20 90" #gr "font Times_New_Roman 21" 'Ok #gr "\Font size 21"
'Now, second bug #gr "place 20 120" #gr "font Times_New_Roman ";40*0.5'Not Ok #gr "\Font size ";40*0.5
#gr "flush"
wait
[quit] close #gr end
|
|