Merge lp:~glyphobet/inkscape/alphabet_soup into lp:~inkscape.dev/inkscape/trunk

Proposed by Glyphobet
Status: Merged
Approved by: jazzynico
Approved revision: 10469
Merged at revision: 10473
Proposed branch: lp:~glyphobet/inkscape/alphabet_soup
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 528 lines (+121/-52)
32 files modified
share/extensions/alphabet_soup/Cblob.svg (+1/-1)
share/extensions/alphabet_soup/Chook.svg (+1/-1)
share/extensions/alphabet_soup/Eb.svg (+1/-1)
share/extensions/alphabet_soup/Et.svg (+1/-1)
share/extensions/alphabet_soup/G.svg (+1/-1)
share/extensions/alphabet_soup/IBSerif.svg (+1/-1)
share/extensions/alphabet_soup/ITSerif.svg (+1/-1)
share/extensions/alphabet_soup/Lb.svg (+1/-1)
share/extensions/alphabet_soup/Lt.svg (+1/-1)
share/extensions/alphabet_soup/Oterm.svg (+1/-1)
share/extensions/alphabet_soup/P.svg (+1/-1)
share/extensions/alphabet_soup/Q.svg (+1/-1)
share/extensions/alphabet_soup/Vser.svg (+1/-1)
share/extensions/alphabet_soup/Xvt.svg (+1/-1)
share/extensions/alphabet_soup/abase.svg (+1/-1)
share/extensions/alphabet_soup/barcap.svg (+1/-1)
share/extensions/alphabet_soup/gamma.svg (+1/-1)
share/extensions/alphabet_soup/h.svg (+1/-1)
share/extensions/alphabet_soup/hcap.svg (+1/-1)
share/extensions/alphabet_soup/j.svg (+1/-1)
share/extensions/alphabet_soup/lserif.svg (+1/-1)
share/extensions/alphabet_soup/m.svg (+1/-1)
share/extensions/alphabet_soup/mcap.svg (+1/-1)
share/extensions/alphabet_soup/o.svg (+1/-1)
share/extensions/alphabet_soup/ocap.svg (+1/-1)
share/extensions/alphabet_soup/question.svg (+1/-1)
share/extensions/alphabet_soup/rcap.svg (+1/-1)
share/extensions/alphabet_soup/tserif.svg (+2/-8)
share/extensions/alphabet_soup/vcap.svg (+1/-1)
share/extensions/alphabet_soup/vserl.svg (+1/-1)
share/extensions/render_alphabetsoup.inx (+1/-1)
share/extensions/render_alphabetsoup.py (+89/-14)
To merge this branch: bzr merge lp:~glyphobet/inkscape/alphabet_soup
Reviewer Review Type Date Requested Status
jazzynico (community) Approve
Review via email: mp+68203@code.launchpad.net

Description of the change

These changes fix some longstanding bugs in the Render -> Alphabet Soup extension. Bugs that are fixed:

* The components which are assembled into letters did not line up perfectly
* The extension did not expose Alphabet Soup's "randomize" mode, which generates random, letter-like symbols instead of weird letters.
* The assembly process reflected paths and thus generated counterclockwise paths, which sometimes caused white areas of overlap.

I'm the original author of Alphabet Soup, but Joel Holdsworth was the one who ported it to an Inkscape extension.

I haven't touched anything outside of the Alphabet Soup extension, so this should merge cleanly into any branch. I've tried to keep the changes as minimal as possible and in line with code formatting conventions. Please let me know if there's anything else I can do to get these changes merged into whatever branch you feel is appropriate.

To post a comment you must log in.
Revision history for this message
jazzynico (jazzynico) wrote :

Tested successfully on Windows XP, Inkscape trunk revision 10466.
Just a minor UI consistency fix needed in the INX file, _gui-text="Randomize:" should be _gui-text="Randomize" (no colon with boolean labels).
Thanks for the corrections!

review: Needs Fixing
lp:~glyphobet/inkscape/alphabet_soup updated
10469. By Glyphobet

boolean labels shouldn't have colons

Revision history for this message
Glyphobet (glyphobet) wrote :

> Tested successfully on Windows XP, Inkscape trunk revision 10466.
> Just a minor UI consistency fix needed in the INX file, _gui-text="Randomize:"
> should be _gui-text="Randomize" (no colon with boolean labels).
> Thanks for the corrections!

Label is fixed. Thanks for the speedy review! Do I need to propose it for merging again?

Revision history for this message
jazzynico (jazzynico) wrote :

> Do I need to propose it for merging again?

No, the diff is automatically updated.

review: Approve
Revision history for this message
jazzynico (jazzynico) wrote :

Branch merged, trunk revision 10473.
Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/extensions/alphabet_soup/Cblob.svg'
2--- share/extensions/alphabet_soup/Cblob.svg 2008-12-10 21:36:50 +0000
3+++ share/extensions/alphabet_soup/Cblob.svg 2011-07-18 20:31:26 +0000
4@@ -6,5 +6,5 @@
5 width="864"
6 height="648">
7 <path
8- d="M 432,432 C 483.35068,432.05187 514.50621,414.91209 547.74987,377.43357 C 553.86023,366.99152 553.90447,366.48196 549.10143,361.86677 C 542.63049,355.64891 540.54636,350.80909 540.54636,342 C 540.49227,326.31992 552.00549,316.34875 567,315.54636 C 590.16466,316.18468 595.48079,334.58161 593.06817,354.41343 C 585.62156,415.62493 522.34607,462.89212 443.42345,467.61056 C 439.61563,467.83821 435.80782,468.06586 432,468.29351 L 432,432 z"/>
9+ d="m 432,432 c 51.35068,0.0519 82.50621,-17.08791 115.74987,-54.56643 6.11036,-10.44205 6.1546,-10.95161 1.35156,-15.5668 -6.47094,-6.21786 -8.55507,-11.05768 -8.55507,-19.86677 -0.0541,-15.68008 11.45913,-25.65125 26.45364,-26.45364 23.16466,0.63832 28.48079,19.03525 26.06817,38.86707 C 571.0029,436.23549 512.75953,467.88531 432,468 l 0,-36 z"/>
10 </svg>
11
12=== modified file 'share/extensions/alphabet_soup/Chook.svg'
13--- share/extensions/alphabet_soup/Chook.svg 2008-12-10 21:36:50 +0000
14+++ share/extensions/alphabet_soup/Chook.svg 2011-07-18 20:31:26 +0000
15@@ -6,5 +6,5 @@
16 width="864"
17 height="648">
18 <path
19- d="M 432,36 L 432,0.70648772 C 467.12642,1.1207235 500.19031,10.978322 531,27.408775 C 536.225,30.593268 542.17901,33.437152 544.23113,33.728519 C 551.95635,34.825369 558,29.837576 558,22.365141 L 558,18 L 576,18 L 576,126 L 558.27619,126 C 553.02167,64.41188 486.96487,36 432,36 z"/>
20+ d="m 432,36 0,-36 c 35.12642,0.15801183 68.19031,10.978322 99,27.408775 5.225,3.184493 11.17901,6.028377 13.23113,6.319744 C 551.95635,34.825369 558,29.837576 558,22.365141 L 558,18 l 18,0 0,108 -17.72381,0 C 553.02167,64.41188 486.96487,36 432,36 z"/>
21 </svg>
22
23=== modified file 'share/extensions/alphabet_soup/Eb.svg'
24--- share/extensions/alphabet_soup/Eb.svg 2008-12-10 21:36:50 +0000
25+++ share/extensions/alphabet_soup/Eb.svg 2011-07-18 20:31:26 +0000
26@@ -6,5 +6,5 @@
27 width="864"
28 height="648">
29 <path
30- d="M 234,450.23743 C 244.37552,448.73762 249.81245,441.63048 252.23743,432 L 432,432 L 432,468 L 234,468 L 234,450.23743 z"/>
31+ d="M 234,450.23743 C 243.83007,450.1558 251.21138,441.4123 252,432 l 180,0 0,36 -198,0 0,-17.76257 z"/>
32 </svg>
33
34=== modified file 'share/extensions/alphabet_soup/Et.svg'
35--- share/extensions/alphabet_soup/Et.svg 2008-12-10 21:36:50 +0000
36+++ share/extensions/alphabet_soup/Et.svg 2011-07-18 20:31:26 +0000
37@@ -6,5 +6,5 @@
38 width="864"
39 height="648">
40 <path
41- d="M 251.17613,31.368729 C 249.56512,25.345319 244.65468,20.434883 238.63127,18.823867 L 234,17.58519 L 234,9.2925952 L 234,1 L 333,1 L 432,1 L 432,18.5 L 432,36 L 342.2074,36 L 252.41481,36 L 251.17613,31.368729 z "/>
42+ d="M 234,17.58519 234,0 432,0 432,36 252,36 C 251.9603,23.895333 246.34816,17.721488 234,17.58519 z"/>
43 </svg>
44
45=== modified file 'share/extensions/alphabet_soup/G.svg'
46--- share/extensions/alphabet_soup/G.svg 2008-12-10 21:36:50 +0000
47+++ share/extensions/alphabet_soup/G.svg 2011-07-18 20:31:26 +0000
48@@ -6,5 +6,5 @@
49 width="864"
50 height="648">
51 <path
52- d="M 432,432.25825 C 474.76518,430.45997 516.4134,399.01191 521.0448,354.62003 L 521.0448,299.42692 C 520.54691,291.3582 511.0076,289.45944 504,287.58519 L 504,270 L 612,270 L 612,287.58519 C 604.95991,288.94718 599.47776,292.02235 595.89633,298.4214 L 595.89633,397.21641 C 557.61928,448.03031 492.7847,465.36976 432,468.30395 L 432,432.25825 z"/>
53+ d="m 432,432 c 40.73753,0.0266 88.26593,-36.02956 89.0448,-77.37997 l 0,-48.62003 C 520.74967,296.51193 512.02142,287.43179 504,287.58519 L 504,270 l 108,0 0,17.58519 C 603.54056,287.1223 595.2197,296.35671 595.89633,306 l 0,91.21641 C 557.61928,448.03031 481.8354,468.10728 432,468 l 0,-36 z" />
54 </svg>
55
56=== modified file 'share/extensions/alphabet_soup/IBSerif.svg'
57--- share/extensions/alphabet_soup/IBSerif.svg 2008-12-10 21:36:50 +0000
58+++ share/extensions/alphabet_soup/IBSerif.svg 2011-07-18 20:31:26 +0000
59@@ -6,5 +6,5 @@
60 width="864"
61 height="648">
62 <path
63- d="M 234,450.41481 C 244.50437,448.78945 249.81733,441.71165 252.41481,432 L 341.58519,432 C 343.21055,442.50437 350.28835,447.81733 360,450.41481 L 360,468 L 234,468 L 234,450.41481 z"/>
64+ d="m 234,450.41481 c 10.36553,-0.16751 18.17938,-8.842 18,-18.41481 l 90,0 c 0.30635,10.08784 8.28835,17.76285 18,18 l 0,18 -126,0 0,-17.58519 z"/>
65 </svg>
66
67=== modified file 'share/extensions/alphabet_soup/ITSerif.svg'
68--- share/extensions/alphabet_soup/ITSerif.svg 2008-12-10 21:36:50 +0000
69+++ share/extensions/alphabet_soup/ITSerif.svg 2011-07-18 20:31:26 +0000
70@@ -6,5 +6,5 @@
71 width="864"
72 height="648">
73 <path
74- d="M 216,17.58519 L 216,1 L 342,1 L 342,17.58519 C 331.49563,19.210548 326.18267,26.288348 323.58519,36 L 234.41481,36 C 232.78945,25.495637 225.71166,20.182664 216,17.58519 z" />
75+ d="m 216,18 0,-18 126,0 0,18 c -9.949,0.167507 -17.90169,8.010662 -18,18 l -90,0 C 233.69365,25.703901 225.43397,18.167722 216,18 z"/>
76 </svg>
77
78=== modified file 'share/extensions/alphabet_soup/Lb.svg'
79--- share/extensions/alphabet_soup/Lb.svg 2008-12-10 21:36:50 +0000
80+++ share/extensions/alphabet_soup/Lb.svg 2011-07-18 20:31:26 +0000
81@@ -6,5 +6,5 @@
82 width="864"
83 height="648">
84 <path
85- d="M 432,432 L 557.34775,432 C 572.03193,431.57641 575.48665,419.42011 576,406.53212 L 576,396 L 594,396 L 594,468 L 432,468 L 432,432 z"/>
86+ d="m 432,432 117,0 c 14.59492,-0.0666 26.75442,-13.39796 27,-27 l 0,-9 18,0 0,72 -162,0 0,-36 z"/>
87 </svg>
88
89=== modified file 'share/extensions/alphabet_soup/Lt.svg'
90--- share/extensions/alphabet_soup/Lt.svg 2008-12-10 21:36:50 +0000
91+++ share/extensions/alphabet_soup/Lt.svg 2011-07-18 20:31:26 +0000
92@@ -6,5 +6,5 @@
93 width="864"
94 height="648">
95 <path
96- d="M 576,61.467881 C 577.08469,43.108337 568.04996,36.667214 551.79944,36 L 432,36 L 432,1 L 594,1 L 594,72 L 576,72 L 576,61.467881 z"/>
97+ d="M 576,61.467881 C 575.8351,48.463709 564.09019,35.953164 549,36 l -117,0 0,-36 162,0 0,72 -18,0 0,-10.532119 z"/>
98 </svg>
99
100=== modified file 'share/extensions/alphabet_soup/Oterm.svg'
101--- share/extensions/alphabet_soup/Oterm.svg 2008-12-10 21:36:50 +0000
102+++ share/extensions/alphabet_soup/Oterm.svg 2011-07-18 20:31:26 +0000
103@@ -6,5 +6,5 @@
104 width="864"
105 height="648">
106 <path
107- d="M 432,432.28491 C 519.05219,420.92031 539.41198,305.43476 539.90939,235.96367 C 540.39442,168.22112 519.19629,44.828918 432,35.715087 L 432,0 C 560.22504,1.9563018 630.31985,120.47734 629.90669,235.8117 C 629.50331,348.41772 555.79773,468 432,468 L 432,432.28491 z" />
108+ d="M 432,432.28491 C 520.9663,433.84056 539.41817,304.57049 539.90939,235.96367 540.40061,167.35685 519.19629,35.736893 432,35.715087 L 432,0 C 560.70357,0.52071898 630.31496,121.84151 629.90669,235.8117 629.49842,349.78189 555.79773,468 432,468 l 0,-35.71509 z"/>
109 </svg>
110
111=== modified file 'share/extensions/alphabet_soup/P.svg'
112--- share/extensions/alphabet_soup/P.svg 2008-12-10 21:36:50 +0000
113+++ share/extensions/alphabet_soup/P.svg 2011-07-18 20:31:26 +0000
114@@ -6,5 +6,5 @@
115 width="864"
116 height="648">
117 <path
118- d="M 432,216 C 479.35472,215.49184 502.54401,167.21061 503.44374,126 C 504.34347,84.789388 477.64109,36 432,36 C 432,24.235496 432,12.470992 432,0.70648772 C 504.20013,1.905354 593.35821,43.100442 593.33321,126.5 C 593.30821,209.89956 505.7797,247.8826 432,252.29351 C 432,240.19567 432,228.09784 432,216 z"/>
119+ d="m 432,216 c 47.35472,-0.50816 70.54401,-48.78939 71.44374,-90 C 504.34347,84.789389 477.64109,36 432,36 432,24.235496 432,11.764504 432,0 503.94288,0.16988052 593.35821,43.100441 593.33321,126.5 593.30821,209.89956 504.23622,251.96228 432,252 c 0,-12.09784 0,-23.90216 0,-36 z"/>
120 </svg>
121
122=== modified file 'share/extensions/alphabet_soup/Q.svg'
123--- share/extensions/alphabet_soup/Q.svg 2008-12-10 21:36:50 +0000
124+++ share/extensions/alphabet_soup/Q.svg 2011-07-18 20:31:26 +0000
125@@ -6,5 +6,5 @@
126 width="864"
127 height="648">
128 <path
129- d="M 526.32135,439.9524 C 498.13523,459.02351 465.23453,465.28151 432,468.30558 C 432.02713,456.20377 431.96306,444.10178 432,432 C 523.6997,415.67832 539.38316,302.39981 539.38316,234 C 539.38316,165.47354 516.9063,43.985213 432,36 L 432,-0.30557714 C 556.71815,4.8200503 628.82893,118.48894 629.44733,234 C 630.4116,299.68807 606.28121,362.36397 561.98439,410.7975 C 578.58768,433.83295 602.18706,447.65055 630,451.44316 L 630,469 C 592.94051,470.08844 559.04645,455.55561 526.32135,439.9524 z"/>
130+ d="M 526.32135,439.9524 C 498.13523,459.02351 460.91524,468.33538 432,468 c 0.0271,-12.10181 -0.0369,-23.89822 0,-36 C 505.94261,431.996 539.38316,302.46313 539.38316,234 539.38316,165.53687 513.54685,35.82655 432,36 l 0,-36 c 120.87878,0.32641387 196.43844,118.49285 197.44733,234 0.57378,65.69198 -23.16612,128.36397 -67.46294,176.7975 C 578.58768,433.83295 602.18706,446.20739 630,450 l 0,18 c -37.05949,1.08844 -70.95355,-12.44439 -103.67865,-28.0476 z"/>
131 </svg>
132
133=== modified file 'share/extensions/alphabet_soup/Vser.svg'
134--- share/extensions/alphabet_soup/Vser.svg 2008-12-10 21:36:50 +0000
135+++ share/extensions/alphabet_soup/Vser.svg 2011-07-18 20:31:26 +0000
136@@ -6,5 +6,5 @@
137 width="864"
138 height="648">
139 <path
140- d="M 234,18 L 234,0 L 328,0 L 328,18 L 321.42308,18 C 315.4772,17.537933 309.60446,20.486336 309,26.923077 L 309,30 L 306,30 L 306,18 L 270,18 L 270,33 L 257.02684,33 C 253.75659,21.992194 245.07284,18.057219 234,18 z M 594,18 L 522,18 L 522,30 L 519.13647,30 C 519.04442,29.519594 519,27.355241 519,26.636364 C 518.70573,19.373435 512.35553,18.083131 506.36364,18 L 499,18 L 499,0 L 630,0 L 630,18 L 625.5651,18 C 616.691,17.782578 608.53626,24.060156 607.3906,33 L 594,33 L 594,18 z"/>
141+ d="m 234,18 0,-18 94,0 0,18 -6.57692,0 c -5.94588,-0.462067 -11.16407,6.690532 -8.71399,14 L 309,32 l -3,0 0,-14 -36,0 0.43636,14 -15.80952,0 C 251.35659,20.992194 245.07284,18.057219 234,18 z m 360,0 -72,0 0,14 -2.86353,0 c -0.0921,-0.480406 -3.84556,0.500695 -3.84556,-0.218182 C 517.61482,24.518889 512.35553,18.083131 506.36364,18 L 499,18 l 0,-18 131,0 0,18 -4.4349,0 c -8.8741,-0.217422 -13.97429,5.278338 -16.21086,14 L 594,32 594,18 z"/>
142 </svg>
143
144=== modified file 'share/extensions/alphabet_soup/Xvt.svg'
145--- share/extensions/alphabet_soup/Xvt.svg 2008-12-10 21:36:50 +0000
146+++ share/extensions/alphabet_soup/Xvt.svg 2011-07-18 20:31:26 +0000
147@@ -6,5 +6,5 @@
148 width="864"
149 height="648">
150 <path
151- d="M 252,36.41384 C 252.29636,26.645119 244.96885,23.022186 238.47878,18.021962 L 342,18 L 342,234 L 252,234 L 252,36.41384 z"/>
152+ d="m 252,36 c 0.29636,-9.768721 -7.64197,-18.037114 -18,-18 l 108,0 0,216 -90,0 0,-198 z"/>
153 </svg>
154
155=== modified file 'share/extensions/alphabet_soup/abase.svg'
156--- share/extensions/alphabet_soup/abase.svg 2008-12-10 21:36:50 +0000
157+++ share/extensions/alphabet_soup/abase.svg 2011-07-18 20:31:26 +0000
158@@ -6,5 +6,5 @@
159 width="864"
160 height="648">
161 <path
162- d="M 396.54555,271.5 C 403.73674,198.51344 458.75438,180.0647 522,179.73419 L 522,197.72815 C 488.98342,201.50437 470.83028,236.95708 470.83028,264.55678 L 467.86228,396 L 395.91491,396 L 396.54555,271.5 z"/>
163+ d="m 396,271.5 c 0.33614,-72.76543 62.75438,-91.16949 126,-91.5 l 0,18 c -33.67997,-0.42526 -54,38.9573 -54,66.557 l 0,131.443 -72,0 0,-124.5 z"/>
164 </svg>
165
166=== modified file 'share/extensions/alphabet_soup/barcap.svg'
167--- share/extensions/alphabet_soup/barcap.svg 2008-03-18 23:02:45 +0000
168+++ share/extensions/alphabet_soup/barcap.svg 2011-07-18 20:31:26 +0000
169@@ -6,5 +6,5 @@
170 width="864"
171 height="648">
172 <path
173- d="M 252.24192,36.664455 L 341.6763,36.664455 L 341.6763,431.93248 L 252.24192,431.93248 L 252.24192,36.664455 z"/>
174+ d="m 252,36 90,0 0,396 -90,0 0,-396 z"/>
175 </svg>
176
177=== modified file 'share/extensions/alphabet_soup/gamma.svg'
178--- share/extensions/alphabet_soup/gamma.svg 2008-12-10 21:36:50 +0000
179+++ share/extensions/alphabet_soup/gamma.svg 2011-07-18 20:31:26 +0000
180@@ -6,5 +6,5 @@
181 width="864"
182 height="648">
183 <path
184- d="M 413.74236,645.64547 C 383.0319,635.17985 363.9313,598.29804 370.41198,561.97779 C 372.2609,551.61571 374.419,546.6985 395.41883,505 L 413.80063,468.5 L 450.19937,468.5 L 468.58117,505 C 489.581,546.6985 491.7391,551.61571 493.58802,561.97779 C 499.03048,592.47942 487.00637,623.14961 463.42158,638.92408 C 449.05594,648.48459 430.22428,650.72284 413.74236,645.64547 z M 441.26639,611.4249 C 453.76562,607.16598 466.11947,585.75784 461.95112,567 C 460.95667,562.52492 433.16738,505 432,505 C 430.83262,505 403.04333,562.52492 402.04888,567 C 398.82769,581.49556 403.43305,596.9298 413.66762,605.93863 C 421.31834,612.67306 428.76716,615.68381 441.26639,611.4249 z"/>
185+ d="M 413.74236,645.64547 C 383.0319,635.17985 363.9313,598.29804 370.41198,561.97779 372.2609,551.61571 374.419,546.6985 395.41883,505 l 18.3818,-37 36.39874,0 18.3818,37 c 20.99983,41.6985 23.15793,46.61571 25.00685,56.97779 5.44246,30.50163 -6.58165,61.17182 -30.16644,76.94629 -14.36564,9.56051 -33.1973,11.79876 -49.67922,6.72139 z M 441.26639,611.4249 C 453.76562,607.16598 466.11947,585.75784 461.95112,567 460.95667,562.52492 433.16738,505 432,505 c -1.16738,0 -28.95667,57.52492 -29.95112,62 -3.22119,14.49556 1.38417,29.9298 11.61874,38.93863 7.65072,6.73443 15.09954,9.74518 27.59877,5.48627 z"/>
186 </svg>
187
188=== modified file 'share/extensions/alphabet_soup/h.svg'
189--- share/extensions/alphabet_soup/h.svg 2008-12-10 21:36:50 +0000
190+++ share/extensions/alphabet_soup/h.svg 2011-07-18 20:31:26 +0000
191@@ -6,5 +6,5 @@
192 width="864"
193 height="648">
194 <path
195- d="M 575.2219,287.78922 C 574.2749,253.72932 561.8497,203.19019 522,197.72815 L 522,179.73419 C 590.28223,178.93273 647.45445,205.07873 647.45445,271.5 L 648.08509,396 L 576.13772,396 L 575.2219,287.78922 z"/>
196+ d="M 575.2219,287.78922 C 575.1595,253.50817 561.4074,197.88262 522,197.72815 l 0,-17.99396 c 68.28223,0.0831 125.45445,25.34454 125.45445,91.76581 l 0.63064,124.5 -71.94737,0 -0.91582,-108.21078 z"/>
197 </svg>
198
199=== modified file 'share/extensions/alphabet_soup/hcap.svg'
200--- share/extensions/alphabet_soup/hcap.svg 2008-03-18 23:02:45 +0000
201+++ share/extensions/alphabet_soup/hcap.svg 2011-07-18 20:31:26 +0000
202@@ -6,5 +6,5 @@
203 width="864"
204 height="648">
205 <path
206- d="M 340,214 L 434,214 L 434,254 L 340,254 L 340,214 z"/>
207+ d="m 342,216 90,0 0,36 -90,0 0,-36 z"/>
208 </svg>
209
210=== modified file 'share/extensions/alphabet_soup/j.svg'
211--- share/extensions/alphabet_soup/j.svg 2008-12-10 21:36:50 +0000
212+++ share/extensions/alphabet_soup/j.svg 2011-07-18 20:31:26 +0000
213@@ -6,5 +6,5 @@
214 width="864"
215 height="648">
216 <path
217- d="M 522,1 L 522,17.742339 C 481.28616,23.49216 468.03999,72.416193 468,108 L 395.76701,108 C 400.36091,43.138368 460.53099,1.2823612 522,1 z" />
218+ d="m 522,0 0,18 c -40.93265,-0.04875 -53.96001,54.416193 -54,90 l -72,0 C 396.21762,44.123031 460.42158,0.17295425 522,0 z"/>
219 </svg>
220
221=== modified file 'share/extensions/alphabet_soup/lserif.svg'
222--- share/extensions/alphabet_soup/lserif.svg 2008-12-10 21:36:50 +0000
223+++ share/extensions/alphabet_soup/lserif.svg 2011-07-18 20:31:26 +0000
224@@ -6,5 +6,5 @@
225 width="864"
226 height="648">
227 <path
228- d="M 377.93068,432.20912 L 377.93068,414.43335 C 388.46323,412.80461 393.80806,405.7463 396.41481,396 L 468,396 L 468,467.95278 L 377.93068,432.20912 z"/>
229+ d="m 377.93068,432.20912 0,-17.77577 C 387.72752,413.90818 396.04182,405.2313 396,396 l 72,0 0,71.95278 -90.06932,-35.74366 z"/>
230 </svg>
231
232=== modified file 'share/extensions/alphabet_soup/m.svg'
233--- share/extensions/alphabet_soup/m.svg 2008-12-10 21:36:50 +0000
234+++ share/extensions/alphabet_soup/m.svg 2011-07-18 20:31:26 +0000
235@@ -6,5 +6,5 @@
236 width="864"
237 height="648">
238 <path
239- d="M 576.13772,280.98105 C 572.44938,248.84942 559.30603,202.84155 522,197.72815 L 522,179.73419 C 565.19741,177.92174 604.08134,192.77489 630.21232,227.91572 C 647.33056,203.82949 672.66121,186.57085 702,182.25038 L 702,197.74234 C 662.1276,207.18202 650.05284,246.25281 648,282.69287 L 648,396 L 576.13772,396 L 576.13772,280.98105 z"/>
240+ d="M 576.13772,280.98105 C 576.87501,248.84942 559.52731,198.85849 522,197.72815 L 522,180 c 43.19741,0.40036 82.08134,12.77489 108.21232,47.91572 C 647.33056,203.82949 664.91637,180.11613 702,180 l 0,17.74234 c -31.68499,-0.0754 -53.93869,48.95303 -54,84.95053 L 648,396 l -71.86228,0 0,-115.01895 z"/>
241 </svg>
242
243=== modified file 'share/extensions/alphabet_soup/mcap.svg'
244--- share/extensions/alphabet_soup/mcap.svg 2008-03-18 23:02:45 +0000
245+++ share/extensions/alphabet_soup/mcap.svg 2011-07-18 20:31:26 +0000
246@@ -6,5 +6,5 @@
247 width="864"
248 height="648">
249 <path
250- d="M 195.07094,35.141836 C 192.93943,26.618646 186.69352,21 178,21 L 178,0 L 300,0 C 304.92852,4.0636792 307.05515,13.545636 308.01012,20 L 290,20 L 290,434 L 196,434 C 194.50054,301.07612 198.17114,168.04946 195.07094,35.141836 z M 574,56 L 556,56 L 556,20 L 520,20 C 520.33022,13.651854 521.21314,4.0134453 526.71404,1.1368684e-13 L 686,1.1368684e-13 L 686,21 C 676.96001,20.374092 671.60532,27.237265 668.92906,35.141836 L 668,434 L 574,434 L 574,56 z"/>
251+ d="M 198,36 C 197.9768,27.008298 190.09906,18 180,18 L 180,0 302.81899,0 308.4585,18.042372 288,18.042 288,432 l -90,0 0,-396 z m 378,20 -20,0 0,-38 -36,0 L 525.63278,0 686,0 l 0,18 c -9.03999,-0.625908 -20.60333,7.51861 -20,18 l 0,396 -90,0 0,-376 z"/>
252 </svg>
253
254=== modified file 'share/extensions/alphabet_soup/o.svg'
255--- share/extensions/alphabet_soup/o.svg 2008-12-10 21:36:50 +0000
256+++ share/extensions/alphabet_soup/o.svg 2011-07-18 20:31:26 +0000
257@@ -6,5 +6,5 @@
258 width="864"
259 height="648">
260 <path
261- d="M 396.40448,322.99577 C 395.58905,253.10571 448.00479,180 522,180 L 522,197.5267 C 484.55576,207.67232 469.05389,282.8807 468.5,324 C 469.24734,364.1501 484.83088,440.79214 522,450.4733 L 522,468 C 445.49339,467.3577 397.16518,393.82612 396.40448,322.99577 z"/>
262+ d="M 396.40448,322.99577 C 395.61641,252.63556 448.00479,180 522,180 l 0,17.5267 c -37.73872,0.42783 -53.59673,85.8386 -53.5,126.4733 0.0967,40.6347 16.33088,126.80441 53.5,126.4733 L 522,468 C 445.49339,467.3577 397.19254,393.35597 396.40448,322.99577 z"/>
263 </svg>
264
265=== modified file 'share/extensions/alphabet_soup/ocap.svg'
266--- share/extensions/alphabet_soup/ocap.svg 2008-03-18 23:02:45 +0000
267+++ share/extensions/alphabet_soup/ocap.svg 2011-07-18 20:31:26 +0000
268@@ -6,5 +6,5 @@
269 width="864"
270 height="648">
271 <path
272- d="M 232,234 C 233.66926,111.97403 302.98118,0.35957946 434,0.35957946 L 434,39 C 349.8511,41.371236 327.49239,172.9012 327.43561,239.14817 C 326.36353,301.17293 356.5529,429 434,429 L 434,470 C 304.64047,469.72235 234.79031,354.23983 232,234 z"/>
273+ d="M 232,234 C 231.43948,112.8671 300.98118,0 432,0 l 0,36 C 347.8511,35.970211 328.00004,169.86413 327.43561,234 326.87118,298.13587 354.5529,432 432,432 l 0,36 C 302.64047,467.72235 232.56052,355.1329 232,234 z"/>
274 </svg>
275
276=== modified file 'share/extensions/alphabet_soup/question.svg'
277--- share/extensions/alphabet_soup/question.svg 2008-03-18 23:02:45 +0000
278+++ share/extensions/alphabet_soup/question.svg 2011-07-18 20:31:26 +0000
279@@ -6,5 +6,5 @@
280 width="864"
281 height="648">
282 <path
283- d="M 379.1115,243.87415 C 331.63948,221.02907 305.17158,177.44842 304,126 C 304.10942,71.362793 335.63742,26.535953 385.13135,5.8274636 C 400.59579,0.94927881 417.73322,-0.74582647 434,0.20129697 L 434,20.739895 C 389.42751,27.265011 381.35691,88.664883 381.52445,126 C 381.73345,172.57377 390.02396,229.93178 446.86385,231.99421 C 455.7306,232.31594 457.80064,232.32202 461.2119,234.23925 C 468.73163,238.58122 470,246.15478 470,254 L 393.04611,254 C 390.12737,248.74743 384.26569,246.43772 379.1115,243.87415 z"/>
284+ d="M 379.1115,243.87415 C 331.66919,220.96836 304.53108,179.04281 304,126 303.46892,72.957187 335.24929,25.47568 385.13135,5.8274636 400.20766,-0.11099414 416.03391,-0.18850556 432.68,0 l 0,18 c -44.57249,0.07686 -51.34382,66.045556 -51.15555,108 0.18827,41.95444 8.49951,103.93178 65.3394,105.99421 8.86675,0.32173 10.93679,0.32781 14.34805,2.24504 C 468.73163,238.58122 468,244.15478 468,252 l -72,0 c -2.91874,-5.25257 -11.7046,-5.62299 -16.8885,-8.12585 z"/>
285 </svg>
286
287=== modified file 'share/extensions/alphabet_soup/rcap.svg'
288--- share/extensions/alphabet_soup/rcap.svg 2008-03-18 23:02:45 +0000
289+++ share/extensions/alphabet_soup/rcap.svg 2011-07-18 20:31:26 +0000
290@@ -6,5 +6,5 @@
291 width="864"
292 height="648">
293 <path
294- d="M 499.24145,321.47832 C 491.28205,288.08485 466.98548,255 430,255 L 430,213.71285 C 506.29217,215.25336 571.222,243.91309 595.45778,321.5 L 596.09296,434 L 502.21668,434 C 499.28967,396.82866 505.98901,358.30974 499.24145,321.47832 z"/>
295+ d="M 499.24145,321.47832 C 491.28205,288.08485 468.98548,252 432,252 l 0,-36 c 79.22032,0.18906 162.09041,61.50434 162,124 l 0,92 -90,0 c 10e-4,-37.17134 1.98901,-73.69026 -4.75855,-110.52168 z"/>
296 </svg>
297
298=== modified file 'share/extensions/alphabet_soup/tserif.svg'
299--- share/extensions/alphabet_soup/tserif.svg 2008-12-10 21:36:50 +0000
300+++ share/extensions/alphabet_soup/tserif.svg 2011-07-18 20:31:26 +0000
301@@ -1,16 +1,10 @@
302 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
303-<!-- Created with Inkscape (http://www.inkscape.org/) -->
304 <svg
305 xmlns:svg="http://www.w3.org/2000/svg"
306 xmlns="http://www.w3.org/2000/svg"
307 version="1.0"
308 width="864"
309- height="648"
310- id="svg3109">
311- <defs
312- id="defs3112" />
313+ height="648">
314 <path
315- d="M 396,396 L 468.5424,396 C 471.23667,411.21933 478.03593,431.45141 496.28288,431.8016 C 507.19866,431.37331 510.32553,421.46179 516.756,415 L 532,427.78714 C 522.68412,452.69658 494.97645,467.13684 470.33388,468.03876 C 425.31789,469.68634 402.20226,438.60703 396,396 z"
316- id="path2615"
317- style="fill:#000000" />
318+ d="m 396,396 72,0 c -0.003,12.59674 10.03593,35.45141 28.28288,35.8016 C 507.19866,431.37331 510.32553,421.46179 516.756,415 L 532,427.78714 c -9.31588,24.90944 -37.02355,39.3497 -61.66612,40.25162 C 425.31789,469.68634 396.13284,433.43678 396,396 z"/>
319 </svg>
320
321=== modified file 'share/extensions/alphabet_soup/vcap.svg'
322--- share/extensions/alphabet_soup/vcap.svg 2008-03-18 23:02:45 +0000
323+++ share/extensions/alphabet_soup/vcap.svg 2011-07-18 20:31:26 +0000
324@@ -6,5 +6,5 @@
325 width="864"
326 height="648">
327 <path
328- d="M 250,16 L 308.5,16.013451 L 414,344 L 519.5,16.013451 L 614,16 L 470.5,469.98578 L 393.5,469.98578 L 250,16 z"/>
329+ d="m 250,18 58.5,0 105.5,326 106,-326 94,0 -143.5,450 -77,0 L 250,18 z"/>
330 </svg>
331
332=== modified file 'share/extensions/alphabet_soup/vserl.svg'
333--- share/extensions/alphabet_soup/vserl.svg 2008-12-10 21:36:50 +0000
334+++ share/extensions/alphabet_soup/vserl.svg 2011-07-18 20:31:26 +0000
335@@ -6,5 +6,5 @@
336 width="864"
337 height="648">
338 <path
339- d="M 286.04853,213.28223 C 281.15258,203.54653 275.32901,198.99797 264.3185,198 L 261,198 L 261,180 L 342,180 L 342,198 L 334.42308,198 C 327.38192,198 326.63946,198.20669 323.92308,200.92308 C 318.67531,205.9855 322.92458,212.00136 323.5,217.98886 L 323.5,286.97955 L 286.04853,213.28223 z"/>
340+ d="M 286.04853,213.28223 C 281.1125,203.56679 275.32901,198.99797 264.3185,198 l -3.3185,0 0,-18 81,0 0,18 -7.57692,0 c -7.04116,0 -7.75193,0.23896 -10.5,2.92308 -5.21608,5.09469 -2.20175,11.07828 0.23324,15.75315 l -0.10939,71.39718 -37.9984,-74.79118 z"/>
341 </svg>
342
343=== modified file 'share/extensions/render_alphabetsoup.inx'
344--- share/extensions/render_alphabetsoup.inx 2010-09-09 16:26:54 +0000
345+++ share/extensions/render_alphabetsoup.inx 2011-07-18 20:31:26 +0000
346@@ -7,7 +7,7 @@
347 <dependency type="executable" location="extensions">inkex.py</dependency>
348 <param name="text" type="string" _gui-text="Text:">Inkscape</param>
349 <param name="zoom" type="float" min="0.0" max="1000.0" _gui-text="Scale:">8.0</param>
350- <param name="seed" type="int" min="0" max="65535" _gui-text="Random Seed:">0</param>
351+ <param name="randomize" type="boolean" _gui-text="Randomize">false</param>
352 <effect>
353 <object-type>all</object-type>
354 <effects-menu>
355
356=== modified file 'share/extensions/render_alphabetsoup.py'
357--- share/extensions/render_alphabetsoup.py 2010-08-30 11:29:57 +0000
358+++ share/extensions/render_alphabetsoup.py 2011-07-18 20:31:26 +0000
359@@ -31,6 +31,7 @@
360 import simplepath
361 import os
362 import sys
363+import re
364 import gettext
365 _ = gettext.gettext
366
367@@ -66,6 +67,33 @@
368 else:
369 return pathA + pathB
370
371+def reverseComponent(c):
372+ nc = []
373+ last = c.pop()
374+ nc.append(['M', last[1][-2:]])
375+ while c:
376+ this = c.pop()
377+ cmd = last[0]
378+ if cmd == 'C':
379+ nc.append([last[0], last[1][2:4] + last[1][:2] + this[1][-2:]])
380+ else:
381+ nc.append([last[0], this[1][-2:]])
382+ last = this
383+ return nc
384+
385+def reversePath(sp):
386+ rp = []
387+ component = []
388+ for p in sp:
389+ cmd, params = p
390+ if cmd == 'Z':
391+ rp.extend(reverseComponent(component))
392+ rp.append(['Z', []])
393+ component = []
394+ else:
395+ component.append(p)
396+ return rp
397+
398 def flipLeftRight( sp, width ):
399 for cmd,params in sp:
400 defs = simplepath.pathdefs[cmd]
401@@ -200,11 +228,13 @@
402 tbimage = image
403 if ( stack[0] == "-" ): # top-bottom flip
404 flipTopBottom(tbimage, height)
405+ tbimage = reversePath(tbimage)
406 stack.pop( 0 )
407
408 lrimage = tbimage
409 if ( stack[0] == "|" ): # left-right flip
410 flipLeftRight(tbimage, width)
411+ lrimage = reversePath(lrimage)
412 stack.pop( 0 )
413 return lrimage
414
415@@ -292,14 +322,14 @@
416 simplepath.scalePath(image, zoom/units, zoom/units)
417 return image, bbox[1] - bbox[0], bbox[3] - bbox[2]
418
419-def randomize_input_string( str, zoom ): # generate list of images based on input string
420+def randomize_input_string(tokens, zoom ): # generate a glyph starting from each token in the input string
421 imagelist = []
422
423- for i in range(0,len(str)):
424- char = str[i]
425+ for i in range(0,len(tokens)):
426+ char = tokens[i]
427 #if ( re.match("[a-zA-Z0-9?]", char)):
428 if ( alphabet.has_key(char)):
429- if ((i > 0) and (char == str[i-1])): # if this letter matches previous letter
430+ if ((i > 0) and (char == tokens[i-1])): # if this letter matches previous letter
431 imagelist.append(imagelist[len(stack)-1])# make them the same image
432 else: # generate image for letter
433 stack = string.split( alphabet[char][random.randint(0,(len(alphabet[char])-1))] , "." )
434@@ -308,15 +338,33 @@
435 elif( char == " "): # add a " " space to the image list
436 imagelist.append( " " )
437 else: # this character is not in config.alphabet, skip it
438- inkex.errormsg(_("bad character") + " = 0x%x" % ord(char))
439+ sys.stderr.write('bad character "%s"\n' % char)
440+ return imagelist
441+
442+def generate_random_string( tokens, zoom ): # generate a totally random glyph for each glyph in the input string
443+ imagelist = []
444+ for char in tokens:
445+ if ( char == " "): # add a " " space to the image list
446+ imagelist.append( " " )
447+ else:
448+ if ( re.match("[a-z]", char )): # generate lowercase letter
449+ stack = generate("lc")
450+ elif ( re.match("[A-Z]", char )): # generate uppercase letter
451+ stack = generate("UC")
452+ else: # this character is not in config.alphabet, skip it
453+ sys.stderr.write('bad character"%s"\n' % char)
454+ stack = generate("start")
455+ imagelist.append( draw_crop_scale( stack, zoom ))
456+
457 return imagelist
458
459 def optikern( image, width, zoom ): # optical kerning algorithm
460 left = []
461 right = []
462
463- for i in range( 0, 36 ):
464- y = 0.5 * (i + 0.5) * zoom
465+ resolution = 8
466+ for i in range( 0, 18 * resolution ):
467+ y = 1.0/resolution * (i + 0.5) * zoom
468 xmin = None
469 xmax = None
470
471@@ -425,6 +473,29 @@
472
473 return workspace
474
475+def tokenize(text):
476+ """Tokenize the string, looking for LaTeX style, multi-character tokens in the string, like \\yogh."""
477+ tokens = []
478+ i = 0
479+ while i < len(text):
480+ c = text[i]
481+ i += 1
482+ if c == '\\': # found the beginning of an escape
483+ t = ''
484+ while i < len(text): # gobble up content of the escape
485+ c = text[i]
486+ if c == '\\': # found another escape, stop this one
487+ break
488+ i += 1
489+ if c == ' ': # a space terminates this escape
490+ break
491+ t += c # stick this character onto the token
492+ if t:
493+ tokens.append(t)
494+ else:
495+ tokens.append(c)
496+ return tokens
497+
498 class AlphabetSoup(inkex.Effect):
499 def __init__(self):
500 inkex.Effect.__init__(self)
501@@ -436,16 +507,20 @@
502 action="store", type="float",
503 dest="zoom", default="8.0",
504 help="The zoom on the output graphics")
505- self.OptionParser.add_option("-s", "--seed",
506- action="store", type="int",
507- dest="seed", default="0",
508- help="The random seed for the soup")
509+ self.OptionParser.add_option("-r", "--randomize",
510+ action="store", type="inkbool",
511+ dest="randomize", default=False,
512+ help="Generate random (unreadable) text")
513
514 def effect(self):
515 zoom = self.options.zoom
516- random.seed(self.options.seed)
517-
518- imagelist = randomize_input_string(self.options.text, zoom)
519+
520+ if self.options.randomize:
521+ imagelist = generate_random_string(self.options.text, zoom)
522+ else:
523+ tokens = tokenize(self.options.text)
524+ imagelist = randomize_input_string(tokens, zoom)
525+
526 image = layoutstring( imagelist, zoom )
527
528 if image: