How to prevent different browsers rendering fonts differently?

前端 未结 3 680
半阙折子戏
半阙折子戏 2020-12-03 10:52

I have an issue with trying to maintain a constant font style across all browsers. As seen below, safari\'s font rendering system makes the font weight smaller than the font

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 11:32

    The previous comment helped me a lot, thank you. I managed this way in wordpress and it works. Put this code with your font "YOUR-FONT" in to your CSS.

    @font-face {
        font-family: 'Conthrax';
        src: url('/wp-content/uploads/fonts/conthrax-sb.eot');
        src: url('/wp-content/uploads/fonts/conthrax-sb.eot') format('embedded-opentype'),
        url('/wp-content/uploads/fonts/conthrax-sb-webfont.wofff') format('woff'),
        url('/wp-content/uploads/fonts/conthrax-sb.ttf') format('truetype');
        font-weight: normal;
        font-style: normal; 
    }
    

提交回复
热议问题