The highlighted font is different from the font.

I have a standard True Regular Type True font that I import and declare as follows:

@font-face {
  font-family: 'DINRegular';
  src: url('../fonts/DINBek-Regular.ttf')  format('truetype'), 
}

body {
    font-family: 'DINRegular', Tahoma, Geneva, sans-serif;
}

However, I do have an accordion on my site that Times New Roman always returns. The font family in the code inspector is “DINRegular,” but the font displayed on the “Calculate” tab says the font is Times New Roman. Any ideas how to fix it?

+4
source share
2 answers

there is a comma after formatting ('truetype') - deleted and added half-bell

format('truetype');

also remove quotes from the font family declaration in the body so that it

font-family: DINRegular, Tahoma, Geneva, sans-serif;

also, if your browser does not support .ttf here is an example of a more complete font declaration:

@font-face {
font-family: 'myfont';
src: url('myfont.eot');
src: url('myfont.eot?#iefix') format('embedded-opentype'),
     url('myfont.woff2') format('woff2'),
     url('myfont.woff') format('woff'),
     url('myfont.ttf') format('truetype'),
     url('myfont.svg#myfont') format('svg');
}

+2

.ttf, , .woff.eot .otf. , .ttf Font Squirrel Webfont generator.

, , , .

0

All Articles