source: buchla-68k/font/svg-font.py

Last change on this file was 018c029, checked in by Thomas Lopatic <thomas@…>, 5 years ago

Create web fonts.

  • Property mode set to 100755
File size: 624 bytes
Line 
1#!/usr/bin/python
2
3import fontforge
4
5font = fontforge.font()
6
7font.ascent = 2816
8font.descent = 256
9font.em = 3072
10font.upos = -256
11
12font.copyright = ""
13
14font.fontname = "Buchla"
15font.familyname = "Buchla"
16font.fullname = ""
17
18for i in range(0, 256):
19 if i < 32:
20 code = 10240 + i
21 elif i < 127:
22 code = i
23 else:
24 code = (10240 + 32) + (i - 127);
25
26 print("importing {:04x}".format(code))
27
28 glyph = font.createChar(code)
29 glyph.width = 2048
30
31 glyph.importOutlines("glyphs/{:04x}.svg".format(code))
32
33font.generate("buchla.woff")
34font.generate("buchla.ttf")
35font.generate("buchla.eot")
Note: See TracBrowser for help on using the repository browser.