@@ -20,14 +20,14 @@ class Line
20
20
{ : styles, : meta} = ass
21
21
{ : res_x, : res_y, : video_x_correct_factor} = meta
22
22
23
- if type ( l. text) == " string" and not l . isShape
23
+ if type ( l. text) == " string"
24
24
l. text = Text l. text
25
25
26
26
if not l. data and not l. isShape
27
27
l. text\ moveToFirstLayer!
28
28
29
29
with l
30
- . text_stripped = . isShape and . text\ gsub( " %b{}" , " " ) or . text\ stripped!
30
+ . text_stripped = . isShape and . text. textBlocks [ 1 ] \ gsub( " %b{}" , " " ) or . text\ stripped!
31
31
. duration = . end_time - . start_time
32
32
textIsBlank = Util . isBlank . text_stripped
33
33
@@ -57,7 +57,7 @@ class Line
57
57
. data[ tag] = value
58
58
59
59
-- sets the values found in the tags to the style
60
- . tags or= Tags . isShape and . text \ match ( " %b{} " ) or . text. tagsBlocks[ 1 ] \ get!
60
+ . tags or= Tags . text. tagsBlocks[ 1 ] \ get!
61
61
for { : tag, : name} in *. tags\ split!
62
62
{ : style_name, : value} = tag
63
63
if style_name
@@ -94,12 +94,16 @@ class Line
94
94
-- to make everything more dynamic
95
95
. shape = . text_stripped
96
96
. text_stripped = " "
97
+ . prevspace = 0
98
+ . postspace = 0
97
99
98
100
-- gets the metric values of the text
99
101
if textIsBlank
100
102
textExtents = font\ getTextExtents " "
101
103
. width = 0
102
104
. height = textExtents. height
105
+ . ascent = 0
106
+ . descent = 0
103
107
else
104
108
textValue = . isShape and " " or . text_stripped
105
109
textExtents = font\ getTextExtents textValue
@@ -422,6 +426,8 @@ class Line
422
426
lerpTagTransform f, dado, tags
423
427
lerpTagFade f, dado, tags
424
428
return tags, text
429
+ if l. isShape
430
+ line. tags = line. text. tagsBlocks[ 1 ]
425
431
fn line, i, end_frame
426
432
427
433
-- callback to access the shapes
0 commit comments