What fonts are installed by default?

How can I see list of all fonts that I can use without installing? (on the glitch servers)

There are no fonts hosted on the Glitch servers. If you want to use custom fonts then you want to use a third-party service like https://fonts.google.com in your projects.

But I just rendered text in Courier and it worked?

Everyone’s computer has a number of fonts installed on them. They differ from machine to machine, but some fonts like courier, Arial, times new roman are standard. These are loaded on the client side in the browser, not from Glitch’s servers. If you use more exotic fonts, it’s likely they won’t already be installed on a person’s computer and so you use a service like Google Fonts to install them in the browser instead when someone visits your app or website.

I am using the text2png module.

It works fine on glitch, even though apparently glitch servers don’t have any fonts installed?

Does it have its own folder of fonts then?

Which fonts will I be able to use this library with without installing any of my own.

Text2png uses node-canvas which uses system fonts by default.

You can however use registerfont() to add your own, which you will need to upload to assets in your project. See https://github.com/tkrkt/text2png/issues/1

So, if node-canvas is using system fonts, and both Courier and the default (assuming Ariel/Helvetica) worked, then surely the system (i.e. Glitch’s servers) must have some fonts installed?

Yes, you can use fc-list from the command line

We cant upload fonts ,i.e, .ttf files on glitch
It goes in asseet

You can use wget from the console to import it into your project.

Just tried wont work

You’ll need to be more specific as it does work. What problem or error did you encounter?

Hi @Gareth,

I have tried your suggestion (wget)

It seems doing wget ${URL} installs the font for me.
However, I don’t know how to access the installed font. It’d be greatly appreciated if you can shed some light on me ^^

Steps I’ve taken:

  1. First, uploaded the .ttf font to my project’s assets
  2. then I wrote wget --help to see the list of available commands. I skimmed through all of them, but except for installing with a url, I didn’t understand how to access it
  3. then I copied the url of the .ttf file and did wget ${url} in console
  4. I got the successfully installed message with only URL in console.

Edit: never mind, URL was the font link

Never mind, the URL was the font. I thought it was a unique directory.

I still got the error after getting the URL, but turns out my partner was throwing another error. I blame it on him.

Sorry for bothering you @Gareth.
Thanks for your time