GetImage Crashed in Docker when Used "Microsoft YaHei" with 16pt Size

Please add License.txt file as embed resources, build the project, run docker compose up -d in Windows with Docker ( make sure C:\Windows\Fonts mounted ) .

Sample project and presentation file is below:

ConsoleApp1.zip (24.5 KB)

Crashed log:

image.png (8.9 KB)

@islide,
Thank you for contacting support. I am working on the issue and will get back to you soon.

@islide,
Thank you for your patience. Unfortunately, your Dockerfile is incomplete and I was unable to reproduce the error you described but I used the following Dockerfile

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env

WORKDIR /App
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime

RUN apt-get update && apt-get install -y \
 libfontconfig1 \
 libfreetype6 \
 libexpat1 \
 libpng16-16

WORKDIR /App
COPY --from=build-env /App/out .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]

and it works fine. I hope this will help you.

@andrey.potapov

I have update Dokcerfile as your version, to use dotnet sdk docker build and run, it still crashed.

Please make sure you have use docker compose to mount c:/Windows/Fonts folder into /user/share/fonts, otherwise, it will not render msyh font, and will not crashed.

ConsoleApp1.zip (24.7 KB)

@islide,
Thank you for the details. I am working on the issue and will get back to you soon.

@islide,
Thank you for your patience. Unfortunately, I was unable to reproduce the error you encountered. Could you kindly share the instructions (step by step) on how to reproduce the exception on our end? We would greatly appreciate it.

@andrey.potapov

Could you find C:\Windows\Fonts\msyh.ttc file in your system fonts folder? If not, please download it from any fonts website to make sure this font existed in Docker /user/share/fonts folder, otherwise, it will not render this font, and will not crash.

I cannot share you this font file, it is so big.

image.png (1.3 KB)

@andrey.potapov

By the way, please run without Docker, and check if the font is render with MSYH, not [X] blocks.

@islide,
Thank you for the details. I am working on the issue and will get back to you soon.

@islide,
Thank you for your patience. Unfortunately, I am still unable to reproduce the error you described and the output image with the character ① looks fine. We need more details on how to reproduce the problem.