Custom Font Node app
Hi! I need to use a font in my node app (for canvas). I have the TTF but I can't use it.
How can i do this?
32 Replies
Project ID:
1aa4380a-1423-4392-a56a-2d49595fe43e
have a look at this example project https://github.com/brody192/node-canvas-fonts
I don't know what exactly your project needs to get and and running but start by copying over the railway.json file from my repo to yours, then let me know if you are able to use fonts
idk why, but registerFont() crased before.. now it's working, thanks! π
awsome!
quick other question >
sure!
If I want to proxy other domains to a railway deployment, it's not gonna work unless I manually assign the domain to the deployment right?
can you provide some context for this question?
Yeah so
my proxy deployment on railway has abc.com assigned (example)
on def.com I add a CNAME to abc.com
Then I get a railway page saying nothing's here
what do you mean by proxy deployment?
I run a proxy service on railway that redirects to my react pod
abc.com goes to that proxy, and that forwards it to my react
it just redirects? thats all it does?
basically
the point is that I don't wanna assign 100 domain names in railway, but just add a cname to those domains
then you have two options, add the domains since there is no limit, or use host masking
host masking isn't an option because some things in react depend on the host π
railways router uses the host to route the incoming traffic to your app, but if you try to access your app from a host that isnt a part of the service then railway will just return 404
yeah so i'd either need to request a dedicated IP or use another service for this part
railway does not have dedicated ips
then there's only 1 option left π¦
can you tell me why you have 100 domains?
well probably a few thousand
but i want to offer a white label feature for my application where people assign their own domain
if you dont mind me asking, a few thousand domains for what?
they're not my domains π
clients domains?
yes
are you on the pro plan?
not yet
but it depends a bit, i am exploring railway
okay cool, was just about to say a project with a few thousand clients isnt a hobby use case lol
running a staging and "prod" which is essentially both staging π
you could run your own edge router as a cloudflare worker?
would have to look into that, but sounds like overcomplicating stuff
true