1 #encoding: utf-8
2 import chardataeffect, inkex, string
4 convert_table = {\
5 'a': unicode("⠁", "utf-8"),\
6 'b': unicode("⠃", "utf-8"),\
7 'c': unicode("⠉", "utf-8"),\
8 'd': unicode("⠙", "utf-8"),\
9 'e': unicode("⠑", "utf-8"),\
10 'f': unicode("⠋", "utf-8"),\
11 'g': unicode("⠛", "utf-8"),\
12 'h': unicode("⠓", "utf-8"),\
13 'i': unicode("⠊", "utf-8"),\
14 'j': unicode("⠚", "utf-8"),\
15 'k': unicode("⠅", "utf-8"),\
16 'l': unicode("⠇", "utf-8"),\
17 'm': unicode("⠍", "utf-8"),\
18 'n': unicode("⠝", "utf-8"),\
19 'o': unicode("⠕", "utf-8"),\
20 'p': unicode("⠏", "utf-8"),\
21 'q': unicode("⠟", "utf-8"),\
22 'r': unicode("⠗", "utf-8"),\
23 's': unicode("⠎", "utf-8"),\
24 't': unicode("⠞", "utf-8"),\
25 'u': unicode("⠥", "utf-8"),\
26 'v': unicode("⠧", "utf-8"),\
27 'w': unicode("⠺", "utf-8"),\
28 'x': unicode("⠭", "utf-8"),\
29 'y': unicode("⠽", "utf-8"),\
30 'z': unicode("⠵", "utf-8"),\
31 }
33 class C(chardataeffect.CharDataEffect):
35 def process_chardata(self,text, line, par):
36 r = ""
37 for c in text:
38 if convert_table.has_key(c.lower()):
39 r = r + convert_table[c.lower()]
40 else:
41 r = r + c
42 return r
44 c = C()
45 c.affect()