Home > front end >  How to fix font render bold chrome?
How to fix font render bold chrome?

Time:10-03

I'm having problem with font rendering on chrome:

enter image description here

CSS:

@font-face {
    font-family: "Roboto-Bold";
    font-display: auto;
    font-weight: normal;
    font-style: normal;
    src: url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.woff2') format('woff2'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.woff') format('woff'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.ttf') format('truetype'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.eot') format('embedded-opentype');
}
.test {
    color: #222;
    font: normal 15px/normal Roboto-Bold;
    line-height: 18px;
    min-width: 90% !important;
}
<a href="#" title="" claas="test">Font error with scroll in chrome!</a>

CodePudding user response:

Your Code : font-family: "Roboto-Bold";

Solution : font-family: "Roboto";

Try using a normal roboto instead of the bold one because Roboto-Bold by default loads bold font weight.

CodePudding user response:

NOTE:- Your Mistake Class spelling

@font-face {
    font-family: "Roboto-Bold";
    font-display: auto;
    font-weight: normal;
    font-style: normal;
    src: url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.woff2') format('woff2'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.woff') format('woff'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.ttf') format('truetype'), url('https://static.mediacdn.vn/tuoitre/web_font/Roboto-Bold.eot') format('embedded-opentype');
}
.test {
    color: #222;
    font: normal 15px/normal Roboto-Bold;
    line-height: 18px;
    min-width: 90% !important;
}
<a href="#" title="" >Font error with scroll in chrome!</a>

CodePudding user response:

Try This:

<a href="#" title="" >Font error with scroll in chrome!</a>
  • Related