I want to include Chinese characters in my output. How to add a font when I build the binder link?
That depends on how you want to install the font. You might want an apt.txt
if itâs an apt package. How are you producing the output with the characters?
You can see a list of available font packages on Ubuntu.
For example:
(apt.txt)
fonts-wqy-zenhei
If youâd install it manually, a postbuild
script can be used to download font packages.
But also, if itâs notebook output, fonts in the image shouldnât matter because fonts are loaded from the browser viewing the page, not the Binder container where code runs. Installing fonts in the image should only be needed if you are doing rendering in code (e.g. matplotlib figures).
Thank you for the help!
Iâm rendering a digram in code using matplotlib. It works fine in my local machine I manually downloaded the font and went through a process made it work, but not with the binder.
Is postbuild script a platform? How does it work?
postBuild
is a type of configuration file you can place in your repo or binder
directory to specify something to do after the image for the repository is built but before a session is launched using that image. See here.
Thereâs a number of examples among the sample repos. Just search âpostBuildâ on that page to have them highlighted.