Open ebousse opened 4 years ago
Or could it be a different font being used, despite the fact that draw.io embeds its own fonts? (here, helvetica)
Note: I also tried locally and without docker image with xvfb-maybe
in case, but the result is the same.
I ended up creating my own docker image in a way similar to yours, but fedora-based, and the problem disappeared. Here is the Dockerfile I made:
FROM fedora:31
RUN dnf install -y xorg-x11-server-Xvfb alsa-lib dnf-plugins-core make
RUN dnf copr enable -y adrienverge/some-nice-fonts
RUN dnf install -y some-nice-fonts
RUN dnf install -y https://github.com/jgraph/drawio-desktop/releases/download/v12.6.5/draw.io-x86_64-12.6.5.rpm
COPY ./drawio /usr/local/bin/drawio
with the following drawio
script:
#!/bin/bash
echo "Running drawio in CLI mode only using xvfb-run"
xvfb-run /opt/draw.io/drawio --no-sandbox $@
Thank you. That's nice idea! I'll try it.
Hi! I'm using your nice docker image for a pipeline that requires draw.io → PNG conversion, and it works rather nicely :).
However, I found out the following problem. Let's consider this drawio file (zipped) : statique.zip
First I use drawio 12.5.3 locally with this command:
/opt/draw.io/drawio -x -o ~/tmp/statique-normaldrawio.png -s 3 statique.drawio
I obtain this:
(The same result can be obtain when using the latest drawio version, and even when using the online version of drawio)
Then I try again with your docker image (which also uses 12.5.3) like this:
docker run --rm --entrypoint="" -v "$PWD:/workdir" -w /workdir u4da3/builder-drawio /usr/bin/env xvfb-maybe drawio --no-sandbox drawio -x -o statique-builder.png -s 3 statique.drawio
And I obtain this as a result :
As you can see, all the text strangely does not have the same size!
Do you have any clue? How can this be different, since the exact same version of drawio is used in both cases?
Cheers