Skip to content
Browse files

minor changes

  • Loading branch information...
1 parent 73b1d27 commit fb1612066c8ec400fe4125fb280bcd697f9c92a9 nagi committed Oct 2, 2010
Showing with 18 additions and 7 deletions.
  1. +1 −1 fontcreator/config.cfg
  2. +1 −0 fontcreator/crazyfonter.py
  3. +1 −1 fontcreator/misc/useg_zurlaga_atom
  4. +15 −5 fontcreator/mongoluseg.py
View
2 fontcreator/config.cfg
@@ -19,5 +19,5 @@ GLYPHS_DIR = /tmp/svgs
[Mongol useg]
USEG_ATOM = misc/useg_zurlaga_atom
USEG_DESC = misc/useg_zurlaga_desc
-ATOM_FOLDER = atoms
+ATOM_FOLDER = /tmp/atoms
GLYPH_OUT = /tmp/glyphs
View
1 fontcreator/crazyfonter.py
@@ -6,6 +6,7 @@
# |_| |_|\___/|_| \_|\____|\___/|_____| \___/|____/|_____\____|
#
# crazy font creator
+# Author: nagi (natsag2000@googlemail.com)
#
import fontforge
View
2 fontcreator/misc/useg_zurlaga_atom
@@ -47,7 +47,7 @@ number9
орхиц orhits # Орхиц
норхиц norhits # Орхиц урдаа цэгтэй
оготорсүүл ogotor # Оготор сүүл жишээ нь Т дангаараа орох үед хэрэгтэй
-и-сүүлд ilast # И төгсгөлд
+и-сүүлд ifina # И төгсгөлд
шилбэ shilbe # Шилбэ
гэдэс gedes # Гэдэс, у дунд орсон хэлбэр
гэдэс-сүүлд gedesfina # Гэдэс сүүлд орсон хэлбэр
View
20 fontcreator/mongoluseg.py
@@ -6,6 +6,7 @@
# |_| |_|\___/|_| \_|\____|\___/|_____| \___/|____/|_____\____|
#
# crazy useg creator
+# Author: nagi (natsag2000@googlemail.com)
#
import ConfigParser
import subprocess
@@ -28,26 +29,35 @@ def main():
usegdesc = readlines(USEG_DESC)
atoms = read_atoms(usegatoms)
descs = read_desc(usegdesc)
- useg_uusge(atoms, descs, GLYPH_OUT)
+ useg_uusge(atoms, descs, ATOM_FOLDER, GLYPH_OUT)
-def useg_uusge(Atoms, Desc, AFolder):
+def useg_uusge(Atoms, Desc, AFolder, OFolder):
atomkeys = Atoms.keys()
for Name, Instr in Desc.items():
li = []
for I in splitAndStrip(Instr, ' '):
if not I in atomkeys:
- print Name, ':', "Key not found: ", I
- break
+ if isNumber(I):
+ li.append("--margin "+I)
+ continue
+ else:
+ print Name, ':', "Key not found: ", I
+ break
if I == ' ' or I == '':
continue
li.append(AFolder+'/' + Atoms[I] + '.svg')
- Cmd = 'pythonx ' + " ".join(li) + ' > ' + AFolder +'/'+Name + '.svg'
+ Cmd = 'svg_stack.py ' + " --margin -10 ".join(li) + ' > ' + OFolder +'/'+Name + '.svg'
Cmd1 = Cmd.split(' ')
if not subprocess.call(Cmd, shell=True) == 0:
print "Not created: " + Cmd
else:
print Name, " created succesfully!"
+def isNumber(Str):
+ if Str.startswith("-") or Str.startswith("+"):
+ return Str[1:].isdigit()
+ return Str.isdigit()
+
def read_atoms(List):
dic = dict()
for L in List:

0 comments on commit fb16120

Please sign in to comment.
Something went wrong with that request. Please try again.