diff --git a/demo/webfont.eot b/demo/webfont.eot index ced3d762..fc726b0f 100644 Binary files a/demo/webfont.eot and b/demo/webfont.eot differ diff --git a/demo/webfont.html b/demo/webfont.html index 3e4932be..d5c7d451 100644 --- a/demo/webfont.html +++ b/demo/webfont.html @@ -43,6 +43,7 @@ display: inline-block; line-height: 3em; margin-left: 5px; + white-space: nowrap; } @font-face { @@ -164,21 +165,41 @@

List Icons

-
+

Class

+
- - webfont-avatar +
+ .webfont-avatar
- - webfont-envelope +
+ .webfont-envelope
- - webfont-phone-call +
+ .webfont-phone-call +
+ +
+

Ligature

+
+ +
+ avatar
+ avatar +
+ +
+ envelope
+ envelope +
+ +
+ phone_call
+ phone_call
diff --git a/demo/webfont.svg b/demo/webfont.svg index edc157a8..b1baff2d 100644 --- a/demo/webfont.svg +++ b/demo/webfont.svg @@ -10,12 +10,21 @@ + + + diff --git a/demo/webfont.ttf b/demo/webfont.ttf index 505cb374..6999ad07 100644 Binary files a/demo/webfont.ttf and b/demo/webfont.ttf differ diff --git a/demo/webfont.woff b/demo/webfont.woff index 58fd4536..e1e7ca9c 100644 Binary files a/demo/webfont.woff and b/demo/webfont.woff differ diff --git a/demo/webfont.woff2 b/demo/webfont.woff2 index 2118a5f6..af6c0a23 100644 Binary files a/demo/webfont.woff2 and b/demo/webfont.woff2 differ diff --git a/src/__tests__/standalone.test.js b/src/__tests__/standalone.test.js index 872aeaa4..87b075fa 100644 --- a/src/__tests__/standalone.test.js +++ b/src/__tests__/standalone.test.js @@ -76,12 +76,12 @@ describe("standalone", () => { .createHash("md5") .update(result.woff2) .digest("hex"); - - expect(svgHash).toBe("ead2b6f69fc603bf1cbd00bf9f8a8a33"); - expect(ttfHash).toBe("8ffaa42f84b0835c7c250ec16e8f5d78"); - expect(eotHash).toBe("cc86496a4fd871e31a79043a7ba96a07"); - expect(woffHash).toBe("e90fb075e22ab56621e1caf13c52ef17"); - expect(woff2Hash).toBe("c71b12c10bb6576528ef1a461c166e3a"); + + expect(svgHash).toBe("5babeea3094bba0b5e2001390b0811fd"); + expect(ttfHash).toBe("dea1ee6d35ff9442f7586b60e045032f"); + expect(eotHash).toBe("9ac8e63b19c5e58ef8ee6d95684cb9b6"); + expect(woffHash).toBe("fbe22cb889122700687b51460222c3e3"); + expect(woff2Hash).toBe("439ed126cdcd5b62361b30823f6ebaa3"); }); it("should generate only `svg`, `ttf` and `eot` fonts", async () => { diff --git a/src/standalone.js b/src/standalone.js index 703ad16b..aedb78a0 100644 --- a/src/standalone.js +++ b/src/standalone.js @@ -98,6 +98,7 @@ function getGlyphsData(files, options) { return reject(error); } + metadata.unicode.push(metadata.name.replace("-", "_")); glyphData.metadata = metadata; return resolve(glyphData); diff --git a/templates/template.html.njk b/templates/template.html.njk index 7088c1ea..4298ca3f 100644 --- a/templates/template.html.njk +++ b/templates/template.html.njk @@ -43,6 +43,7 @@ display: inline-block; line-height: 3em; margin-left: 5px; + white-space: nowrap; } @font-face { @@ -185,11 +186,21 @@

List Icons

-
+

Class

+
{% for glyph in glyphs %}
- - {{ className }}-{{ glyph.name }} +
+ .{{ className }}-{{ glyph.name }} +
+ {% endfor %} +
+

Ligature

+
+ {% for glyph in glyphs %} +
+ {{ glyph.unicode[1] }}
+ {{ glyph.unicode[1] }}
{% endfor %}