added font family to dependency

This commit is contained in:
Quentin Roussel
2024-08-18 20:38:14 +08:00
parent d9ad18d5af
commit 1bcb174c71
4 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,2 @@
images/**/*.png
**/*.mp4
**/*.webm

View File

@@ -3,7 +3,7 @@ FROM node:18-alpine
# Set TZ to Singapore to help with syncronizing with singapore's website time
ENV TZ="Asia/Singapore"
RUN apk update && apk add --no-cache ffmpeg npm pango-dev g++ make jpeg-dev giflib-dev librsvg-dev
RUN apk update && apk add --no-cache ffmpeg npm pango-dev g++ make jpeg-dev giflib-dev librsvg-dev ttf-dejavu
RUN mkdir -p /home/node/app/node_modules
RUN mkdir -p /home/node/app/images/raw

Binary file not shown.

View File

@@ -12,7 +12,7 @@ async function overlayImage(time_string) {
ctx.drawImage(overlay, 0, 0, 853, 479)
let text = time_string.substring(8, 10) + ':' + time_string.substring(10, 12);
ctx.font = 'bold 70px';
ctx.font = 'bold 70px sans-serif';
ctx.fillStyle = 'rgba(0,0,0,0.7)';
ctx.fillText(text, 853 - 250, 479 - 40);