FontRepository.FindFont(“Arial”) works when the following is run in the Dockerfile.
RUN apk --no-cache add msttcorefonts-installer fontconfig
RUN update-ms-fonts
RUN fc-cache -f
However, we want to use the open source fonts. Here is the install we are running for the ttf fonts.
RUN apk --no-cache add ttf-liberation fontconfig
RUN fc-cache -f
When we run FontRepository.FindFont(“Liberation Sans”), we get an an error saying the font cannot be found.
fc-match and fc-list confirm that Liberation Sans is being installed successfully in the container.
Please advise how we can use an open source version of Arial in Linux using Aspose.PDF.