.blockdiagrc is ignored when blockdiag or seqdiag is run in a Docker container

84 views
Skip to first unread message

Konstantin Molchanov

unread,
Dec 17, 2016, 1:49:16 PM12/17/16
to blockdiag-discuss
Hi!

I'm running seqdiag in a Docker container on diagrams that have some Russian text. Here's the error I get:

$ seqdiag -a tmp/diagrams/1.diag
ERROR: UnicodeEncodeError caught (check your font settings)

Setting the font manually solves the problem:

$ seqdiag -a tmp/diagrams/1.diag -f /usr/share/fonts/truetype/dinpro/DINPro-Medium.ttf

But setting the font path in ~/.blockdiagrc doesn't:

$ cat ~/.blockdiagrc
[blockdiag]
fontpath = /usr/share/fonts/truetype/dinpro/DINPro-Medium.ttf
$ grams/1.diag
ERROR: UnicodeEncodeError caught (check your font settings)

I can't use the -f method because the seqdiag command is invoked programmatically. I was planning to use .blockdiagrc, but that doesn't work, unfortunately.

The Docker image is based on Ubuntu Xenial, $HOME=/root, ~/ is properly expanded into the same location. The locale is en_US.UTF-8.

Two questions:

1. Is it an issue with blockdiag not being able to find the config file? If it is, how do I solve it?
2. How does blockdiag determine what font to use by default? Can I set the font to use globally, without setting the config file or passing it with -f?

Best regards,
Konstantin Molchanov

Konstantin Molchanov

unread,
Dec 17, 2016, 1:55:56 PM12/17/16
to blockdiag-discuss
Weirdly, even when I specify the path to the config file explicitly with -c, it still doesn't work:

$ seqdiag -a tmp/diagrams/1.diag -c ~/.blockdiagrc

ERROR: UnicodeEncodeError caught (check your font settings)

Moving the file to the workdir and specifying the path with -c also doesn't work.

Konstantin Molchanov

unread,
Dec 17, 2016, 2:58:33 PM12/17/16
to blockdiag-discuss
Issue solved. I was looking into the wrong documentation section, my bad. Clearly, since I'm calling seqdiag, the config section should've been called [seqdiag], not [blockdiag].


On Saturday, 17 December 2016 22:49:16 UTC+4, Konstantin Molchanov wrote:
Reply all
Reply to author
Forward
0 new messages