Dnyaneshwar Shedge
Dnyaneshwar Shedge

Reputation: 51

custom @font-face does not load in chrome (chrome custom fonts not rendering)

custom @font-face does not load in chrome(chrome custom fonts not rendering) Using custom fonts using CSS

@font-face {
    font-family:'gotham-rounded-medium';
    src:url('fonts/gothumrounded_medium/gotham-rounded-medium.eot');
    src:url('fonts/gothumrounded_medium/gotham-rounded-medium.eot?#iefix')format("embedded-opentype"),
        url('fonts/gothumrounded_medium/gotham-rounded-medium.woff')format("woff"),
        url('fonts/gothumrounded_medium/gotham-rounded-medium.ttf')format("truetype"),
        url('fonts/gothumrounded_medium/gotham-rounded-medium.svg')format("svg");
    font-weight:400;
    font-style:normal
}

.custom_font{
   font-family:'gotham-rounded-medium', arial, sans-serif;
}

enter image description here

The texts are showing only when you resize the screen window.

So please is there something that it can be done to solve this issue?

Upvotes: 5

Views: 4398

Answers (2)

Jason Awbrey
Jason Awbrey

Reputation: 919

Looks like this is getting fixed in Chrome 59 if it is the same bug as listed here: https://bugs.chromium.org/p/chromium/issues/detail?id=602968

Also - it's probably a better practice to only include font-face declarations once. We solved the issue by refactoring our CSS architecture and only including font-faces once.

Upvotes: 0

marekozw
marekozw

Reputation: 356

In my case the problem was connected with multiple inclusion of the same @font-face made by different Angular 2 modules. Please see:

https://bugs.chromium.org/p/chromium/issues/detail?id=582198#c20

Upvotes: 4

Related Questions