Skip to content

Instantly share code, notes, and snippets.

@zofrex
Created December 18, 2020 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zofrex/ec78b45928473bb38eff31227bbb1d6c to your computer and use it in GitHub Desktop.
Save zofrex/ec78b45928473bb38eff31227bbb1d6c to your computer and use it in GitHub Desktop.
Working environment for rendering SW matching subs
SUP-*
resources/fonts
win32
FROM ubuntu:20.10
RUN apt-get update && apt-get install -y openjdk-11-jdk python2.7 curl build-essential unzip fontconfig
# Install libpango
RUN apt-get install -y meson libglib2.0-dev libfribidi-dev libharfbuzz-dev libthai-dev libfontconfig1-dev libcairo2-dev libxft-dev
WORKDIR /root
RUN curl --fail -OJL "https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz"
RUN tar -xf pango-1.42.4.tar.xz
WORKDIR /root/pango-1.42.4
# only needed for older versions of pango:
RUN apt-get install -y libgirepository1.0-dev
RUN meson _build
RUN ninja -C _build install
# Install ImageMagick
WORKDIR /root
RUN curl --fail -OJL "https://github.com/ImageMagick/ImageMagick/archive/7.0.10-23.tar.gz"
RUN tar -xf ImageMagick-7.0.10-23.tar.gz
WORKDIR /root/ImageMagick-7.0.10-23
RUN ./configure --with-pango=yes
RUN make install
RUN ldconfig /usr/local/lib
# Install required fonts
COPY resources/fonts.zip /tmp/fonts.zip
RUN unzip /tmp/fonts.zip -d /usr/share/fonts
RUN fc-cache -f -v
# Copy over SRT files
RUN mkdir /subs
COPY SRT/ /subs/SRT
WORKDIR /subs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment