CSS font-size changes when font-family falls back

前端 未结 6 1993
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 10:31

I want to use a font (gill sans) which renders very small due to a short x-height etc. etc. If I set this at a reasonable size, and then a browser falls back to a more typic

6条回答
  •  再見小時候
    2020-12-14 10:54

    There was an interesting article written a few weeks ago that addresses this topic.

    You can read the article here: http://kilianvalkhof.com/2009/css-xhtml/combining-cufon-and-font-face/

    In short, the article is utilizing a few methods... @font-face for modernized browsers, a jQuery font detection script, and Cufon for font replacement if prior methods fail.

    This is not a perfect solution. And like many above me stated, your best bet is to use a font that degrades gracefully.

    Try setting your font-stacks to something like 'GillSans, Calibri, Trebuchet, sans-serif' - for paragraph copy, or 'GillSans, Trebuchet, Calibri, sans-serif' - for titles and headings

提交回复
热议问题