Safari font rendering issues

前端 未结 8 814
独厮守ぢ
独厮守ぢ 2020-12-09 02:12

As you can see below, the Texta-Light font in Chrome appears completely different with Safari. Chrome displays the font as I like but Safari\'s rendering on OS X and iOS loo

8条回答
  •  暖寄归人
    2020-12-09 02:31

    If, as per your comment, you are only serving .otf, you will need to serve the other file types too.

    This could be causing an issue to do with iOs as until iOs 4.2, SVG was the only format to use custom fonts on the ipad or iphone.

    @font-face {
      font-family: 'MyWebFont';
      src: url('webfont.eot'); /* IE9 Compat Modes */
      src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
           url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
           url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
           url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
           url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
    }
    

    A great tool to use is Font Squirrel's Webfont Generator

    Edit: Also as mentioned in the comments the font-weight is set to bold by default and you are loading a light font.

提交回复
热议问题