[15 Mar 2009] Another Bug with SetLayerStyle()---Changing Font Size

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
PEB
Posts: 591
Joined: Sun Feb 21, 2010 1:28 am

[15 Mar 2009] Another Bug with SetLayerStyle()---Changing Font Size

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 15 Mar 2009 11:07:44 -0000

Hi Andreas,

I just noticed another bug that at least shows up with OS 4.1. If a font is first set with SetFont(), the size of the font cannot be changed with SetLayerStyle() unless the font is first changed to a different one. The following code shows the problem:

Code: Select all

EnableLayers()
SetFont("DejaVu Sans Bold.font", 16)
CreateTextObject(1, "This is a test")
DisplayTextObject(1, #CENTER, #CENTER)
WaitLeftMouse()
;SetLayerStyle(1, {Font="DejaVu Sans Bold.font", FontSize=40})
SetLayerStyle(1, {FontSize=40})
WaitLeftMouse()
SetLayerStyle(1, {Font="DejaVu Sans.font"})
SetLayerStyle(1, {FontSize=40})
After the first mouse press, nothing changes, and it doesn't matter if the same font is declared again in the SetLayerStyle() call. However, if SetLayerStyle() is used to change the font, then the font can be resized.
User avatar
airsoftsoftwair
Posts: 5914
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[17 Mar 2009] Re: Another Bug with SetLayerStyle()---Changing Font Size

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 17 Mar 2009 10:16:39 +0100
Hi Andreas,

I just noticed another bug that at least shows up with OS 4.1. If a font is first set with SetFont(), the size of the font cannot be changed with SetLayerStyle() unless the font is first changed to a different one. The following code shows the problem:

Code: Select all

EnableLayers()
SetFont("DejaVu Sans Bold.font", 16)
CreateTextObject(1, "This is a test")
DisplayTextObject(1, #CENTER, #CENTER)
WaitLeftMouse()
;SetLayerStyle(1, {Font="DejaVu Sans Bold.font", FontSize=40})
SetLayerStyle(1, {FontSize=40})
WaitLeftMouse()
SetLayerStyle(1, {Font="DejaVu Sans.font"})
SetLayerStyle(1, {FontSize=40})
After the first mouse press, nothing changes, and it doesn't matter if the same font is declared again in the SetLayerStyle() call. However, if SetLayerStyle() is used to change the font, then the font can be resized.
Thanks for the report. That's fixed now, too.
Locked