Safari font-weight issue , text too bold

前端 未结 5 2048
生来不讨喜
生来不讨喜 2020-12-29 23:48

When I apply a font-weight:bold style, the look of the font is too bold in Safari when compared to other browsers. I tried below css as suggested in some site b

5条回答
  •  星月不相逢
    2020-12-30 00:30

    None of the answers here worked for me. Possibly because I am using the windows version of Safari for testing. I had to include the bold font in my CSS to fix the problem. In the case of the original question he would need to add the following (notice it uses the same font-family name)

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

    This worked in all browsers for me.

提交回复
热议问题