Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Foundations Web Typography Web Fonts

Helloyellow Yellowhello
Helloyellow Yellowhello
3,800 Points

HI why does the @font-face does not render in chrome ?

i downloaded the project file and i opened the index.html file and the 'DroidSerifBold' does not render in chrome or IE for some weird reason.... can anyone help thanks :)

3 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi karam,

What is the code you're using to include the font on your page?

Helloyellow Yellowhello
Helloyellow Yellowhello
3,800 Points

i just used the code that was provided by tree house in the web fonts css foundations part, i just downloaded the project file , but the fonts don't render in chrome

@font-face {
    font-weight: bold;
    font-style: normal;
    font-family: 'DroidSerifBold';
    src: url('fonts/DroidSerif-Bold-webfont.eot');
    src: url('fonts/DroidSerif-Bold-webfont.eot?#iefix') format('embedded-opentype'),
         url('fonts/DroidSerif-Bold-webfont.woff') format('woff'),
         url('fonts/fonts/DroidSerif-Bold-webfont.ttf') format('truetype'),
         url('fonts/DroidSerif-Bold-webfont.svg#DroidSerifBold') format('svg');
} 

h2 {
    margin: 1.25em 0 0 0;
    color: #2B9BD4;
    letter-spacing: -2px;
    font-size: 2em;
    font-family: 'DroidSerifBold', Georgia, serif;
    line-height: 1.1;
}

maybe something is wrong with my browser ? even google fonts don't render either.....i'm confused

Did you figure it out? Are your fonts in the correct folder?

Helloyellow Yellowhello
Helloyellow Yellowhello
3,800 Points

No i havent yet :(....the fonts are in the right folder called fonts