How do I load external fonts into an HTML document?

后端 未结 8 1027
我在风中等你
我在风中等你 2020-12-04 15:41

How do I load external font files into an HTML document.

Example: Make the text \"blah blah blah blah blah blah blah\" a custom font from a TTF file in the same dir

8条回答
  •  忘掉有多难
    2020-12-04 16:04

    If you want to support more browsers than the CSS3 fancy, you can look at the open source library cufon javascript library

    And here is the API, if you want to do more funky stuff.

    Major Pro: Allows you to do what you want / need.

    Major Con: Disallows text selection in some browsers, so use is appropiate on header texts (but you can use it in all your site if you want)

提交回复
热议问题