@font-face for custom fonts, fonts not smooth in Chrome

前端 未结 7 657
谎友^
谎友^ 2021-02-01 21:08

I have a web application that is using CSS3\'s @font-face to embed custom fonts. So far this has works perfectly in IE and Firefox.

With Chrome, however, the custom fo

7条回答
  •  难免孤独
    2021-02-01 21:35

    For me, best worked:

    @font-face {
        font-family: MyFont;
        src: url("MyFont.ttf") format('truetype');
    }
    
    h1 {
        font-family: MyFont;
        -webkit-text-stroke: 0.5pt;
        -webkit-font-smoothing: antialiased;
    }
    

提交回复
热议问题