What kind of fonts does Railway have?

royalgiantHOBBY

9 months ago

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.

0 Replies

royalgiantHOBBY

9 months ago

Project ID: dfec217a-7ab4-45ca-884f-2b630c39e9d4


9 months ago

tbh i've no idea but you can create a Dockerfile and add any font you want


9 months 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)


royalgiantHOBBY

9 months ago

Oh what? I've been using railway run rails c to access the data on production.


royalgiantHOBBY

9 months ago

This is news to me. Hmmm.


9 months ago

railway run also copies your environment variables so you might be connecting to your production database in your machine


royalgiantHOBBY

9 months 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?


9 months 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


9 months ago

but you can always read the documentation
https://nixpacks.com/docs/configuration/file


royalgiantHOBBY

9 months ago

Thanks @ThallesComH @jeremy for the help this morning!

And calling on @Brody , I think he is tired of helping me these days hahaha.


9 months ago

If I was tired of helping I wouldn't have taken a job at Railway


9 months ago

do you think you could provide a minimal reproducible example?


royalgiantHOBBY

9 months 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.


royalgiantHOBBY

9 months ago

[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).


9 months 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?


royalgiantHOBBY

9 months ago

Hm. Good idea. Like what you did here: https://github.com/railwayapp/docs/tree/main/public/fonts

I'm guessing?


9 months ago

yeah or here -


9 months ago

you might need fontconfig as an apt package


royalgiantHOBBY

9 months ago

That fixed it, thanks for the 💡 idea @Brody !


9 months ago

awsome!


What kind of fonts does Railway have? - Railway Help Station