LABEL command affects LABELSIZE command
A Logo programming environment for Microsoft Windows
Brought to you by:
david_costanzo
Using 6.34.0+ wxWidgets version
Running the following procedure:
to MyTest
make "graf.TFnt [[Verdana] -16 0 0 700 0 0 0 0 3 2 1 34]
make "graf.Font [[Verdana] -13 0 0 400 0 0 0 0 3 2 1 49]
make "name [MONIQUE FLEMINGS]
cs
setlabelfont :graf.TFnt
rt 90
label :name
lt 90
setlabelfont :graf.Font
show labelsize :name
label :name
show labelsize :name
end
gives
[133 16]
[139 17]
was expecting but lines to be the same.
Thanks for the report. I have confirmed that I can reproduce this as far back as MSWLogo 6.5b. I would also characterize this as "LABELSIZE outputs incorrect result until LABEL is run". I haven't looked into the cause, but from quickly experimenting with your example, BITBLOCK of the first LABELSIZE does not sufficiently cover the label.
I have committed a fix for this. It will be available in 6.35.0, which I expect to release within a few weeks.
The bug is that LABEL was setting the "escapement" of the font (the angle at which the text is rendered), but LABELSIZE was not. As a result, if LABEL were run, then the escapement would be updated for LABELSIZE. LABELSIZE uses the win32 function GetTextExtentPoint(), which claims that it ignores the escapement, but that is apparently not the case. It's possible that this was the case when LABELSIZE was first implemented (for 16-bit windows or win9X systems).
I could have fixed this by always setting the escapement to zero in LABELSIZE, which would have made LABELSIZE output the same value, independent of the turtle's orientation. However, since LABEL draws different text sizes depending on the orientation, I thought it best to make LABELSIZE match the escapement of LABEL.