What fonts are installed by default?


#1

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


#2

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.


#3

But I just rendered text in Courier and it worked?


#4

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.


#5

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.


#6

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


#7

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?


#8

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


#9

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


#10

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


#11

Just tried wont work


#12

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