@font-face svg not working properly in Chrome?

前端 未结 5 1803
深忆病人
深忆病人 2020-12-13 01:01

I have an issue with a specific font and the way it\'s rendered in Chrome.

Firefox shows the font properly due to using ttf.

Chrome doesn\'t use antialias a

5条回答
  •  一生所求
    2020-12-13 01:46

    try this @font-face implementation

    @font-face {
        font-family: 'OpenSans';
        src: url('fonts/OpenSans-Regular-webfont.eot');
        src: url('fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
             url('fonts/OpenSans-Regular-webfont.woff') format('woff'),
             url('fonts/OpenSans-Regular-webfont.ttf') format('truetype'),
             url('fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    
    h1 {
      font-family: 'OpenSans';
      font-weight: 300%;
    }
    

    for more information check out this example https://github.com/ttibensky/BulletProof-font-face-implementation

提交回复
热议问题