fontcustom 0.1.4 → 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +15 -8
- data/Rakefile +4 -6
- data/bin/fontcustom +1 -1
- data/fontcustom.gemspec +2 -7
- data/lib/fontcustom.rb +6 -21
- data/lib/fontcustom/cli.rb +46 -18
- data/lib/fontcustom/error.rb +4 -0
- data/lib/fontcustom/generator/font.rb +101 -0
- data/lib/fontcustom/generator/template.rb +80 -0
- data/lib/fontcustom/options.rb +20 -0
- data/lib/fontcustom/scripts/generate.py +22 -6
- data/lib/fontcustom/templates/_fontcustom.scss +72 -0
- data/lib/fontcustom/templates/fontcustom-ie7.css +10 -10
- data/lib/fontcustom/templates/fontcustom.css +19 -19
- data/lib/fontcustom/templates/fontcustom.html +119 -0
- data/lib/fontcustom/templates/fontcustom.yml +23 -0
- data/lib/fontcustom/util.rb +89 -0
- data/lib/fontcustom/version.rb +1 -1
- data/lib/fontcustom/watcher.rb +50 -25
- data/spec/fixtures/empty-data/.fontcustom-data +0 -0
- data/spec/fixtures/fontcustom.yml +1 -0
- data/spec/fixtures/mixed-output/.fontcustom-data +17 -0
- data/spec/fixtures/mixed-output/another-font.ttf +0 -0
- data/spec/fixtures/mixed-output/dont-delete-me.bro +0 -0
- data/spec/fixtures/mixed-output/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.eot +0 -0
- data/spec/fixtures/mixed-output/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.svg +102 -0
- data/spec/fixtures/mixed-output/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.ttf +0 -0
- data/spec/fixtures/mixed-output/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.woff +0 -0
- data/spec/fixtures/mixed-output/fontcustom.css +108 -0
- data/spec/fixtures/not-a-dir +0 -0
- data/spec/fontcustom/generator/font_spec.rb +183 -0
- data/spec/fontcustom/generator/template_spec.rb +106 -0
- data/spec/fontcustom/util_spec.rb +109 -0
- data/spec/fontcustom/watcher_spec.rb +68 -0
- data/spec/spec_helper.rb +32 -22
- metadata +47 -100
- data/lib/fontcustom/generator.rb +0 -105
- data/lib/fontcustom/templates/test.html +0 -100
- data/spec/fontcustom/fontcustom_spec.rb +0 -42
- data/spec/fontcustom/generator_spec.rb +0 -75
- data/spec/fontcustom/watcher_spec.rb.off +0 -34
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
font_name: Custom Name From Config
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"fonts": [
|
3
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.woff",
|
4
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.ttf",
|
5
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.eot",
|
6
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.svg"
|
7
|
+
],
|
8
|
+
"templates": [
|
9
|
+
"fontcustom.css"
|
10
|
+
],
|
11
|
+
"file_name": "fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e",
|
12
|
+
"glyphs": [
|
13
|
+
"a_r3ally-exotic-f1le-name",
|
14
|
+
"c",
|
15
|
+
"d"
|
16
|
+
]
|
17
|
+
}
|
Binary file
|
File without changes
|
@@ -0,0 +1,102 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3
|
+
<!--
|
4
|
+
2012-11-26: Created.
|
5
|
+
-->
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
7
|
+
<metadata>
|
8
|
+
Created by FontForge 20120731 at Mon Nov 26 10:31:22 2012
|
9
|
+
By Joshua Gross
|
10
|
+
Created by Joshua Gross with FontForge 2.0 (http://fontforge.sf.net)
|
11
|
+
</metadata>
|
12
|
+
<defs>
|
13
|
+
<font id="fontcustom" horiz-adv-x="1030" >
|
14
|
+
<font-face
|
15
|
+
font-family="Untitled1"
|
16
|
+
font-weight="500"
|
17
|
+
font-stretch="normal"
|
18
|
+
units-per-em="1000"
|
19
|
+
panose-1="2 0 6 3 0 0 0 0 0 0"
|
20
|
+
ascent="800"
|
21
|
+
descent="-200"
|
22
|
+
bbox="14.9998 -200.706 1015.35 800.108"
|
23
|
+
underline-thickness="50"
|
24
|
+
underline-position="-100"
|
25
|
+
unicode-range="U+F100-F10C"
|
26
|
+
/>
|
27
|
+
<missing-glyph />
|
28
|
+
<glyph glyph-name="uniF100" unicode="" horiz-adv-x="1028"
|
29
|
+
d="M980.576 795.03c20.3633 0 32.7266 -12.1211 32.7266 -32.6064v-597.333c0 -20.4844 -12.3633 -32.8486 -32.7266 -32.8486h-735.273l-46.5449 -86.9092c-4 -7.63574 -13.4551 -10.3027 -20.8486 -6.18164l-47.3936 25.333c-7.39453 4 -10.1826 13.334 -6.18262 20.8486
|
30
|
+
l25.0908 46.7881h-93.5752c-20.4854 0 -40.8486 12.3633 -40.8486 32.8486v597.454c0 20.4854 12.3633 32.6064 32.7275 32.6064h932.849zM217.788 774.061c-12.9697 0 -23.5156 -10.4238 -23.5156 -23.5146c0 -13.0918 10.667 -23.6367 23.5156 -23.6367
|
31
|
+
s23.5146 10.7881 23.5146 23.7578s-10.666 23.3936 -23.5146 23.3936zM153.546 774.061c-13.0918 0 -23.5156 -10.4238 -23.3945 -23.5146c0 -13.0918 10.5459 -23.6367 23.3945 -23.6367c13.0908 0 23.6357 10.7881 23.6357 23.7578s-10.5449 23.3936 -23.6357 23.3936z
|
32
|
+
M89.0605 774.061c-12.8486 0 -23.3936 -10.4238 -23.5146 -23.5146c0 -13.0918 10.666 -23.6367 23.5146 -23.6367c13.0908 0 23.6367 10.7881 23.6367 23.7578s-10.667 23.3936 -23.6367 23.3936zM951.97 178.788v0.121094h-0.242188v424h-882.788v-424.121h105.576
|
33
|
+
l57.8174 107.151l-86.1816 46.5449c-4.72754 2.4248 -7.75781 7.15234 -8 12.6064c-0.242188 5.45508 2.18164 10.4248 6.5459 13.4551l260.121 178.061c4.84863 3.27246 10.7881 4.48438 16.2422 0.726562c4.96973 -2.78711 8 -8.24219 7.63672 -13.9395l-13.2129 -311.151
|
34
|
+
c-0.121094 -5.09082 -3.03027 -10.0605 -7.63574 -12.6055c-4.72754 -2.78809 -10.3027 -2.78809 -14.9092 -0.243164l-86.3027 46.667l-36.2432 -67.2725h681.576zM951.97 640.606v56.7266h-882.788v-56.7266h882.788z" />
|
35
|
+
<glyph glyph-name="uniF101" unicode="" horiz-adv-x="1027"
|
36
|
+
d="M673.57 215.636l26.5713 -13.0371l16.6348 16.6348l166.999 -167.026l111.227 -82.7861l11.9434 -45.3789l-123.309 -124.015l-44.3682 11.9854l-83.6035 112.029l-176.714 176.714c19.9014 7.37598 38.1963 18.877 53.6406 34.3213l26.0186 26.0176l28.0381 28.0391z
|
37
|
+
M871.791 -10.8857c-28.8271 0 -52.2021 -23.375 -52.2021 -52.2021s23.375 -52.1875 52.2021 -52.1875s52.1875 23.3604 52.1875 52.1875s-23.3604 52.2021 -52.1875 52.2021zM378.392 440.995l-25.8926 -25.8799c-15.708 -15.708 -27.084 -34.0996 -34.3076 -53.6689
|
38
|
+
l-4.30469 4.30469c-22.5996 -11.3623 -45.4893 -18.1992 -66.8984 -18.1992c-118.271 0 -229.968 113.108 -231.407 231.379c0.0136719 0.457031 13.3545 13.6045 20.8838 21.1191c96.8193 -96.8477 77.8184 -86.9521 137.493 -86.9521
|
39
|
+
c46.1123 0 121.647 74.4834 121.647 121.647c0 58.1387 7.83301 42.7354 -86.9385 137.521c7.2793 7.28027 20.6484 20.8281 21.1045 20.8281c118.229 1.41211 231.365 -113.053 231.365 -231.365c0.0146484 -15.2783 -3.72266 -31.5674 -10.0879 -48.0498
|
40
|
+
l-2.85156 -2.85059l-28.6611 -28.6748l13.4932 -26.0049l-25.9619 13.5215zM984.304 697.866c36.6611 -36.6885 36.6611 -96.1553 0 -132.816l-295.316 -295.303c-5.35547 2.62988 -11.5283 3.83398 -17.8945 3.83398c-14.4199 0 -29.9062 -6.17285 -39.5664 -15.8467
|
41
|
+
c-14.0049 -13.9912 -20.6484 -40.0508 -12.0537 -57.502l-26.0176 -26.0176c-18.3516 -18.3516 -42.3896 -27.54 -66.4424 -27.54c-24.0117 0 -48.0508 9.16113 -66.374 27.498l-6.83594 6.82324l-230.176 -230.189l-23.291 -61.9863l-127.778 -89.3047l-57.5576 57.3643
|
42
|
+
l89.665 127.985l61.4736 23.25l230.3 230.272l-4.81641 4.81543c-36.6465 36.6611 -36.6465 96.1279 0.0283203 132.803l25.8652 25.8516c5.48047 -2.85156 11.833 -4.1377 18.4482 -4.1377c14.4199 0 29.9619 6.17188 39.6631 15.8867
|
43
|
+
c14.1025 14.1162 20.7871 40.6045 11.7217 58.084l295.179 295.123c18.3096 18.3506 42.3623 27.5264 66.4004 27.5264c24.0254 0 48.0645 -9.16211 66.4014 -27.499z" />
|
44
|
+
<glyph glyph-name="uniF102" unicode="" horiz-adv-x="885"
|
45
|
+
d="M755.53 57.0703l-375.351 120.27v55.3701l375.351 -121.19v359.65h114.119v-652.54h-854.189v312.87l364.72 -117.65v54.9004l-365.18 117.7v54.7402l740.53 -239.351v55.2305zM789.649 495.77h48.7803c1.06055 46.29 -35.6895 123.211 -91.0596 152.891
|
46
|
+
c1.08984 21.0703 -1.39062 47.2295 -11.0801 69.8496c-13.9805 33.8301 -50.75 55.8301 -87.5303 60.4404c-49.21 6 -77.3701 -14.6006 -102.6 -41.2402c-25.0605 -26.75 -69.8301 -21.6699 -93.5107 -7.08008c-23.6992 15.0801 -72.4697 33.2402 -116.149 -3.53027
|
47
|
+
c-43.8301 -36.1494 -58.9199 -8.59961 -102.601 1.09082c-43.3896 9.50977 -103.21 -16.6201 -103.689 -81.54c2.46973 -68.9102 71.9902 -95.5107 109.67 -79.0703c37.7002 16.6201 52.7803 40.79 99.5303 2.62012c44.3096 -36.29 102.62 -15.0703 125.38 12.6299
|
48
|
+
c21.9795 28.1504 64.7598 27.0596 90.9102 1.37012c25.6797 -26.1602 45.3691 -32.1406 81.54 -32.6201c29.6797 -0.44043 54.2793 14 73.5098 28.1602c40.1494 0.0195312 70.9102 -38.75 78.8994 -83.9707z" />
|
49
|
+
<glyph glyph-name="uniF103" unicode="" horiz-adv-x="1019"
|
50
|
+
d="M1004.39 -139.453c1.56348 -14.8223 -27.1943 -42.1133 -42.127 -42.085c-21.1602 -0.0136719 -51.6064 31.6914 -75.5352 61.502l-43.04 -43.0547c-49.1846 -49.1982 -129.273 -49.1846 -178.485 0.0283203l-167.912 167.912
|
51
|
+
c-49.2129 49.1982 -49.2402 129.286 -0.0283203 178.499l40.7432 40.7568c4.49805 70.5527 -36.0654 97.0684 -104.307 93.498l-35.373 -35.3867c-49.1709 -49.1855 -129.273 -49.2129 -178.499 0.0273438l-167.913 167.912
|
52
|
+
c-49.2119 49.2129 -49.2119 129.314 -0.0273438 178.499l44.3271 44.3281c-25.9902 22.3359 -50.9834 48.3398 -52.9492 66.9814c-1.56348 14.7949 27.2217 42.0996 42.1133 42.1133c18.9316 0 45.3096 -25.4229 67.7988 -52.1328l2.71191 2.69922
|
53
|
+
c49.1992 49.1982 129.301 49.1982 178.514 -0.0146484l167.939 -167.926c49.2129 -49.2119 49.2129 -129.301 0 -178.513l-13.9219 -13.9092c67.0791 2.25586 97.373 -34.5977 107.24 -90.5781l5.57715 5.5918c49.1992 49.1982 129.314 49.1982 178.527 -0.0146484
|
54
|
+
l167.898 -167.926c49.1982 -49.1982 49.1982 -129.286 0 -178.499l-5.49414 -5.49414c28.9521 -23.8867 60.0205 -53.9736 62.2217 -74.8154zM338.829 341.753v0l104.002 103.975c16.4131 16.3994 16.4131 43.0957 0 59.4951l-167.926 167.927
|
55
|
+
c-16.3994 16.4131 -43.1094 16.4131 -59.5088 0l-103.975 -103.989c-16.4141 -16.3994 -16.4141 -43.0957 0 -59.5088l167.898 -167.898c16.4131 -16.4131 43.0947 -16.4131 59.5088 0zM784.178 -103.596l0.0136719 -0.0273438l103.975 103.975
|
56
|
+
c16.4268 16.4268 16.4268 43.123 0 59.5225l-167.912 167.912c-16.4141 16.4414 -43.1094 16.4414 -59.5088 0.0146484l-103.989 -103.975c-16.4131 -16.4004 -16.4131 -43.082 0.0146484 -59.5234l167.898 -167.898c16.4268 -16.4131 43.0811 -16.4131 59.5088 0z" />
|
57
|
+
<glyph glyph-name="uniF104" unicode="" horiz-adv-x="544"
|
58
|
+
d="M216.39 674.99c0 -14.2305 8.58008 -26.4199 20.8301 -31.79v-37.6602h-83.3301v97.2197l83.3301 27.7803v-23.7598c-12.25 -5.37012 -20.8301 -17.5703 -20.8301 -31.79zM292.77 563.93l83.3408 -83.3301h-361.11l83.3301 83.3301h194.439zM515 661.1h-41.6699
|
59
|
+
c-7.67969 0 -13.8896 6.20996 -13.8896 13.8906c0 7.67969 6.20996 13.8896 13.8896 13.8896h41.6699c7.67969 0 13.8896 -6.20996 13.8896 -13.8896c0 -7.68066 -6.20996 -13.8906 -13.8896 -13.8906zM452.52 755.02c-5.12988 0 -10.0293 2.84082 -12.4492 7.73047
|
60
|
+
c-3.41992 6.87012 -0.600586 15.21 6.26953 18.6104l34.7305 17.1895c6.85938 3.41992 15.1895 0.580078 18.5996 -6.29004c3.38965 -6.87012 0.589844 -15.21 -6.29004 -18.6094l-34.7002 -17.1904c-1.97949 -0.979492 -4.08984 -1.44043 -6.16016 -1.44043zM487.21 549.99
|
61
|
+
c-2.08008 0 -4.16992 0.459961 -6.13965 1.43945l-34.7305 17.1904c-6.87012 3.39941 -9.68945 11.7402 -6.26953 18.6104c3.39941 6.88965 11.6992 9.69922 18.6094 6.28906l34.7002 -17.1895c6.87988 -3.40039 9.67969 -11.7402 6.29004 -18.6104
|
62
|
+
c-2.41992 -4.89941 -7.36035 -7.72949 -12.46 -7.72949zM417.77 688.88c7.68066 0 13.8906 -6.20996 13.8906 -13.8896c0 -7.68066 -6.20996 -13.8906 -13.8906 -13.8906h-104.029l94.2998 -43.9697c6.94043 -3.24023 9.9502 -11.5 6.70996 -18.46
|
63
|
+
c-2.34961 -5.04004 -7.37012 -8.00977 -12.5996 -8.00977c-1.9502 0 -3.95996 0.419922 -5.86035 1.2998c0 0 -152.17 71.3096 -152.49 71.5205c-3.87012 2.46973 -6.58008 6.58984 -6.58008 11.5195c0 4.91992 2.7207 9.04004 6.58008 11.5098
|
64
|
+
c0.320312 0.220703 152.49 71.5205 152.49 71.5205c1.90039 0.879883 3.91016 1.2998 5.86035 1.2998c5.23926 0 10.2598 -2.98047 12.5996 -8.02051c3.24023 -6.95996 0.230469 -15.2197 -6.70996 -18.46l-94.2998 -43.9697h104.029zM15 438.88h361.11v-638.88h-361.11
|
65
|
+
v638.88zM195.56 22.2695c53.6904 0 97.21 43.5303 97.2207 97.2305c0 53.6904 -43.5303 97.2197 -97.2207 97.2197c-53.6895 0 -97.2197 -43.5293 -97.2197 -97.2197c0 -53.7002 43.5205 -97.2305 97.2197 -97.2305z" />
|
66
|
+
<glyph glyph-name="uniF105" unicode="" horiz-adv-x="694"
|
67
|
+
d="M679.106 795.959l-235.379 -415.746l193.266 0.207031l-621.993 -580.476l290.985 470.204l-194.442 -0.22168z" />
|
68
|
+
<glyph glyph-name="uniF106" unicode=""
|
69
|
+
d="M780.73 683.89l-2.61035 -3.88965h-531.48c-118.93 -80 -189.55 -223.7 -189.55 -372.28c0 -152.33 73.5098 -287.71 197.24 -377.72h521.28c123.739 90.0098 195.989 227.33 195.989 379.67c0 148.61 -71.9395 287.18 -190.869 374.22zM796.65 720v0
|
70
|
+
c131.819 -79.9902 218.35 -243.89 218.35 -417.29c0 -176.93 -90.1699 -322.71 -226.54 -422.7h-546.99c-136.34 99.9902 -226.47 245.771 -226.47 422.7c0 173.4 86.5195 337.3 218.31 417.29h563.341zM298.14 270.01v240h60v-240h-60zM668.11 290v200h60.0293v-200
|
71
|
+
h-60.0293zM515.01 130.01c49.6807 0 90 -20.0098 90 -60v-90.8594h-180.01v90.8594c0 39.9902 40.2695 60 90.0098 60z" />
|
72
|
+
<glyph glyph-name="uniF107" unicode="" horiz-adv-x="570"
|
73
|
+
d="M231 783.2c0 15.2002 36 0 36 0v-504.4c-21 -7.5 -36 -27.7002 -36 -51.3994c0 -30.1006 24.2002 -54.4004 54 -54.4004s54 24.2998 54 54.4004c0 23.6992 -15 43.8994 -36 51.3994v504.4s36 15.2002 36 0c0 -283.8 216 -486.601 216 -486.601l-134.6 -341.399h-270.801
|
74
|
+
l-134.6 341.399s216 202.801 216 486.601zM51 -81.0996h468v-108.9h-468v108.9z" />
|
75
|
+
<glyph glyph-name="uniF108" unicode="" horiz-adv-x="1023"
|
76
|
+
d="M1008.39 599.593l-145.271 -145.243l97.7744 -97.7607l-440.629 -50.541l51.1221 440.034l96.875 -96.8477l145.257 145.258zM160.23 139.437l-97.7471 97.7607l440.629 50.5547l-51.1494 -440.048l-96.8477 96.8477l-145.229 -145.258l-194.886 194.913z
|
77
|
+
M215.518 425.384l234.674 -81.2227l-263.542 21.6445zM466.425 459.678v-101.096l-32.4814 95.6982zM811.217 170.879l-234.673 81.2236l263.542 -21.6592zM560.324 136.571v101.097l32.4668 -95.6855z" />
|
78
|
+
<glyph glyph-name="uniF109" unicode=""
|
79
|
+
d="M347.005 315.126l-165.394 165.38l-166.611 -167.649l0.387695 486.59h487.323l-167.691 -166.874l164.729 -164.771zM848.763 119.12l166.583 167.663l-0.345703 -486.59h-487.364l167.704 166.875l-164.701 164.771l152.702 152.688z" />
|
80
|
+
<glyph glyph-name="uniF10A" unicode=""
|
81
|
+
d="M1015 406.68c0 -20.54 -10.1201 -38.5996 -25.5 -49.8701c0.0195312 -0.0195312 0.0498047 -0.0400391 0.0703125 -0.0498047l-237.181 -183.319l90.7705 -290.16c-0.160156 -0.0205078 -0.290039 -0.100586 -0.450195 -0.120117
|
82
|
+
c2.42969 -6.65039 3.96973 -13.7305 3.96973 -21.21c0 -34.2197 -27.7393 -61.9502 -61.9795 -61.9502c-17.25 0 -32.8203 7.05957 -44.0703 18.4297l-225.36 173.17l-233.689 -179.14c-0.110352 0.0898438 -0.25 0.160156 -0.360352 0.259766
|
83
|
+
c-10.3994 -7.87988 -23.2197 -12.7197 -37.2695 -12.7197c-34.2305 0 -61.9805 27.7305 -61.9805 61.9502c0 9.28027 2.18066 17.9795 5.82031 25.8701l89.6104 286.83l-240.74 185.069c0.0800781 0.100586 0.120117 0.209961 0.189453 0.310547
|
84
|
+
c-13.2793 11.3701 -21.8496 28.0293 -21.8496 46.8701c0 34.2197 27.7305 61.9697 61.9697 61.96c0.470703 0 0.910156 -0.129883 1.39062 -0.140625h281.37l94.5 283.41c0.0595703 -0.0195312 0.139648 -0.00976562 0.209961 -0.0195312
|
85
|
+
c6.38965 27.4092 30.8496 47.8896 60.2295 47.8896c27.71 0 50.9102 -18.3301 58.8203 -43.4199c0.0498047 0 0.0996094 0.00976562 0.139648 0.00976562l95.9805 -287.87h286.13c-0.0498047 -0.109375 -0.0498047 -0.229492 -0.0898438 -0.349609
|
86
|
+
c32.9893 -1.40039 59.3496 -28.3701 59.3496 -61.6904z" />
|
87
|
+
<glyph glyph-name="uniF10B" unicode=""
|
88
|
+
d="M515 800c276.15 0 500 -223.85 500 -500c0 -276.09 -223.85 -500 -500 -500s-500 223.91 -500 500c0 276.15 223.85 500 500 500zM508.05 595.46c-25.0996 0 -45.4502 -20.3496 -45.4502 -45.46c0 -25.0898 20.3506 -45.4502 45.4502 -45.4502
|
89
|
+
c25.1006 0 45.46 20.3604 45.46 45.4502c0 25.0996 -20.3594 45.46 -45.46 45.46zM695.56 300h-0.0292969v56.8301c0 8.37988 -3.79004 15.7295 -9.58008 20.9102l0.169922 0.189453l-113.63 102.271c-23.25 14.4297 -56.7598 3.84961 -86.2705 -25.6602l-113.64 -136.37
|
90
|
+
l0.280273 -0.240234c-4.10059 -4.91992 -6.87012 -11.0098 -6.87012 -17.9297c0 -15.6904 12.7197 -28.4004 28.4102 -28.4004c8.7793 0 16.3301 4.2002 21.54 10.4707l0.279297 -0.240234l69.0898 82.9004v-75.8809l-131.939 -233.439l0.129883 -0.0703125
|
91
|
+
c-2.80957 -4.92969 -4.5498 -10.6094 -4.5498 -16.71c0 -18.8301 15.2695 -34.0996 34.0898 -34.0996c12.7197 0 23.6797 7.06934 29.54 17.3896l0.139648 -0.0703125l125.88 222.7l85.4502 -218.33l0.0498047 0.0302734c4.9707 -12.6904 17.2607 -21.71 31.6904 -21.71
|
92
|
+
c18.8096 0 34.0801 15.2695 34.0801 34.0996c0 4.39062 -0.910156 8.54004 -2.40039 12.4102l0.0605469 0.00976562l-0.330078 0.84082h-0.00976562l-88.2305 225.479v102.62l39.7598 -35.8398v-44.1602c0 -15.6904 12.7305 -28.4004 28.4404 -28.4004
|
93
|
+
c15.6797 0 28.3994 12.71 28.3994 28.4004z" />
|
94
|
+
<glyph glyph-name="uniF10C" unicode="" horiz-adv-x="614"
|
95
|
+
d="M360.73 463.79c0 27.6533 13.8262 41.4795 41.4795 41.4795s41.4805 -13.8262 41.4805 -41.4795s-13.8271 -41.4805 -41.4805 -41.4805s-41.4795 13.8271 -41.4795 41.4805zM473.75 505.64c-15.8838 27.0615 -39.4375 40.7588 -70.6602 41.0908
|
96
|
+
c37.3057 62.0889 70.8135 113.686 100.525 154.79s51.5264 68.3242 65.4453 81.6592s22.9727 18.792 27.1592 16.3701c4.19922 -2.42383 4.00098 -13.0049 -0.594727 -31.7441c-4.5957 -18.7383 -17.2715 -51.2637 -38.0273 -97.5742
|
97
|
+
c-20.7559 -46.3115 -48.7051 -101.175 -83.8477 -164.592zM319.24 463.79c0 -14.5234 3.60352 -28.1436 10.8096 -40.8604c-72.3203 1.27734 -133.666 4.50586 -184.039 9.68457c-50.373 5.17969 -84.8008 10.4609 -103.285 15.8447
|
98
|
+
c-18.4834 5.38281 -27.7256 10.4932 -27.7256 15.3311c0 4.83984 9.24316 9.95215 27.7295 15.3359c18.4873 5.38379 52.917 10.665 103.291 15.8447c50.373 5.17969 111.724 8.40918 184.05 9.68945c-7.21973 -12.7139 -10.8301 -26.3369 -10.8301 -40.8701zM473.84 422.06
|
99
|
+
c35.1221 -63.3721 63.0547 -118.201 83.7988 -164.486c20.7432 -46.2852 33.4111 -78.79 38.0029 -97.5166s4.79102 -29.3018 0.598633 -31.7266c-4.19531 -2.41992 -13.25 3.03223 -27.1621 16.3564s-35.71 40.5137 -65.3926 81.5664
|
100
|
+
c-29.6836 41.0537 -63.1689 92.5928 -100.455 154.617c31.2383 0.373047 54.7754 14.1035 70.6094 41.1895zM360.73 371.11c30.1768 -50.7168 57.833 -94.6543 82.9697 -131.811v-439.3h-82.9697v553.16v17.9502z" />
|
101
|
+
</font>
|
102
|
+
</defs></svg>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/*
|
2
|
+
Font Custom - icon webfonts made simple
|
3
|
+
*/
|
4
|
+
|
5
|
+
@font-face {
|
6
|
+
font-family: "fontcustom";
|
7
|
+
src: url("fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.eot?#iefix") format("embedded-opentype"),
|
8
|
+
url("fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.woff") format("woff"),
|
9
|
+
url("fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.ttf") format("truetype"),
|
10
|
+
url("fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.svg#fontcustom") format("svg");
|
11
|
+
font-weight: normal;
|
12
|
+
font-style: normal;
|
13
|
+
}
|
14
|
+
|
15
|
+
/*
|
16
|
+
Bootstrap Overrides
|
17
|
+
*/
|
18
|
+
|
19
|
+
[class^="icon-"],
|
20
|
+
[class*=" icon-"] {
|
21
|
+
display: inherit;
|
22
|
+
width: auto;
|
23
|
+
height: auto;
|
24
|
+
margin-top: auto;
|
25
|
+
*margin-right: auto;
|
26
|
+
vertical-align: text-top;
|
27
|
+
background-image: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
[class^="icon-"]:before, [class*=" icon-"]:before {
|
31
|
+
font-family: "fontcustom";
|
32
|
+
font-weight: normal;
|
33
|
+
font-style: normal;
|
34
|
+
display: inline-block;
|
35
|
+
text-decoration: inherit;
|
36
|
+
}
|
37
|
+
|
38
|
+
a [class^="icon-"], a [class*=" icon-"] {
|
39
|
+
display: inline-block;
|
40
|
+
text-decoration: inherit;
|
41
|
+
}
|
42
|
+
|
43
|
+
[class^="icon-"]:before, [class*=" icon-"]:before {
|
44
|
+
font-family: "fontcustom";
|
45
|
+
font-weight: normal;
|
46
|
+
font-style: normal;
|
47
|
+
display: inline-block;
|
48
|
+
text-decoration: inherit;
|
49
|
+
}
|
50
|
+
|
51
|
+
a [class^="icon-"], a [class*=" icon-"] {
|
52
|
+
display: inline-block;
|
53
|
+
text-decoration: inherit;
|
54
|
+
}
|
55
|
+
|
56
|
+
/* makes the font 33% larger relative to the icon container */
|
57
|
+
.icon-large:before {
|
58
|
+
vertical-align: top;
|
59
|
+
font-size: 1.333em;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* keeps button heights with and without icons the same */
|
63
|
+
.btn [class^="icon-"], .btn [class*=" icon-"] {
|
64
|
+
line-height: 0.9em;
|
65
|
+
}
|
66
|
+
|
67
|
+
li [class^="icon-"], li [class*=" icon-"] {
|
68
|
+
display: inline-block;
|
69
|
+
width: 1.25em;
|
70
|
+
text-align: center;
|
71
|
+
}
|
72
|
+
|
73
|
+
/* 1.5 increased font size for icon-large * 1.25 width */
|
74
|
+
li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
|
75
|
+
width: 1.875em;
|
76
|
+
}
|
77
|
+
|
78
|
+
li[class^="icon-"], li[class*=" icon-"] {
|
79
|
+
margin-left: 0;
|
80
|
+
list-style-type: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
li[class^="icon-"]:before, li[class*=" icon-"]:before {
|
84
|
+
text-indent: -2em;
|
85
|
+
text-align: center;
|
86
|
+
}
|
87
|
+
|
88
|
+
li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
|
89
|
+
text-indent: -1.333em;
|
90
|
+
}
|
91
|
+
|
92
|
+
/*
|
93
|
+
Icon Classes
|
94
|
+
*/
|
95
|
+
|
96
|
+
.icon-browser:before { content: "\f100"; }
|
97
|
+
.icon-customize:before { content: "\f101"; }
|
98
|
+
.icon-factory:before { content: "\f102"; }
|
99
|
+
.icon-glasses:before { content: "\f103"; }
|
100
|
+
.icon-graffiti:before { content: "\f104"; }
|
101
|
+
.icon-lightning:before { content: "\f105"; }
|
102
|
+
.icon-outlet:before { content: "\f106"; }
|
103
|
+
.icon-pen:before { content: "\f107"; }
|
104
|
+
.icon-pinch:before { content: "\f108"; }
|
105
|
+
.icon-scale:before { content: "\f109"; }
|
106
|
+
.icon-star:before { content: "\f10a"; }
|
107
|
+
.icon-walk:before { content: "\f10b"; }
|
108
|
+
.icon-windmill:before { content: "\f10c"; }
|
File without changes
|
@@ -0,0 +1,183 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Fontcustom::Generator::Font do
|
4
|
+
def generator(options)
|
5
|
+
opts = Fontcustom::Util.collect_options options
|
6
|
+
Fontcustom::Generator::Font.new([opts])
|
7
|
+
end
|
8
|
+
|
9
|
+
context "#check_input" do
|
10
|
+
it "should raise error if input doesn't exist" do
|
11
|
+
options = { :input => fixture("does-not-exist") }
|
12
|
+
expect { generator(options).invoke :check_input }.to raise_error Fontcustom::Error, /doesn't exist/
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should raise error if input isn't a directory" do
|
16
|
+
options = { :input => fixture("not-a-dir") }
|
17
|
+
expect { generator(options).invoke :check_input }.to raise_error Fontcustom::Error, /isn't a directory/
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should raise error if input doesn't contain vectors" do
|
21
|
+
options = { :input => fixture("empty") }
|
22
|
+
expect { generator(options).invoke :check_input }.to raise_error Fontcustom::Error, /doesn't contain any vectors/
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "#check_output" do
|
27
|
+
it "should raise an error if output isn't a directory" do
|
28
|
+
options = { :output => fixture("not-a-dir") }
|
29
|
+
expect { generator(options).check_output }.to raise_error Fontcustom::Error, /isn't a directory/
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should create output dir and data file if they don't exist" do
|
33
|
+
gen = generator :output => fixture("create-me")
|
34
|
+
gen.stub(:add_file)
|
35
|
+
gen.should_receive(:add_file).with(fixture("create-me") + "/.fontcustom-data", anything)
|
36
|
+
gen.check_output
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
context "#get_data" do
|
41
|
+
it "should assign empty data model if no data file is empty" do
|
42
|
+
gen = generator :output => fixture("empty-data")
|
43
|
+
data = gen.get_data
|
44
|
+
data.should == Fontcustom::DATA_MODEL
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should assign @data from data file" do
|
48
|
+
gen = generator :output => fixture("mixed-output")
|
49
|
+
data = gen.get_data
|
50
|
+
data[:fonts] =~ data_file_contents[:fonts]
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
context "#reset_output" do
|
55
|
+
subject do
|
56
|
+
gen = generator :output => fixture("mixed-output")
|
57
|
+
gen.stub :remove_file
|
58
|
+
Fontcustom::Util.stub :clear_file
|
59
|
+
gen.stub :append_to_file
|
60
|
+
gen.instance_variable_set(:@data, data_file_contents)
|
61
|
+
gen
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should delete fonts from @data[:fonts]" do
|
65
|
+
subject.should_receive(:remove_file).exactly(4).times.with(/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e/, :verbose => true)
|
66
|
+
subject.reset_output
|
67
|
+
end
|
68
|
+
|
69
|
+
it "should not delete non-font files" do
|
70
|
+
subject.should_not_receive(:remove_file).with("dont-delete-me.bro")
|
71
|
+
subject.should_not_receive(:remove_file).with("another-font.ttf")
|
72
|
+
subject.should_not_receive(:remove_file).with("fontcustom.css")
|
73
|
+
subject.reset_output
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should empty @data[:fonts]" do
|
77
|
+
subject.reset_output
|
78
|
+
subject.instance_variable_get(:@data)[:fonts].should be_empty
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should update the data file" do
|
82
|
+
file = File.join(fixture("mixed-output"), ".fontcustom-data")
|
83
|
+
Fontcustom::Util.should_receive(:clear_file).once.with(file)
|
84
|
+
subject.should_receive(:append_to_file).once.with(file, /"fonts":/, :verbose => false)
|
85
|
+
subject.reset_output
|
86
|
+
end
|
87
|
+
|
88
|
+
it "should be silent" do
|
89
|
+
stdout = capture(:stdout) { subject.reset_output }
|
90
|
+
stdout.should == ""
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
context "#generate" do
|
95
|
+
subject do
|
96
|
+
gen = generator(:input => fixture("vectors"), :output => fixture("mixed-output"))
|
97
|
+
gen.stub(:"`").and_return fontforge_output
|
98
|
+
gen
|
99
|
+
end
|
100
|
+
|
101
|
+
it "should call fontforge" do
|
102
|
+
subject.should_receive(:"`").with(/fontforge -script/)
|
103
|
+
subject.generate
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should pass options to fontforge" do
|
107
|
+
subject.should_receive(:"`").with(/#{fixture("vectors")}.+#{fixture("mixed-output")}/)
|
108
|
+
subject.generate
|
109
|
+
end
|
110
|
+
|
111
|
+
it "should assign @json" do
|
112
|
+
subject.generate
|
113
|
+
json = subject.instance_variable_get(:@json)
|
114
|
+
json.should == data_file_contents.to_json
|
115
|
+
end
|
116
|
+
|
117
|
+
it "should raise error if fontforge fails" do
|
118
|
+
gen = generator(:input => fixture("vectors"), :output => fixture("fake-dir-should-cause-failure"), :debug => true)
|
119
|
+
expect { capture(:stdout) { gen.generate } }.to raise_error Fontcustom::Error, /failed unexpectedly/
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
context "#collect_data" do
|
124
|
+
it "should assign @data from @json" do
|
125
|
+
gen = generator(:input => fixture("vectors"), :output => fixture("mixed-output"))
|
126
|
+
gen.instance_variable_set(:@data, Fontcustom::DATA_MODEL)
|
127
|
+
gen.instance_variable_set(:@json, data_file_contents.to_json)
|
128
|
+
gen.collect_data
|
129
|
+
data = gen.instance_variable_get(:@data)
|
130
|
+
data[:glyphs].should =~ ["c", "d", "a_r3ally-exotic-f1le-name"]
|
131
|
+
data[:file_name].should == "fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e"
|
132
|
+
data[:fonts].should =~ [
|
133
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.eot",
|
134
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.svg",
|
135
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.ttf",
|
136
|
+
"fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.woff"
|
137
|
+
]
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
context "#announce_files" do
|
142
|
+
it "should print generated files to console" do
|
143
|
+
gen = generator(:input => fixture("vectors"), :output => fixture("mixed-output"))
|
144
|
+
gen.instance_variable_set :@data, data_file_contents
|
145
|
+
stdout = capture(:stdout) { gen.announce_files }
|
146
|
+
stdout.should =~ /create.+\.(woff|ttf|eot|svg)/
|
147
|
+
end
|
148
|
+
|
149
|
+
it "should print nothing if verbose is false" do
|
150
|
+
gen = generator(:input => fixture("vectors"), :output => fixture("mixed-output"), :verbose => false)
|
151
|
+
gen.instance_variable_set :@data, data_file_contents
|
152
|
+
stdout = capture(:stdout) { gen.announce_files }
|
153
|
+
stdout.should == ""
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
context "#save_data" do
|
158
|
+
it "should update data file (TEMP)" do
|
159
|
+
gen = generator(:output => fixture("mixed-output"))
|
160
|
+
Fontcustom::Util.stub :clear_file
|
161
|
+
gen.stub :append_to_file
|
162
|
+
gen.instance_variable_set(:@data, data_file_contents)
|
163
|
+
file = File.join(fixture("mixed-output"), ".fontcustom-data")
|
164
|
+
Fontcustom::Util.should_receive(:clear_file).once.with(file)
|
165
|
+
gen.should_receive(:append_to_file).once.with do |path, content|
|
166
|
+
path.should == file
|
167
|
+
content.should match(/"fonts":/)
|
168
|
+
content.should match(/"glyphs":/)
|
169
|
+
content.should match(/"file_name":/)
|
170
|
+
end
|
171
|
+
gen.save_data
|
172
|
+
end
|
173
|
+
|
174
|
+
it "should be silent if verbose is false" do
|
175
|
+
gen = generator(:output => fixture("mixed-output"), :verbose => false)
|
176
|
+
Fontcustom::Util.stub :clear_file
|
177
|
+
gen.stub :append_to_file
|
178
|
+
gen.instance_variable_set(:@data, data_file_contents)
|
179
|
+
stdout = capture(:stdout) { gen.save_data }
|
180
|
+
stdout.should == ""
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Fontcustom::Generator::Template do
|
4
|
+
def generator(options)
|
5
|
+
opts = Fontcustom::Util.collect_options options
|
6
|
+
Fontcustom::Generator::Template.new([opts])
|
7
|
+
end
|
8
|
+
|
9
|
+
context "#get_data" do
|
10
|
+
it "should raise error if data file doesn't exist" do
|
11
|
+
gen = generator :output => fixture("empty")
|
12
|
+
expect { gen.get_data }.to raise_error Fontcustom::Error, /no \.fontcustom-data/
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should assign @data from data file" do
|
16
|
+
gen = generator :output => fixture("mixed-output")
|
17
|
+
gen.get_data
|
18
|
+
gen.instance_variable_get(:@data)[:templates].should =~ data_file_contents[:templates]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "#check_templates" do
|
23
|
+
it "should raise an error if no templates are given" do
|
24
|
+
gen = generator :templates => []
|
25
|
+
expect { gen.check_templates }.to raise_error Fontcustom::Error, /No templates were specified/
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "#reset_output" do
|
30
|
+
subject do
|
31
|
+
gen = generator :output => fixture("mixed-output")
|
32
|
+
gen.stub :remove_file
|
33
|
+
Fontcustom::Util.stub :clear_file
|
34
|
+
gen.stub :append_to_file
|
35
|
+
gen.instance_variable_set(:@data, data_file_contents)
|
36
|
+
gen
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should delete files from @data[:templates]" do
|
40
|
+
subject.should_receive(:remove_file).once.with(/fontcustom\.css/, :verbose => true)
|
41
|
+
subject.reset_output
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should not delete non-template files" do
|
45
|
+
subject.should_not_receive(:remove_file).with("dont-delete-me.bro")
|
46
|
+
subject.should_not_receive(:remove_file).with("another-font.ttf")
|
47
|
+
subject.should_not_receive(:remove_file).with(/fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e/)
|
48
|
+
subject.reset_output
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should empty @data[:fonts]" do
|
52
|
+
subject.reset_output
|
53
|
+
subject.instance_variable_get(:@data)[:templates].should be_empty
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should update the data file" do
|
57
|
+
file = File.join(fixture("mixed-output"), ".fontcustom-data")
|
58
|
+
Fontcustom::Util.should_receive(:clear_file).once.with(file)
|
59
|
+
subject.should_receive(:append_to_file).once.with(file, /"templates":/, :verbose => false)
|
60
|
+
subject.reset_output
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should be silent" do
|
64
|
+
stdout = capture(:stdout) { subject.reset_output }
|
65
|
+
stdout.should == ""
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context "#generate" do
|
70
|
+
subject do
|
71
|
+
gen = generator :output => fixture("mixed-output"), :templates => %W|scss css #{fixture("not-a-dir")}|
|
72
|
+
gen.instance_variable_set :@data, data_file_contents
|
73
|
+
gen.stub :template
|
74
|
+
Fontcustom::Util.stub :clear_file
|
75
|
+
gen.stub :append_to_file
|
76
|
+
gen
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should call #template for each template" do
|
80
|
+
subject.should_receive(:template).exactly(3).times
|
81
|
+
subject.generate
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should update data file" do
|
85
|
+
file = File.join fixture("mixed-output"), ".fontcustom-data"
|
86
|
+
Fontcustom::Util.should_receive(:clear_file).once.with(file)
|
87
|
+
subject.should_receive(:append_to_file).once.with do |path, content|
|
88
|
+
path.should == file
|
89
|
+
content.should match(/fontcustom\.css/)
|
90
|
+
content.should match(/_fontcustom\.scss/)
|
91
|
+
content.should match(/not-a-dir/)
|
92
|
+
end
|
93
|
+
subject.generate
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should be silent if verbose is false" do
|
97
|
+
gen = generator :output => fixture("mixed-output"), :templates => %W|scss css #{fixture("not-a-dir")}|, :verbose => false
|
98
|
+
gen.instance_variable_set :@data, data_file_contents
|
99
|
+
gen.stub :template
|
100
|
+
Fontcustom::Util.stub :clear_file
|
101
|
+
gen.stub :append_to_file
|
102
|
+
stdout = capture(:stdout) { gen.generate }
|
103
|
+
stdout.should == ""
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|