webfont 8.1.3 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +144 -125
- package/LICENSE +1 -1
- package/README.md +64 -159
- package/dist/cli.js +44 -39
- package/dist/index.js +4 -4
- package/dist/standalone.js +183 -231
- package/package.json +82 -61
- package/templates/template.css.njk +112 -54
- package/templates/template.html.njk +132 -64
- package/templates/template.scss.njk +115 -56
|
@@ -1,85 +1,144 @@
|
|
|
1
|
-
{% for glyph in glyphs
|
|
2
|
-
|
|
1
|
+
{% for glyph in glyphs%}
|
|
2
|
+
${{ className }}-{{ glyph.name }}: "\{{ glyph.unicode[0].charCodeAt(0).toString(16) }}";
|
|
3
3
|
{% endfor %}
|
|
4
|
+
|
|
4
5
|
@font-face {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
6
|
+
font-family: "{{ fontName }}";
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-display: auto;
|
|
10
|
+
{% if formats.indexOf('eot')>-1 -%}
|
|
11
|
+
src: url("{{ fontPath }}{{ fontName }}.eot");
|
|
12
|
+
{%- endif -%}
|
|
13
|
+
{%- set eotIndex = formats.indexOf('eot') -%}
|
|
14
|
+
{%- set woff2Index = formats.indexOf('woff2') -%}
|
|
15
|
+
{%- set woffIndex = formats.indexOf('woff') -%}
|
|
16
|
+
{%- set ttfIndex = formats.indexOf('ttf') -%}
|
|
17
|
+
{%- set svgIndex = formats.indexOf('svg') %}
|
|
18
|
+
src: {% if eotIndex != -1 -%}
|
|
19
|
+
url("{{ fontPath }}{{ fontName }}.eot?#iefix") format("embedded-opentype")
|
|
20
|
+
{%- set nothing = formats.splice(eotIndex, 1) -%}
|
|
21
|
+
{%- if formats.length != 0 -%}, {% else -%}; {% endif -%}
|
|
22
|
+
{%- endif -%}
|
|
23
|
+
{%- if woff2Index != -1 -%}
|
|
24
|
+
url("{{ fontPath }}{{ fontName }}.woff2") format("woff2")
|
|
25
|
+
{%- set nothing = formats.splice(woff2Index, 1) -%}
|
|
26
|
+
{%- if formats.length != 0 -%}, {% else -%}; {% endif -%}
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{%- if woffIndex != -1 -%}
|
|
29
|
+
url("{{ fontPath }}{{ fontName }}.woff") format("woff")
|
|
30
|
+
{%- set nothing = formats.splice(woffIndex, 1) -%}
|
|
31
|
+
{%- if formats.length != 0 -%}, {% else -%}; {% endif -%}
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
{%- if ttfIndex != -1 -%}
|
|
34
|
+
url("{{ fontPath }}{{ fontName }}.ttf") format("truetype")
|
|
35
|
+
{%- set nothing = formats.splice(ttfIndex, 1) -%}
|
|
36
|
+
{%- if formats.length != 0 -%}, {% else -%}; {% endif -%}
|
|
37
|
+
{%- endif -%}
|
|
38
|
+
{%- if svgIndex != -1 -%}
|
|
39
|
+
url("{{ fontPath }}{{ fontName }}.svg#{{ fontName }}") format("svg");
|
|
40
|
+
{%- endif %}
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
%{{ className }} {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
display: inline-block;
|
|
45
|
+
font-family: "{{ fontName }}";
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-variant: normal;
|
|
49
|
+
text-rendering: auto;
|
|
50
|
+
line-height: 1;
|
|
51
|
+
-moz-osx-font-smoothing: grayscale;
|
|
52
|
+
-webkit-font-smoothing: antialiased;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
.{{ className }} {
|
|
52
|
-
|
|
56
|
+
@extend %{{ className }};
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
.{{ className }}-lg {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
font-size: 1.33333em;
|
|
61
|
+
line-height: 0.75em;
|
|
62
|
+
vertical-align: -0.0667em;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.{{ className }}-xs {
|
|
66
|
+
font-size: 0.75em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.{{ className }}-sm {
|
|
70
|
+
font-size: 0.875em;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.{{ className }}-1x {
|
|
74
|
+
font-size: 1em;
|
|
59
75
|
}
|
|
60
76
|
|
|
61
77
|
.{{ className }}-2x {
|
|
62
|
-
|
|
78
|
+
font-size: 2em;
|
|
63
79
|
}
|
|
64
80
|
|
|
65
81
|
.{{ className }}-3x {
|
|
66
|
-
|
|
82
|
+
font-size: 3em;
|
|
67
83
|
}
|
|
68
84
|
|
|
69
85
|
.{{ className }}-4x {
|
|
70
|
-
|
|
86
|
+
font-size: 4em;
|
|
71
87
|
}
|
|
72
88
|
|
|
73
89
|
.{{ className }}-5x {
|
|
74
|
-
|
|
90
|
+
font-size: 5em;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.{{ className }}-6x {
|
|
94
|
+
font-size: 6em;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.{{ className }}-7x {
|
|
98
|
+
font-size: 7em;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.{{ className }}-8x {
|
|
102
|
+
font-size: 8em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.{{ className }}-9x {
|
|
106
|
+
font-size: 9em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.{{ className }}-10x {
|
|
110
|
+
font-size: 10em;
|
|
75
111
|
}
|
|
76
112
|
|
|
77
113
|
.{{ className }}-fw {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
114
|
+
text-align: center;
|
|
115
|
+
width: 1.25em;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.{{ className }}-border {
|
|
119
|
+
border: solid 0.08em #eee;
|
|
120
|
+
border-radius: 0.1em;
|
|
121
|
+
padding: 0.2em 0.25em 0.15em;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.{{ className }}-pull-left {
|
|
125
|
+
float: left;
|
|
126
|
+
}
|
|
82
127
|
|
|
128
|
+
.{{ className }}-pull-right {
|
|
129
|
+
float: right;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.{{ className }}.{{ className }}-pull-left {
|
|
133
|
+
margin-right: 0.3em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.{{ className }}.{{ className }}-pull-right {
|
|
137
|
+
margin-left: 0.3em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
{% for glyph in glyphs %}
|
|
83
141
|
.{{ className }}-{{ glyph.name }}::before {
|
|
84
142
|
content: "\{{ glyph.unicode[0].charCodeAt(0).toString(16) }}";
|
|
85
|
-
}
|
|
143
|
+
}
|
|
144
|
+
{% endfor %}
|