Skip to content

Commit ce940cb

Browse files
committed
Fix issue #2 and #3
1 parent 0ad60c4 commit ce940cb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

modules/ILL/ILL.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module_version = "1.5.4"
1+
module_version = "1.5.5"
22

33
haveDepCtrl, DependencyControl = pcall require, "l0.DependencyControl"
44

modules/ILL/ILL/Ass/Line.moon

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class Line
2020
{:styles, :meta} = ass
2121
{:res_x, :res_y, :video_x_correct_factor} = meta
2222

23-
if type(l.text) == "string" and not l.isShape
23+
if type(l.text) == "string"
2424
l.text = Text l.text
2525

2626
if not l.data and not l.isShape
2727
l.text\moveToFirstLayer!
2828

2929
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!
3131
.duration = .end_time - .start_time
3232
textIsBlank = Util.isBlank .text_stripped
3333

@@ -57,7 +57,7 @@ class Line
5757
.data[tag] = value
5858

5959
-- 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!
6161
for {:tag, :name} in *.tags\split!
6262
{:style_name, :value} = tag
6363
if style_name
@@ -94,12 +94,16 @@ class Line
9494
-- to make everything more dynamic
9595
.shape = .text_stripped
9696
.text_stripped = ""
97+
.prevspace = 0
98+
.postspace = 0
9799

98100
-- gets the metric values of the text
99101
if textIsBlank
100102
textExtents = font\getTextExtents " "
101103
.width = 0
102104
.height = textExtents.height
105+
.ascent = 0
106+
.descent = 0
103107
else
104108
textValue = .isShape and "" or .text_stripped
105109
textExtents = font\getTextExtents textValue
@@ -422,6 +426,8 @@ class Line
422426
lerpTagTransform f, dado, tags
423427
lerpTagFade f, dado, tags
424428
return tags, text
429+
if l.isShape
430+
line.tags = line.text.tagsBlocks[1]
425431
fn line, i, end_frame
426432

427433
-- callback to access the shapes

0 commit comments

Comments
 (0)