Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76925c32a0 | ||
|
|
be4aa89313 | ||
|
|
44f008b186 | ||
|
|
6b3b1843bd | ||
|
|
23db7f2706 | ||
|
|
ec005a4189 | ||
|
|
641c23b36d | ||
|
|
f7328566b9 | ||
|
|
2731a29800 | ||
|
|
0ed84eda47 | ||
|
|
ee92c0d751 | ||
|
|
081c8d0a11 | ||
|
|
b3d8f8fdc5 | ||
|
|
56f96afd28 | ||
|
|
fff5250117 | ||
|
|
b7acf31666 | ||
|
|
e20e26ed12 | ||
|
|
46ee9fa8d9 | ||
|
|
7d4cf1feb1 | ||
|
|
d4ccb8fde3 | ||
|
|
98339dfbfd | ||
|
|
591f013dd4 | ||
|
|
0dbe98229f | ||
|
|
0b1f3fdeae | ||
|
|
560be6a5df | ||
|
|
aa72d6fec2 | ||
|
|
0ee2a4164b | ||
|
|
1b9e40b929 | ||
|
|
7cbd168631 | ||
|
|
e97eb07752 | ||
|
|
3ee6c3bcf4 | ||
|
|
cb0b555bc1 | ||
|
|
c0495b65b5 | ||
|
|
d0f58770cd | ||
|
|
27a2783818 | ||
|
|
72428feb5e | ||
|
|
5b93cea14a | ||
|
|
8e795df52e | ||
|
|
0e7420f8ea | ||
|
|
c049ea8c0e | ||
|
|
5207819363 | ||
|
|
79374c08b2 | ||
|
|
2c6fc5c518 | ||
|
|
b9a275fb20 | ||
|
|
8883ee097d | ||
|
|
fdef4e5413 | ||
|
|
53235d66fe | ||
|
|
e30f3a0ec1 | ||
|
|
328d9634c6 | ||
|
|
fbdff5a85f |
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ionicons Animations</title>
|
||||
<style>
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #444;
|
||||
font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #888;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover, a:focus { color: #000; }
|
||||
p { margin-bottom: 20px; }
|
||||
|
||||
header {
|
||||
border-bottom: 2px solid #ddd;
|
||||
margin-bottom: 20px;
|
||||
overflow: hidden;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
color: #888;
|
||||
float: left;
|
||||
font-size: 36px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
header a {
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
min-width: 960px;
|
||||
padding: 0 20px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 32px;
|
||||
}
|
||||
</style>
|
||||
<link href="css/ionicons.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>Ionicons Animations:</h1>
|
||||
<p><a href="http://ionicons.com/">Ionicons Homepage</a></p>
|
||||
</header>
|
||||
<div class="content">
|
||||
|
||||
<h3>.ion-refreshing</h3>
|
||||
<p>
|
||||
<i class="icon ion-refreshing"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-ios7-reloading</h3>
|
||||
<p>
|
||||
<i class="icon ion-ios7-reloading"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-loading-a</h3>
|
||||
<p>
|
||||
<i class="icon ion-loading-a"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-loading-b</h3>
|
||||
<p>
|
||||
<i class="icon ion-loading-b"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-loading-c</h3>
|
||||
<p>
|
||||
<i class="icon ion-loading-c"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-loading-d</h3>
|
||||
<p>
|
||||
<i class="icon ion-loading-d"></i>
|
||||
</p>
|
||||
|
||||
<h3>.ion-looping</h3>
|
||||
<p>
|
||||
<i class="icon ion-looping"></i>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,7 +7,7 @@
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.1",
|
||||
"name": "Ionicons",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
<i class="icon {{prefix}}{{name}}"></i>
|
||||
</span><span class="step size-64">
|
||||
<i class="icon {{prefix}}{{name}}"></i>
|
||||
</span><span class="step size-72">
|
||||
</span><span class="step size-96">
|
||||
<i class="icon {{prefix}}{{name}}"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="preview-scale">
|
||||
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">32</span><span class="step">48</span><span class="step">64</span><span class="step">72</span>
|
||||
</div>
|
||||
<div class="preview-scale"><span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">32</span><span class="step">48</span><span class="step">64</span><span class="step">96</span></div>
|
||||
<div class="usage">
|
||||
<label>Classname:</label>
|
||||
<input class="name" type="text" readonly="readonly" onClick="this.select();" value="{{prefix}}{{name}}" />
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
.size-32 { font-size: 32px; }
|
||||
.size-48 { font-size: 48px; }
|
||||
.size-64 { font-size: 64px; }
|
||||
.size-72 { font-size: 72px; }
|
||||
.size-96 { font-size: 96px; }
|
||||
|
||||
.usage { margin-top: 10px; }
|
||||
.usage input {
|
||||
@@ -136,11 +136,11 @@
|
||||
padding: 20px 0;
|
||||
}
|
||||
</style>
|
||||
<link href="css/{{font_filename}}.css" rel="stylesheet" type="text/css" />
|
||||
<link href="css/ionicons.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="characters-off">
|
||||
<div id="page" class="container">
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>{{font_name}} v{{font_version}} Cheatsheet, {{icon_count}} icons:</h1>
|
||||
<p><a href="http://ionicons.com/">Ionicons Homepage</a></p>
|
||||
|
||||
@@ -13,8 +13,9 @@ SCSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'scss')
|
||||
def main():
|
||||
generate_font_files()
|
||||
|
||||
data = get_manifest()
|
||||
data = get_build_data()
|
||||
|
||||
rename_svg_glyph_names(data)
|
||||
generate_scss(data)
|
||||
generate_cheatsheet(data)
|
||||
generate_component_json(data)
|
||||
@@ -28,6 +29,23 @@ def generate_font_files():
|
||||
call(cmd, shell=True)
|
||||
|
||||
|
||||
def rename_svg_glyph_names(data):
|
||||
# hacky and slow (but safe) way to rename glyph-name attributes
|
||||
svg_path = os.path.join(FONTS_FOLDER_PATH, 'ionicons.svg')
|
||||
svg_file = open(svg_path, 'r+')
|
||||
svg_text = svg_file.read()
|
||||
svg_file.seek(0)
|
||||
|
||||
for ionicon in data['icons']:
|
||||
# uniF2CA
|
||||
org_name = 'uni%s' % (ionicon['code'].replace('0x', '').upper())
|
||||
ion_name = 'ion-%s' % (ionicon['name'])
|
||||
svg_text = svg_text.replace(org_name, ion_name)
|
||||
|
||||
svg_file.write(svg_text)
|
||||
svg_file.close()
|
||||
|
||||
|
||||
def generate_scss(data):
|
||||
print "Generate SCSS"
|
||||
font_name = data['name']
|
||||
@@ -57,7 +75,7 @@ def generate_scss(data):
|
||||
|
||||
group = [ '.%s' % (data['name'].lower()) ]
|
||||
for ionicon in data['icons']:
|
||||
group.append('.%s%s' % (css_prefix, ionicon['name']) )
|
||||
group.append('.#{$ionicons-prefix}%s' % (ionicon['name']) )
|
||||
|
||||
d.append( ',\n'.join(group) )
|
||||
|
||||
@@ -67,7 +85,7 @@ def generate_scss(data):
|
||||
|
||||
for ionicon in data['icons']:
|
||||
chr_code = ionicon['code'].replace('0x', '\\')
|
||||
d.append('.#{$ionicons-prefix}%s:before { content: "%s"; }' % (ionicon['name'], chr_code) )
|
||||
d.append('.#{$ionicons-prefix}%s:before { content: $ionicon-var-%s; }' % (ionicon['name'], ionicon['name']) )
|
||||
|
||||
f = open(icons_file_path, 'w')
|
||||
f.write( '\n'.join(d) )
|
||||
@@ -79,11 +97,11 @@ def generate_scss(data):
|
||||
def generate_css_from_scss(data):
|
||||
print "Generate CSS From SCSS"
|
||||
|
||||
scss_file_path = os.path.join(SCSS_FOLDER_PATH, '%s.scss' % (data['name'].lower()))
|
||||
css_file_path = os.path.join(CSS_FOLDER_PATH, '%s.css' % (data['name'].lower()))
|
||||
css_min_file_path = os.path.join(CSS_FOLDER_PATH, '%s.min.css' % (data['name'].lower()))
|
||||
scss_file_path = os.path.join(SCSS_FOLDER_PATH, 'ionicons.scss')
|
||||
css_file_path = os.path.join(CSS_FOLDER_PATH, 'ionicons.css')
|
||||
css_min_file_path = os.path.join(CSS_FOLDER_PATH, 'ionicons.min.css')
|
||||
|
||||
cmd = "sass %s %s" % (scss_file_path, css_file_path)
|
||||
cmd = "sass %s %s --style compact" % (scss_file_path, css_file_path)
|
||||
call(cmd, shell=True)
|
||||
|
||||
print "Generate Minified CSS From SCSS"
|
||||
@@ -94,7 +112,6 @@ def generate_css_from_scss(data):
|
||||
def generate_cheatsheet(data):
|
||||
print "Generate Cheatsheet"
|
||||
|
||||
css_file_path = os.path.join(CSS_FOLDER_PATH, '%s.css' % (data['name'].lower()))
|
||||
cheatsheet_file_path = os.path.join(ROOT_PATH, 'cheatsheet.html')
|
||||
template_path = os.path.join(BUILDER_PATH, 'cheatsheet', 'template.html')
|
||||
icon_row_path = os.path.join(BUILDER_PATH, 'cheatsheet', 'icon-row.html')
|
||||
@@ -103,10 +120,6 @@ def generate_cheatsheet(data):
|
||||
template_html = f.read()
|
||||
f.close()
|
||||
|
||||
f = open(css_file_path, 'r')
|
||||
ionicons_css = f.read()
|
||||
f.close()
|
||||
|
||||
f = open(icon_row_path, 'r')
|
||||
icon_row_template = f.read()
|
||||
f.close()
|
||||
@@ -128,10 +141,8 @@ def generate_cheatsheet(data):
|
||||
content.append(item_row)
|
||||
|
||||
template_html = template_html.replace("{{font_name}}", data["name"])
|
||||
template_html = template_html.replace("{{font_filename}}", data["name"].lower())
|
||||
template_html = template_html.replace("{{font_version}}", data["version"])
|
||||
template_html = template_html.replace("{{icon_count}}", str(len(data["icons"])) )
|
||||
template_html = template_html.replace("{{ionicons_css}}", ionicons_css )
|
||||
template_html = template_html.replace("{{content}}", '\n'.join(content) )
|
||||
|
||||
f = open(cheatsheet_file_path, 'w')
|
||||
@@ -157,7 +168,7 @@ def generate_component_json(data):
|
||||
"fonts/%s.eot" % (data['name'].lower()),
|
||||
"fonts/%s.svg" % (data['name'].lower()),
|
||||
"fonts/%s.ttf" % (data['name'].lower()),
|
||||
"fonts/%s.woof" % (data['name'].lower())
|
||||
"fonts/%s.woff" % (data['name'].lower())
|
||||
]
|
||||
}
|
||||
txt = json.dumps(d, indent=4, separators=(',', ': '))
|
||||
@@ -241,12 +252,12 @@ def generate_bower_json(data):
|
||||
f.close()
|
||||
|
||||
|
||||
def get_manifest():
|
||||
manifest_path = os.path.join(BUILDER_PATH, 'manifest.json')
|
||||
f = open(manifest_path, 'r')
|
||||
manifest_data = json.loads(f.read())
|
||||
def get_build_data():
|
||||
build_data_path = os.path.join(BUILDER_PATH, 'build_data.json')
|
||||
f = open(build_data_path, 'r')
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
return manifest_data
|
||||
return data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"build_hash": "8667539bd6a4f4c7a7668eeb477a408a",
|
||||
"build_hash": "b00533d2baf717d9970fa1b1ded6de04",
|
||||
"prefix": "ion-",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.1",
|
||||
"name": "Ionicons",
|
||||
"icons": [
|
||||
{
|
||||
@@ -12,6 +12,262 @@
|
||||
"code": "0xf100",
|
||||
"name": "alert-circled"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c7",
|
||||
"name": "android-add"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c6",
|
||||
"name": "android-add-contact"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c8",
|
||||
"name": "android-alarm"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c9",
|
||||
"name": "android-archive"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ca",
|
||||
"name": "android-arrow-back"
|
||||
},
|
||||
{
|
||||
"code": "0xf2cb",
|
||||
"name": "android-arrow-down-left"
|
||||
},
|
||||
{
|
||||
"code": "0xf2cc",
|
||||
"name": "android-arrow-down-right"
|
||||
},
|
||||
{
|
||||
"code": "0xf2cd",
|
||||
"name": "android-arrow-up-left"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ce",
|
||||
"name": "android-arrow-up-right"
|
||||
},
|
||||
{
|
||||
"code": "0xf2cf",
|
||||
"name": "android-battery"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d0",
|
||||
"name": "android-book"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d1",
|
||||
"name": "android-calendar"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d2",
|
||||
"name": "android-call"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d3",
|
||||
"name": "android-camera"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d4",
|
||||
"name": "android-chat"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d5",
|
||||
"name": "android-checkmark"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d6",
|
||||
"name": "android-clock"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d7",
|
||||
"name": "android-close"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d8",
|
||||
"name": "android-contact"
|
||||
},
|
||||
{
|
||||
"code": "0xf2d9",
|
||||
"name": "android-contacts"
|
||||
},
|
||||
{
|
||||
"code": "0xf2da",
|
||||
"name": "android-data"
|
||||
},
|
||||
{
|
||||
"code": "0xf2db",
|
||||
"name": "android-developer"
|
||||
},
|
||||
{
|
||||
"code": "0xf2dc",
|
||||
"name": "android-display"
|
||||
},
|
||||
{
|
||||
"code": "0xf2dd",
|
||||
"name": "android-download"
|
||||
},
|
||||
{
|
||||
"code": "0xf2de",
|
||||
"name": "android-dropdown"
|
||||
},
|
||||
{
|
||||
"code": "0xf2df",
|
||||
"name": "android-earth"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e0",
|
||||
"name": "android-folder"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e1",
|
||||
"name": "android-forums"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e2",
|
||||
"name": "android-friends"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e3",
|
||||
"name": "android-hand"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e4",
|
||||
"name": "android-image"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e5",
|
||||
"name": "android-inbox"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e6",
|
||||
"name": "android-information"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e7",
|
||||
"name": "android-keypad"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e8",
|
||||
"name": "android-lightbulb"
|
||||
},
|
||||
{
|
||||
"code": "0xf2e9",
|
||||
"name": "android-locate"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ea",
|
||||
"name": "android-location"
|
||||
},
|
||||
{
|
||||
"code": "0xf2eb",
|
||||
"name": "android-mail"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ec",
|
||||
"name": "android-microphone"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ed",
|
||||
"name": "android-mixer"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ee",
|
||||
"name": "android-more"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ef",
|
||||
"name": "android-note"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f0",
|
||||
"name": "android-playstore"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f1",
|
||||
"name": "android-printer"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f2",
|
||||
"name": "android-promotion"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f3",
|
||||
"name": "android-reminder"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f4",
|
||||
"name": "android-remove"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f5",
|
||||
"name": "android-search"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f6",
|
||||
"name": "android-send"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f7",
|
||||
"name": "android-settings"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f8",
|
||||
"name": "android-share"
|
||||
},
|
||||
{
|
||||
"code": "0xf2fa",
|
||||
"name": "android-social"
|
||||
},
|
||||
{
|
||||
"code": "0xf2f9",
|
||||
"name": "android-social-user"
|
||||
},
|
||||
{
|
||||
"code": "0xf2fb",
|
||||
"name": "android-sort"
|
||||
},
|
||||
{
|
||||
"code": "0xf2fc",
|
||||
"name": "android-star"
|
||||
},
|
||||
{
|
||||
"code": "0xf2fd",
|
||||
"name": "android-stopwatch"
|
||||
},
|
||||
{
|
||||
"code": "0xf2fe",
|
||||
"name": "android-storage"
|
||||
},
|
||||
{
|
||||
"code": "0xf2ff",
|
||||
"name": "android-system-back"
|
||||
},
|
||||
{
|
||||
"code": "0xf300",
|
||||
"name": "android-system-home"
|
||||
},
|
||||
{
|
||||
"code": "0xf301",
|
||||
"name": "android-system-windows"
|
||||
},
|
||||
{
|
||||
"code": "0xf302",
|
||||
"name": "android-timer"
|
||||
},
|
||||
{
|
||||
"code": "0xf303",
|
||||
"name": "android-trash"
|
||||
},
|
||||
{
|
||||
"code": "0xf304",
|
||||
"name": "android-volume"
|
||||
},
|
||||
{
|
||||
"code": "0xf305",
|
||||
"name": "android-wifi"
|
||||
},
|
||||
{
|
||||
"code": "0xf102",
|
||||
"name": "archive"
|
||||
@@ -156,6 +412,10 @@
|
||||
"code": "0xf26c",
|
||||
"name": "briefcase"
|
||||
},
|
||||
{
|
||||
"code": "0xf2be",
|
||||
"name": "bug"
|
||||
},
|
||||
{
|
||||
"code": "0xf26d",
|
||||
"name": "calculator"
|
||||
@@ -300,6 +560,10 @@
|
||||
"code": "0xf276",
|
||||
"name": "earth"
|
||||
},
|
||||
{
|
||||
"code": "0xf2bf",
|
||||
"name": "edit"
|
||||
},
|
||||
{
|
||||
"code": "0xf277",
|
||||
"name": "egg"
|
||||
@@ -316,6 +580,10 @@
|
||||
"code": "0xf133",
|
||||
"name": "eye"
|
||||
},
|
||||
{
|
||||
"code": "0xf306",
|
||||
"name": "eye-disabled"
|
||||
},
|
||||
{
|
||||
"code": "0xf278",
|
||||
"name": "female"
|
||||
@@ -352,6 +620,10 @@
|
||||
"code": "0xf27a",
|
||||
"name": "fork"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c0",
|
||||
"name": "fork-repo"
|
||||
},
|
||||
{
|
||||
"code": "0xf13a",
|
||||
"name": "forward"
|
||||
@@ -624,6 +896,18 @@
|
||||
"code": "0xf171",
|
||||
"name": "ios7-clock-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf2bc",
|
||||
"name": "ios7-close"
|
||||
},
|
||||
{
|
||||
"code": "0xf2bd",
|
||||
"name": "ios7-close-empty"
|
||||
},
|
||||
{
|
||||
"code": "0xf2bb",
|
||||
"name": "ios7-close-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf178",
|
||||
"name": "ios7-cloud"
|
||||
@@ -652,6 +936,14 @@
|
||||
"code": "0xf17a",
|
||||
"name": "ios7-cloudy"
|
||||
},
|
||||
{
|
||||
"code": "0xf308",
|
||||
"name": "ios7-cloudy-night"
|
||||
},
|
||||
{
|
||||
"code": "0xf307",
|
||||
"name": "ios7-cloudy-night-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf179",
|
||||
"name": "ios7-cloudy-outline"
|
||||
@@ -1092,6 +1384,10 @@
|
||||
"code": "0xf1dd",
|
||||
"name": "ios7-skipforward-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf309",
|
||||
"name": "ios7-snowy"
|
||||
},
|
||||
{
|
||||
"code": "0xf290",
|
||||
"name": "ios7-speedometer"
|
||||
@@ -1344,6 +1640,10 @@
|
||||
"code": "0xf208",
|
||||
"name": "minus-round"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c1",
|
||||
"name": "model-s"
|
||||
},
|
||||
{
|
||||
"code": "0xf20a",
|
||||
"name": "monitor"
|
||||
@@ -1368,10 +1668,18 @@
|
||||
"code": "0xf2a3",
|
||||
"name": "navigate"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c2",
|
||||
"name": "no-smoking"
|
||||
},
|
||||
{
|
||||
"code": "0xf2a4",
|
||||
"name": "nuclear"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c3",
|
||||
"name": "paper-airplane"
|
||||
},
|
||||
{
|
||||
"code": "0xf20f",
|
||||
"name": "paperclip"
|
||||
@@ -1416,6 +1724,10 @@
|
||||
"code": "0xf215",
|
||||
"name": "play"
|
||||
},
|
||||
{
|
||||
"code": "0xf30a",
|
||||
"name": "playstation"
|
||||
},
|
||||
{
|
||||
"code": "0xf218",
|
||||
"name": "plus"
|
||||
@@ -1556,6 +1868,10 @@
|
||||
"code": "0xf230",
|
||||
"name": "social-facebook-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c4",
|
||||
"name": "social-freebsd-devil"
|
||||
},
|
||||
{
|
||||
"code": "0xf233",
|
||||
"name": "social-github"
|
||||
@@ -1628,6 +1944,10 @@
|
||||
"code": "0xf240",
|
||||
"name": "social-tumblr-outline"
|
||||
},
|
||||
{
|
||||
"code": "0xf2c5",
|
||||
"name": "social-tux"
|
||||
},
|
||||
{
|
||||
"code": "0xf243",
|
||||
"name": "social-twitter"
|
||||
@@ -1696,6 +2016,10 @@
|
||||
"code": "0xf2b5",
|
||||
"name": "stats-bars"
|
||||
},
|
||||
{
|
||||
"code": "0xf30b",
|
||||
"name": "steam"
|
||||
},
|
||||
{
|
||||
"code": "0xf24f",
|
||||
"name": "stop"
|
||||
@@ -1775,6 +2099,10 @@
|
||||
{
|
||||
"code": "0xf2ba",
|
||||
"name": "wrench"
|
||||
},
|
||||
{
|
||||
"code": "0xf30c",
|
||||
"name": "xbox"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,16 +1,23 @@
|
||||
# Font generation script from FontCustom
|
||||
# https://github.com/FontCustom/fontcustom/
|
||||
# http://fontcustom.com/
|
||||
|
||||
import fontforge
|
||||
import os
|
||||
import md5
|
||||
import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import copy
|
||||
|
||||
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', 'src')
|
||||
OUTPUT_FONT_DIR = os.path.join(SCRIPT_PATH, '..', '..', 'fonts')
|
||||
MANIFEST_PATH = os.path.join(SCRIPT_PATH, '..', 'manifest.json')
|
||||
AUTO_WIDTH = False
|
||||
BUILD_DATA_PATH = os.path.join(SCRIPT_PATH, '..', 'build_data.json')
|
||||
AUTO_WIDTH = True
|
||||
KERNING = 15
|
||||
STANDARD_WIDTH_ICONS = ['refresh', 'ios7-reload', 'load-a', 'load-b', 'load-c', 'load-d', 'loop']
|
||||
|
||||
cp = 0xf100
|
||||
m = md5.new()
|
||||
@@ -27,7 +34,12 @@ manifest_data = json.loads(manifest_file.read())
|
||||
manifest_file.close()
|
||||
print "Load Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
|
||||
build_data = copy.deepcopy(manifest_data)
|
||||
build_data['icons'] = []
|
||||
|
||||
font_name = manifest_data['name']
|
||||
m.update(font_name + ';')
|
||||
m.update(manifest_data['prefix'] + ';')
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(INPUT_SVG_DIR):
|
||||
for filename in filenames:
|
||||
@@ -66,6 +78,10 @@ for dirname, dirnames, filenames in os.walk(INPUT_SVG_DIR):
|
||||
'code': chr_code
|
||||
})
|
||||
|
||||
build_data['icons'].append({
|
||||
'name': name,
|
||||
'code': chr_code
|
||||
})
|
||||
|
||||
if ext in ['.svg']:
|
||||
# hack removal of <switch> </switch> tags
|
||||
@@ -95,18 +111,19 @@ for dirname, dirnames, filenames in os.walk(INPUT_SVG_DIR):
|
||||
os.unlink(tmpsvgfile.name)
|
||||
|
||||
# set glyph size explicitly or automatically depending on autowidth
|
||||
if AUTO_WIDTH:
|
||||
if AUTO_WIDTH and name not in STANDARD_WIDTH_ICONS:
|
||||
glyph.left_side_bearing = glyph.right_side_bearing = 0
|
||||
glyph.round()
|
||||
else:
|
||||
# force a manual size when autowidth is disabled
|
||||
print " - Standard Width: %s" % (name)
|
||||
glyph.width = 512
|
||||
|
||||
# resize glyphs if autowidth is enabled
|
||||
if AUTO_WIDTH:
|
||||
f.autoWidth(0, 0, 512)
|
||||
|
||||
fontfile = '%s/%s' % (OUTPUT_FONT_DIR, font_name.lower())
|
||||
fontfile = '%s/ionicons' % (OUTPUT_FONT_DIR)
|
||||
|
||||
build_hash = m.hexdigest()
|
||||
|
||||
@@ -147,9 +164,15 @@ else:
|
||||
subprocess.call('ttfautohint -s -f -n ' + fontfile + '.ttf ' + fontfile + '-hinted.ttf > /dev/null 2>&1 && mv ' + fontfile + '-hinted.ttf ' + fontfile + '.ttf', shell=True)
|
||||
|
||||
manifest_data['icons'] = sorted(manifest_data['icons'], key=lambda k: k['name'])
|
||||
build_data['icons'] = sorted(build_data['icons'], key=lambda k: k['name'])
|
||||
|
||||
print "Save Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
manifest_file = open(MANIFEST_PATH, 'w')
|
||||
manifest_file.write( json.dumps(manifest_data, indent=2, separators=(',', ': ')) )
|
||||
manifest_file.close()
|
||||
f = open(MANIFEST_PATH, 'w')
|
||||
f.write( json.dumps(manifest_data, indent=2, separators=(',', ': ')) )
|
||||
f.close()
|
||||
|
||||
print "Save Build, Icons: %s" % ( len(build_data['icons']) )
|
||||
f = open(BUILD_DATA_PATH, 'w')
|
||||
f.write( json.dumps(build_data, indent=2, separators=(',', ': ')) )
|
||||
f.close()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"repo": "driftyco/ionicons",
|
||||
"development": {},
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.1",
|
||||
"styles": [
|
||||
"css/ionicons.css"
|
||||
],
|
||||
@@ -13,7 +13,7 @@
|
||||
"fonts/ionicons.eot",
|
||||
"fonts/ionicons.svg",
|
||||
"fonts/ionicons.ttf",
|
||||
"fonts/ionicons.woof"
|
||||
"fonts/ionicons.woff"
|
||||
],
|
||||
"description": "The premium icon font for Ionic Framework."
|
||||
}
|
||||
|
Before Width: | Height: | Size: 388 KiB After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 9.6 KiB |