What kind of fonts does Railway have?

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.
mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.

mogrify: unable to read font `Arial Bold' @ warning/annotate.c/RenderType/1024.

mogrify: unable to read font `Arial Bold' @ error/annotate.c/RenderFreetype/1654.
I'm doing some image manipulation and it doesn't have Arial bold? Yet, doing railway run fc-list :family | grep Arial it shows it right there.
Solution:
wouldnt it be possible for you to simply include the font file in your repo? and have your code load the font from that set location?
Jump to solution
17 Replies
Percy
Percy•2mo ago
Project ID: dfec217a-7ab4-45ca-884f-2b630c39e9d4
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Project ID: dfec217a-7ab4-45ca-884f-2b630c39e9d4
ThallesComH
ThallesComH•2mo ago
tbh i've no idea but you can create a Dockerfile and add any font you want
jeremy
jeremy•2mo ago
Isn't it because railway run runs locally on your machine. So when you do that, fc-list returns what you have on your computer, but that's not what is hosted on railway (https://docs.railway.app/guides/cli#local-development)
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Oh what? I've been using railway run rails c to access the data on production. This is news to me. Hmmm.
ThallesComH
ThallesComH•2mo ago
railway run also copies your environment variables so you might be connecting to your production database in your machine
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Any hints on how to create a dockerfile with the fonts for railway? I'm so noob with how to do that or is there like a nixPkg that can help install some defaults?
ThallesComH
ThallesComH•2mo ago
there's probably a ubuntu package that includes those fonts, so there's no need for a Dockerfile, i'll cc @Brody here because he knows how to use nixpacks config files to install custom ubuntu packages
ThallesComH
ThallesComH•2mo ago
but you can always read the documentation https://nixpacks.com/docs/configuration/file
Configuration File Reference | Nixpacks
App source + Nix packages + Docker = Image
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Thanks @ThallesComH @jeremy for the help this morning! And calling on @Brody , I think he is tired of helping me these days hahaha.
Brody
Brody•2mo ago
If I was tired of helping I wouldn't have taken a job at Railway do you think you could provide a minimal reproducible example?
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Not really, any font is OK at this point, I just don't know how to check what fonts are installed with the defaults on railway.
[phases.setup]
nixpkgsArchive = 'a459b363de387c078080b719b30c54d8a79b4a3e'
nixPkgs = ['...', 'ffmpeg', 'noto-fonts']
[phases.setup]
nixpkgsArchive = 'a459b363de387c078080b719b30c54d8a79b4a3e'
nixPkgs = ['...', 'ffmpeg', 'noto-fonts']
I have this in my nixpacks.toml, but it seems like the fonts are not installed? Or i'm not sure where to find them or whether i'm refering the right name because I can't do a ls on railway since I can't ssh and see what's on there (or at least I don't know how).
Solution
Brody
Brody•2mo ago
wouldnt it be possible for you to simply include the font file in your repo? and have your code load the font from that set location?
Donald Lee (312477)
Donald Lee (312477)•2mo ago
Hm. Good idea. Like what you did here: https://github.com/railwayapp/docs/tree/main/public/fonts I'm guessing?
GitHub
docs/public/fonts at main · railwayapp/docs
Railway documentation. Contribute to railwayapp/docs development by creating an account on GitHub.
Brody
Brody•2mo ago
yeah or here - https://github.com/brody192/node-canvas-fonts/tree/main/fonts you might need fontconfig as an apt package
Want results from more Discord servers?
Add your server