Skip to content
跨平台 CSS 中文字体解决方案
Branch: master
Clone or download
Latest commit b0fda1d Mar 11, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist v2 (#37) Mar 11, 2018
src v2 (#37) Mar 11, 2018
.gitignore publish to npm, fixes #30 Nov 9, 2015
.npmignore
README.md Update README.md Mar 11, 2018
bower.json update bower.json Mar 11, 2018
index.html v2 (#37) Mar 11, 2018
package-lock.json v2 (#37) Mar 11, 2018
package.json v2 (#37) Mar 11, 2018
tsconfig.json v2 (#37) Mar 11, 2018
tsconfig.vue.json v2 (#37) Mar 11, 2018
webpack.config.js v2 (#37) Mar 11, 2018

README.md

Fonts.css -- 跨平台中文字体解决方案

一直以来跨平台的中文字体 CSS 设置都是一件让人很头疼的事情,这个库打包了一些常见字体的名字,希望能覆盖 Windows、Mac 以及 Linux 的常见字体,方便引用。在 font-family 直接支持宋、楷、黑和仿宋之前,我觉得这样一种解决方案依然还是有其存在价值的。

Demo & Doc

https://zenozeng.github.io/fonts.css/

NPM

npm install fonts.css --save

Usage

<head>
    <link rel="stylesheet" type="text/css" href="fonts.css" />
</head>
<body>
    <p class="font-kai">
        故天将降大任于是人也必先苦其心智劳其筋骨饿其体肤空乏其身行弗乱其所为所以动心忍性曾益其所不能
    </p>
</body>

Contributors

License

Copyright (C) 2013-2018 Zeno Zeng and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Footnote

You can’t perform that action at this time.