Skip to content

Commit

Permalink
updated export to reflect size changes on font generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulon42 committed May 10, 2015
1 parent 50d57ad commit a26ba1a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Binary file modified font/osmic.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion font/osmic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified font/osmic.ttf
Binary file not shown.
Binary file modified font/osmic.woff
Binary file not shown.
8 changes: 4 additions & 4 deletions tools/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def main():
os.remove(icon_out_path)

if config['format'] == 'font':
exportFont(config['output'], config['font']['output'])
exportFont(config['output'], config['font']['output'], size)

# generate sprite
if config['format'] == 'sprite':
Expand Down Expand Up @@ -309,13 +309,13 @@ def exportPNG(source, destination, dpi, retina):


# export icon font
def exportFont(source, destination):
def exportFont(source, destination, size):
# TODO Windows?
try:
subprocess.call(['fontcustom', 'compile', source, '--force', '--output=' + destination, '--font-name=osmic', '--no-hash', '--font-design-size=14', '--css-selector=.oc-{{glyph}}'])
subprocess.call(['fontcustom', 'compile', source, '--force', '--output=' + destination, '--font-name=osmic', '--no-hash', '--font-design-size=' + str(size), '--css-selector=.oc-{{glyph}}'])
except OSError:
# fontcustom is not installed
sys.exit('Export as icon font requires fontcustom. See http://fontcustom.com. Exiting.')
sys.exit('Export as icon font requires Font Custom. See http://fontcustom.com. Exiting.')
return


Expand Down

0 comments on commit a26ba1a

Please sign in to comment.