Crabzon
Crabzon

Reputation: 49

font style not changing after adding font family in css

i have an html website, i am trying to change the fontfamily of a heading, i loaded the font file which is in my server and did the following code:

font-family: 'Berton Voyage Regular',sans-serif"
<link rel="stylesheet" href="http://molugu.com/yantraev/BERTON-VOYAGE-TRIAL.TTF">   

but still the font family is not changing, can anyone please tell me how to change the font family, thanks in advance

Upvotes: 0

Views: 1537

Answers (1)

JamieCodes
JamieCodes

Reputation: 36

You need to specify the font / url within the stylesheet, not try to link it as a stylesheet itself.

For example:

stylesheet.css

@font-face {
  font-family: BertonVoyageRegular;
  src: url(http://molugu.com/yantraev/BERTON-VOYAGE-TRIAL.TTF);
}


body {
  font-family: 'BertonVoyageRegular',sans-serif;
}

Upvotes: 2

Related Questions