Closed Alexustas closed 6 years ago
By the way, tags([#rrggbbaa] and [@x..]) in the string returned by the script are processed perfectly
The '$$$' is processed before the tags or anything else, so if the script returns '$$$' for a variable, it will work as you show it. I will need to add support for vertical text.
I will need to add support for vertical text.
It will be great!
I think I can add this only for fixed-width text. Instead of '$$$', it will be the tag '[n]' (n = new line). It will behave strangely for any justification except left/upper, but that is not a problem for MFD.
For variable-width text on labels, '$$$' already works. Adding support for '[n]' will be very difficult, since it requires me to know what the previous character advance was so I can back up far enough. Likewise, supporting text anchors other than left/upper is a lot of effort.
Is it possible to configure the space between the lines? this is a very important point
Is it possible to configure the space between the lines? this is a very important point
Maybe tag [n] means 'advance one line', [n#] (eg, [n1.5]) means 'advance this number of lines'?
Now I'm using a script that uses X and Y Nudge Tags to offset each next character in a string
function ASET_VERTICAL_TEXT_CONVERTER(text,vertShift,upperCase)
if text ~= nil and text ~= "" then
local stringLength = string.len(text)
if upperCase ~= nil or upperCase == true then text = string.upper(text) end
if vertShift == nil then vertShift = 0 end
if stringLength > 1 then
local newText = ""
for i=1,stringLength,1 do
newText = newText .. string.sub(text,i,i) .. "[@x" .. -10*i .. "][@y" .. 20*i-vertShift*i .. "]"
end
return newText
else
return text
end
else
return ""
end
end
(eg, [n1.5]) means 'advance this number of lines'?
it would be quite good, if it support value less 1
it would be quite good, if it support value less 1 Yes, any number, including negative numbers or 0.
Excellent!
Okay - now on DropBox. I tested [n]
(1 line) and [n#]
with integer, fraction, zero, and negative values.
I changed the script using the [n]
tag, and everything works fine.
Thank you!
I need to convert plain text to vertical. like this.
I made a script that adds after each character in the line the string "$$$. So the string is looks like this:
S$$$o$$$l$$$i$$$d$$$F$$$u$$$e$$$l$$$
But on the MFD screen I get. this:
(Do not pay attention to the fact that the letters gradually go up, this is normal)
although if I put the same line in the text field in the "TEXT" node , then I get the correct result. It looks that the MAS handles the
$$$
in the text if it directly entered, but does not handles in the string returned by the script