[Improvement] Support local font file (#408)

This commit is contained in:
neverland
2017-12-11 15:38:01 +08:00
committed by GitHub
parent 92d513d2eb
commit 6b7740b742
8 changed files with 71 additions and 17 deletions

View File

@@ -0,0 +1,8 @@
module.exports = (fontName, hash) => {
return `@font-face {
font-style: normal;
font-weight: normal;
font-family: '${fontName}';
src: url('./${fontName}-${hash}.ttf') format('truetype');
}`;
};