Is there any way to add custom fonts ( some fancy fonts) to linux container ? so ican use them to write on images.
Information on your n8n setup
n8n version: latest
Database you’re using (default: SQLite): default
- Running n8n with the execution process [own(default), main]:
Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker - linux server
Oddly enough I was chatting to @harshil1712 about this the other day. In my testing I found that you can map your OS font folder to the docker container by adding the below to the volumes.
If you install the fonts on your server or pop them in a folder somewhere you can just map it to the container path of
/usr/share/fonts/truetype/host and give the container a bounce and they should appear.
Haven’t tested that day. I was the one who asked about using Custom Fonts during office hours.
Glad it’s helping someone in here.
Ah you was indeed the good thing with docker is that ability to pass folders into the container.
Worked like a charm. If some one needs help adding single fonts to their server this is how you do it:
- cd into /usr/share/fonts/truetype and make a new folder mkdir “NewFont”
- download the font to your local computer
- upload it like this:
scp -r -i /location-of-private-key /location-of-folder [email protected]:/usr/share/fonts/truetype/NewFont
Don’t forget to update docker-compose.yml with - /usr/share/fonts/truetype/:/usr/share/fonts/truetype/host/ under volumes.
I tried adding emojis with this Apple Emoji .ttf but couldn’t get it to work. Anyone else have a solution to this?