need-another-word / aportholewithaview

this is me slowly learning how to develop wordpress
0 stars 0 forks source link

So, er, the typeface is not the font I want... #1

Closed need-another-word closed 8 years ago

need-another-word commented 8 years ago

So far I have downloaded a font from font squirrel,

then uploaded it to my hosting via cpanel

then taken the css code included in the download from font squirrel

and uploaded it to my wordpress child theme css style sheet.

I have tinkered and tweaked it, moved it around, all to no avail all I get is:

(index):407 GET http://aportholewithaview.com/wp-content/themes/iconic-one-child/public_htm…w.com/wp-content/themes/iconic-one-child/fonts/ankecallig-fg-webfont.woff2

when i go to chromes dev tools and then the console.

I have run out of ideas what to do or what might be wrong.

There are two things which might make a difference:

  1. I have uploaded no html to my php header at the moment, I tried that and nothing changed.
  2. Previously I installed (on this domain) another wordpress blog from mojo market place which seemed to take control of my hosting account and over write everything there. This leads me to believe that the file path way may be incorrect. I have tried a few different file path ways but as of yet nothing works.

Any ideas?

need-another-word commented 8 years ago

so this sorted things out:

You are loading your fonts relative to the location of the css file. Right now, what the browser tries to download looks like this: http://aportholewithaview.com/wp-content/themes/iconic-one-child/public_html/aportholewithaview.com/wp-content/themes/iconic-one-child/fonts/ankecallig-fg-webfont.woff Try shortening all those @font-face urls to just: src: url(fonts/ankecallig-fg-webfont.***); That should do the trick.