#Font imports not work

41 messages · Page 1 of 1 (latest)

grim pendant
#

I tried to import the font I downloaded manually to my css but it's not showing on my browser when I view it. I don't know what am doing wrong can someone help?

Below is my code

**@font-face {
src: url("Ansia.ttf");
font-family: Ansia;
}

h1 {
font-family: Ansia;
}
**

spice python
#

maybe put the font-family in quotes:

font-family: "Ansia";

#

If that's not it try the network tab of your dev tools to see if you're getting an error when attempting to download the .ttf file.

grim pendant
#

Alright. I'll try it now

#

I've added the font-family in quote but it's not working

spice python
#

and the network tab?

grim pendant
#

how do I find it?

spice python
#

do you know how to open dev tools?

grim pendant
#

yeah

spice python
#

k, then go to the "Network" tab

grim pendant
spice python
#

ok, reload your page and you'll see a listing of everything the page tries to download including your font file...

grim pendant
#

ok

spice python
#

if you see a 404 or some other error in the satus column you have a problem...

grim pendant
spice python
#

don't record... just reload your page

grim pendant
#

this is what I see

#

I reloaded and this is what is showing

spice python
#

ok, I don't see the ttf try scrolling up in the list

grim pendant
#

What do I do now?

spice python
#

can you show a screen shot of where the ttf file is listed?

grim pendant
#

Can you try use same code on your to know if it works?

#

Alright

spice python
#

I don't have your font so...

grim pendant
spice python
#

you misunderstand, I need to see the entry in your network tab where it's trying to download the ansia.ttf file... the scrrenshot you sent has it scrolled off the top of the screen...

grim pendant
#

Ok..let me get it

#

The font is not showing

spice python
#

Right ok so that's a problem... let's dig a little deeper

grim pendant
#

ok

spice python
#

Are you sure you're referencing your css in your html?

#

it's not downloading your .css either...

grim pendant
#

I think that could be the issue. It's not there😢

spice python
#

it's not in your html?

#

if not then that's the problem...

grim pendant
#

Yeah. I forgot to add it.

#

Sorry for the stress

#

It's working now

#

Thank you for your assistance I really appreciate