From 7826c60f63d9e1405fb13879a79a2687c86c0d22 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 15 Aug 2020 10:28:08 +0800 Subject: [PATCH] feat: Support for stylus. #32 --- README.md | 2 ++ src/styles/_{{fontname}}.styl | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/styles/_{{fontname}}.styl diff --git a/README.md b/README.md index 71f60684..8e3608ca 100644 --- a/README.md +++ b/README.md @@ -459,6 +459,8 @@ svgtofont.eot svgtofont.json svgtofont.less svgtofont.module.less +svgtofont.scss +svgtofont.styl svgtofont.svg svgtofont.symbol.svg svgtofont.ttf diff --git a/src/styles/_{{fontname}}.styl b/src/styles/_{{fontname}}.styl new file mode 100644 index 00000000..02517438 --- /dev/null +++ b/src/styles/_{{fontname}}.styl @@ -0,0 +1,18 @@ +@font-face {font-family: "{{fontname}}"; + src: url('{{fontname}}.eot?t={{timestamp}}'); /* IE9*/ + src: url('{{fontname}}.eot?t={{timestamp}}#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url("{{fontname}}.woff2?t={{timestamp}}") format("woff2"), + url("{{fontname}}.woff?t={{timestamp}}") format("woff"), + url('{{fontname}}.ttf?t={{timestamp}}') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('{{fontname}}.svg?t={{timestamp}}#{{fontname}}') format('svg'); /* iOS 4.1- */ +} + +[class^="{{prefix}}-"], [class*=" {{prefix}}-"] { + font-family: '{{fontname}}' !important; + font-size:16px; + font-style:normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +{{cssString}} \ No newline at end of file