Using Fonts types on Glitch

Im trying to edit an image and put some text on it, Im ok with the code, but I want an especific font type and I dont know how to upload it to Glitch, if I go to New File -> Upload File, it goes to assets, how can I use it later on the code? I dont really know how to use that url from assets.

Hey @Zoilken! One solution to this issue is to use the @font-face rule in CSS. This is what I tested in one of my projects:

@font-face {
  font-family: 'MyWebFont'; /* This is an arbitrary name -- whatever works for you */
  src: url('your-glitch-cdn-path');
       url('your-glitch-cdn-path') format('ttf'),

body {
  font-family: 'MyWebFont', sans-serif;

Define the @font-face rule at the very top of your stylesheet, and then you can reference the font using whatever you named it in the font-family field of the @font-face rule. Insert the url that you got from assets where I have 'your-glitch-cdn-path', make sure the type (here, I have a .ttf because that’s what I downloaded) matches – and away you go!

I got this from here if you want to read more:

What I wrote out above is just a simpler version of what I found in the article – they have a lot more explanation, and also backwards (and forwards!) compatible code.

A post was merged into an existing topic: Cannot upload GLTF/GLB to assets/project?