gfx.drawstr changed the behavior in 6.43 and is not in the reascript changelog.
Before: Many \n in sequence would go to a new line, like printing in the console
After: Many \n in sequence are ignored and only one used
Affected some scripts like Lokasenna GUI Text Editor Object got broken because relied in empty lines created by passing multiple "\n".
This seems to happen only is some fonts:
Script for reproduce :
Code:
local function Main()
local char = gfx.getchar()
if char ~= 27 and char ~= -1 then
reaper.defer(Main)
end
gfx.setfont(0)
gfx.x, gfx.y = 0, 0
gfx.drawstr(text)
gfx.setfont(1,"Arial", 20 )
gfx.x, gfx.y = 150, 0
gfx.drawstr(text)
gfx.update()
end
text = '\n\nLINE\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nLINE'
gfx.init("My Window", 640, 480, 0, 200, 200)
Main()
6.43 CHANGELOG:
Code:
ReaScript: add bandpass type to TrackFX_SetEQParam, etc
ReaScript: Envelope_GetParentTrack/Take always return index/index2 in Lua
ReaScript: Fix GetUserFileNameForRead() when called with forward slashes on Windows .
ReaScript: GetEnvelopePointEx/GetEnvelopePoint/Envelope_Evaluate always return all output parameters in Lua
ReaScript: improve ident strings for VST plug-ins (include VST2 and VST3 IDs)
ReaScript: Lua functions do not type-check parameters which are output-only
ReaScript: make output-only parameters optional in EEL2 when possible
ReaScript: ReaLimit supports Track/TakeFX_Get/SetNamedConfigParm for THRESHOLD, CEILING, TRUEPEAK
ReaScript: save/load script and "P_EXT:" extension data for the master track .
ReaScript: TimeMap_curFrameRate() always returns dropFrame in Lua
ReaScript: Track/TakeFX_GetPinMappings/IOSize always return all outputs in Lua