What kind of fonts does Railway have?

royalgiantHOBBY

a year 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

a year ago

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


a year ago

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


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

a year ago

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


royalgiantHOBBY

a year ago

This is news to me. Hmmm.


a year ago

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


royalgiantHOBBY

a year 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?


a year 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


a year ago

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


royalgiantHOBBY

a year ago

Thanks @ThallesComH @jeremy for the help this morning!

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


10 months ago

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


10 months ago

do you think you could provide a minimal reproducible example?


royalgiantHOBBY

10 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

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


10 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

10 months ago

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

I'm guessing?


10 months ago

yeah or here -


10 months ago

you might need fontconfig as an apt package


royalgiantHOBBY

10 months ago

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


10 months ago

awsome!


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