Permalink
Browse files

Merge pull request #5 from yhourdel/master

I added the script to generate the font files
  • Loading branch information...
2 parents c1f321d + a6de8b6 commit c9bf9d16a732697b67da472eeb7646081fc0edc4 @somerandomdude committed Dec 19, 2011
Showing with 152 additions and 0 deletions.
  1. +48 −0 scripts/blank.sfd
  2. +104 −0 scripts/svg2fonts.py
View
@@ -0,0 +1,48 @@
+SplineFontDB: 3.0
+FontName: IconicStroke
+FullName: Untitled1
+FamilyName: Untitled1
+Weight: Medium
+Copyright: Created by Yann
+UComments: Generated with a script
+Version: 001.000
+ItalicAngle: 0
+UnderlinePosition: -100
+UnderlineWidth: 50
+Ascent: 800
+Descent: 200
+LayerCount: 2
+Layer: 0 0 "Arri+AOgA-re" 1
+Layer: 1 0 "Avant" 0
+XUID: [1021 148 206290082 11891293]
+OS2Version: 0
+OS2_WeightWidthSlopeOnly: 0
+OS2_UseTypoMetrics: 1
+CreationTime: 1323902948
+ModificationTime: 1323902948
+OS2TypoAscent: 0
+OS2TypoAOffset: 1
+OS2TypoDescent: 0
+OS2TypoDOffset: 1
+OS2TypoLinegap: 0
+OS2WinAscent: 0
+OS2WinAOffset: 1
+OS2WinDescent: 0
+OS2WinDOffset: 1
+HheadAscent: 0
+HheadAOffset: 1
+HheadDescent: 0
+HheadDOffset: 1
+OS2Vendor: 'PfEd'
+DEI: 91125
+Encoding: ISO8859-1
+UnicodeInterp: none
+NameList: Adobe Glyph List
+DisplaySize: -48
+AntiAlias: 1
+FitToEm: 1
+WinInfo: 27 27 9
+OnlyBitmaps: 1
+BeginChars: 256 0
+EndChars
+EndSplineFont
View
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+
+import fontforge
+
+letters = [
+ ["!", "home"],
+ ['"', "left_quote"],
+ ["#", "arrow_up_alt1"],
+ ["$", "arrow_right_alt1"],
+ ["%", "arrow_down_alt1"],
+ ["&", "move_horizontal_alt2"],
+ ["'", "left_quote_alt"],
+ ["(", "move_alt2"],
+ [")", "cursor"],
+ ["*", "move_vertical_alt2"],
+ ["+", "plus"],
+ [",", "headphones"],
+ ["-", "minus"],
+ [".", "read_more"],
+ ["/", "link"],
+ ["0", "lightbulb"],
+ ["1", "new_window"],
+ ["2", "dial"],
+ ["3", "arrow_up"],
+ ["4", "arrow_right"],
+ ["5", "arrow_down"],
+ ["6", "arrow_left"],
+ ["7", "move_horizontal"],
+ ["8", "move_vertical"],
+ ["9", "move"],
+ [":", "fullscreen"],
+ [";", "fullscreen_exit"],
+ ["<", "equalizer"],
+ ["=", "plus_alt"],
+ [">", "article"],
+ ["?", "image"],
+ ["@", "at"],
+ ["A", "calendar"],
+ ["E", "book_alt"],
+ ["J", "chat_alt_stroke"],
+ ["L", "lock_stroke"],
+ ["M", "mail"],
+ ["P", "pen"],
+ ["Q", "comment_alt2_stroke"],
+ ["V", "volume_mute"],
+ ["W", "cog"],
+ ["X", "x_alt"],
+ ["Y", "check_alt"],
+ ["Z", "beaker_alt"],
+ ["[", "spin"],
+ ["\\", "map_pin_stroke"],
+ ["]", "moon_stroke"],
+ ["^", "arrow_left_alt1"],
+ ["_", "minus_alt"],
+ ["`", "denied"],
+ ["a", "calendar_alt_stroke"],
+ ["b", "bolt"],
+ ["c", "clock"],
+ ["d", "document_stroke"],
+ ["e", "book"],
+ ["f", "magnifying_glass_alt"],
+ ["g", "tag_stroke"],
+ ["h", "heart_stroke"],
+ ["i", "info"],
+ ["j", "chat"],
+ ["k", "key_stroke"],
+ ["l", "unlock_stroke"],
+ ["m", "mail_alt"],
+ ["n", "iphone"],
+ ["o", "box"],
+ ["p", "pen_alt_stroke"],
+ ["q", "comment_stroke"],
+ ["r", "rss"],
+ ["s", "star"],
+ ["t", "trash_stroke"],
+ ["u", "user"],
+ ["v", "volume"],
+ ["w", "cog_alt"],
+ ["x", "x"],
+ ["y", "check"],
+ ["z", "beaker"],
+ ["{", "spin_alt"],
+ ["|", "pin"],
+ ["}", "sun"],
+ ["~", "eyedropper"]
+]
+
+font = fontforge.open('blank.sfd')
+
+for letter_config in letters:
+ char = letter_config[0]
+ file_name = letter_config[1]
+
+ c = font.createChar(ord(char))
+
+ c.importOutlines('../vector/' + file_name + '.svg')
+
+ c.left_side_bearing = 15
+ c.right_side_bearing = 15
+
+font.generate('iconic_stroke.svg')
+font.generate('iconic_stroke.ttf')
+font.generate('iconic_stroke.eot')
+font.generate('iconic_stroke.otf')

0 comments on commit c9bf9d1

Please sign in to comment.