In my report, I use font SimSun to display Chinese, when preview it's OK, but after click print, an exception is thrown.
Internal Server Error
Font data for font "SimSun" cannot be obtained. Possible reasons are: The font is not installed in . The font is not found in the directories specified by the "FontLocations" configuration entries. The font is not declared in "" configuration section
In my docker image, run command -list, is there.
C:\Users\Anders> docker exec -it 3485 bash root@3485bbdabbb3:/app# fc-list /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book /usr/share/fonts/simsun.ttf: SimSun,宋体:style=Regular /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
FROM /2.2- AS builder
WORKDIR /app
# caches restore result by copying file separately
COPY * config/
RUN restore
COPY .
RUN publish --output /app/ --configuration Release
RUN -n 's:.*<AssemblyName>\(.*\)</AssemblyName>.*:\1:p' * > __assemblyname
RUN if [ - __assemblyname; then filename=$ *); echo $filename%*} > __assemblyname;
# Stage 2
FROM /2.2--runtime
ENV PORT 80
EXPOSE 80
COPY simsun.ttf /usr/share/fonts/simsun.ttf
RUN apt-get update \
&& apt-get install -y \
libc6-dev \
\
libx11-dev \
\
&& rm -rf /var/lib/apt/lists/*
RUN fc-cache -f -v
WORKDIR /app
COPY --from=builder /app
ENTRYPOINT $cat /app/__assemblyname)