Skip to content

Commit 43c3e24

Browse files
committed
Fix rules text not sometimes being shrinked to fit the textbox
1 parent adcaf0a commit 43c3e24

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

py/borderless_showcase.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -999,14 +999,20 @@ def text_layer_rules(self) -> ArtLayer | None:
999999
and self.pt_text_reference
10001000
and self.text_wrap_reference
10011001
):
1002-
pt_ref_copy = self.pt_text_reference.duplicate(
1003-
self.text_wrap_reference, ElementPlacement.PlaceBefore
1004-
)
10051002
textbox_ref_shape = merge_shapes(
1006-
pt_ref_copy,
1003+
self.pt_text_reference.duplicate(
1004+
self.text_wrap_reference, ElementPlacement.PlaceBefore
1005+
),
10071006
self.text_wrap_reference,
10081007
operation=ShapeOperation.SubtractFront,
10091008
)
1009+
textbox_ref_shape = merge_shapes(
1010+
textbox_ref_shape,
1011+
self.textbox_overflow_reference.duplicate(
1012+
textbox_ref_shape, ElementPlacement.PlaceBefore
1013+
),
1014+
operation=ShapeOperation.Unite,
1015+
)
10101016
layer = create_text_layer_with_path(textbox_ref_shape, layer)
10111017
return layer
10121018

0 commit comments

Comments
 (0)