Skip to content

Commit 8243bd5

Browse files
Funami580FichteFoll
authored andcommitted
Fix renderer + renderer_test
1 parent 41483dc commit 8243bd5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

_renderer_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sys
88

99
doc = ass.document.Document()
10+
doc.scaled_border_and_shadow = "yes"
1011

1112
SCALE = 2
1213
DPI = 72
@@ -22,7 +23,7 @@
2223
margin_v=0,
2324
fontname="Garamond",
2425
fontsize=13 * SCALE,
25-
primary_color=ass.document.Color.BLACK
26+
primary_color=ass.data.Color.BLACK
2627
))
2728

2829
doc.events.append(ass.document.Dialogue(
@@ -105,7 +106,7 @@
105106
ctx = ass.renderer.Context()
106107

107108
r = ctx.make_renderer()
108-
r.set_fonts(fontconfig_config="/usr/local/etc/fonts/fonts.conf")
109+
r.set_fonts(fontconfig_config="\0")
109110
r.set_all_sizes(SIZE)
110111

111112
sys.stdout.write("loading document... ")

ass/renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ def populate(self, doc):
456456
self.wrap_style = doc.wrap_style
457457
self.scaled_border_and_shadow = (doc.scaled_border_and_shadow.lower() == "yes")
458458

459-
self.style_format = ", ".join(doc.styles_field_order).encode("utf-8")
460-
self.event_format = ", ".join(doc.events_field_order).encode("utf-8")
459+
self.style_format = ", ".join(doc.SECTIONS[doc.STYLE_ASS_HEADER].field_order).encode("utf-8")
460+
self.event_format = ", ".join(doc.SECTIONS[doc.EVENTS_HEADER].field_order).encode("utf-8")
461461

462462
for d_style in doc.styles:
463463
style = self.make_style()

0 commit comments

Comments
 (0)