Commit ·
59cf51d
1
Parent(s): c060ff8
Use working ImageMagick fix, TheBoldFont, 70% caption position, add captions to story_reels
Browse files
Dockerfile
CHANGED
|
@@ -12,9 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 12 |
fonts-dejavu-core \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Fix ImageMagick
|
| 16 |
-
|
| 17 |
-
RUN sed -i 's/
|
| 18 |
|
| 19 |
RUN useradd -m -u 1000 user
|
| 20 |
USER user
|
|
|
|
| 12 |
fonts-dejavu-core \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Fix ImageMagick policy to allow text rendering
|
| 16 |
+
# Use find to locate policy.xml as the path varies by version
|
| 17 |
+
RUN find /etc -name "policy.xml" -exec sed -i 's/none/read,write/g' {} +
|
| 18 |
|
| 19 |
RUN useradd -m -u 1000 user
|
| 20 |
USER user
|
modules/story_reels/services/story_creator.py
CHANGED
|
@@ -582,7 +582,7 @@ class StoryCreator:
|
|
| 582 |
font_name = "DejaVu-Sans-Bold"
|
| 583 |
|
| 584 |
caption_clips = []
|
| 585 |
-
y_pos = TARGET_HEIGHT * 0.
|
| 586 |
|
| 587 |
for cap in captions:
|
| 588 |
start_time = cap.get("startMs", 0) / 1000
|
|
|
|
| 582 |
font_name = "DejaVu-Sans-Bold"
|
| 583 |
|
| 584 |
caption_clips = []
|
| 585 |
+
y_pos = TARGET_HEIGHT * 0.70 # 70% down (bottom area)
|
| 586 |
|
| 587 |
for cap in captions:
|
| 588 |
start_time = cap.get("startMs", 0) / 1000
|