Using LXGW WenKai in site pages

Original link: https://hsiaofeng.com/archives/224.html

LXGW WenKai (LXGW WenKai) is an open source Chinese font, derived from the font Klee One produced by FONTWORKS. This font was supplemented by LXGW from Klee.

This article is a simple guide on how to use Xiadou Wenkai in web pages, blogs, and sites.

视觉图

Chawye Hsu made lxgw-wenkai-webfont for web. The method of use is the same as adding web fonts such as Google Font. First, import the Web Font CSS style, and then set the font in your own style sheet.

First, import the font CSS at an appropriate position in the <head> tag of the web page. Use the second line if you wish to use the optimized version for screen reading. The first line is the original font file. One of the two can be imported.

 <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/lxgw-wenkai-webfont/1.6.0/style.min.css" /> <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/lxgw-wenkai-screen-webfont/1.7.0/style.min.css" />

Next, set the font in your CSS. This sets a different font name depending on which version of the font was imported above. Again, choose one of the two.

 body { /* 原版*/ font-family: "LXGW WenKai", sans-serif; /* 屏幕优化版*/ font-family: "LXGW WenKai Screen", sans-serif; }

Clear your browser cache to see the effect.

This article is transferred from: https://hsiaofeng.com/archives/224.html
This site is only for collection, and the copyright belongs to the original author.