sindhugauri sindhugauri - 2 months ago 18
CSS Question

Make Bootstrap use downloaded Google Font

I downloaded the Google Font Poiret One and want to use it with Bootstrap. However, that's not been working out well so far. It looks like Comic Sans.

<link rel="stylesheet" href="fonts/PoiretOneregular.ttf">


This is what I'm using to refer to the font. Name of the file is correct.

font-family: 'Poiret One', cursive;


This is the CSS portion.

What am I doing wrong?

Answer

You are attemping to link to a .ttf font file with a stylesheet link, which to my knowledge isn't possible. You could always try using the CDN instead

<link href="https://fonts.googleapis.com/css?family=Poiret+One" rel="stylesheet">

If you want to use the font that you've downloaded locally, take a look at: How do I load external fonts into an HTML document?

Comments