[20 Sep 2011] Yet Another Strange Bug
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 20 Sep 2011 19:31:38 -0000
Please test the following code:
For some strange reason, I get output like this:
Notice how the same text with the same built-in font reports different widths.
Any ideas?
Please test the following code:
Code: Select all
SetFont(#SANS, 18, {Engine=#FONTENGINE_INBUILT})
TestText$="Test Text"
TestNum=9
Delta=-1
Function p_TestFunc()
TestNum=TestNum+Delta
If TestNum=5 Or TestNum=9 Then Delta=-Delta
Length=TextWidth(LeftStr(TestText$, TestNum))
DebugPrint(LeftStr(TestText$, TestNum), Length)
EndFunction
InstallEventHandler({OnMouseUp=p_TestFunc})
Repeat
WaitEvent
Forever
Code: Select all
Test Tex 56 <---
Test Te 49 <---
Test T 42
Test 33
Test T 42
Test Te 51 <---
Test Tex 58 <---
Any ideas?