asciimo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. data/README.md +67 -0
  2. data/Rakefile +42 -0
  3. data/asciimo.gemspec +33 -0
  4. data/bin/asciimo +53 -0
  5. data/ext/asciimo/Readme.md +137 -0
  6. data/ext/asciimo/build/build.js +25 -0
  7. data/ext/asciimo/build/clean.js +28 -0
  8. data/ext/asciimo/fonts/1Row.flf +208 -0
  9. data/ext/asciimo/fonts/3D_Diagonal.flf +1538 -0
  10. data/ext/asciimo/fonts/3_D.flf +778 -0
  11. data/ext/asciimo/fonts/3x5.flf +588 -0
  12. data/ext/asciimo/fonts/4Max.flf +398 -0
  13. data/ext/asciimo/fonts/5_Line_Oblique.flf +588 -0
  14. data/ext/asciimo/fonts/AMC_3 Line.flf +398 -0
  15. data/ext/asciimo/fonts/AMC_3 Liv1.flf +398 -0
  16. data/ext/asciimo/fonts/AMC_AAA01.flf +1443 -0
  17. data/ext/asciimo/fonts/AMC_Neko.flf +968 -0
  18. data/ext/asciimo/fonts/AMC_Razor.flf +683 -0
  19. data/ext/asciimo/fonts/AMC_Razor2.flf +873 -0
  20. data/ext/asciimo/fonts/AMC_Slash.flf +968 -0
  21. data/ext/asciimo/fonts/AMC_Slider.flf +588 -0
  22. data/ext/asciimo/fonts/AMC_Thin.flf +683 -0
  23. data/ext/asciimo/fonts/AMC_Tubes.flf +778 -0
  24. data/ext/asciimo/fonts/AMC_Untitled.flf +778 -0
  25. data/ext/asciimo/fonts/ASCII_New Roman.flf +398 -0
  26. data/ext/asciimo/fonts/Acrobatic.flf +1158 -0
  27. data/ext/asciimo/fonts/Alligator.flf +683 -0
  28. data/ext/asciimo/fonts/Alligator2.flf +683 -0
  29. data/ext/asciimo/fonts/Alpha.flf +2108 -0
  30. data/ext/asciimo/fonts/Alphabet.flf +683 -0
  31. data/ext/asciimo/fonts/Arrows.flf +778 -0
  32. data/ext/asciimo/fonts/Avatar.flf +588 -0
  33. data/ext/asciimo/fonts/B1FF.flf +113 -0
  34. data/ext/asciimo/fonts/Banner.flf +778 -0
  35. data/ext/asciimo/fonts/Banner3.flf +683 -0
  36. data/ext/asciimo/fonts/Banner3_D.flf +778 -0
  37. data/ext/asciimo/fonts/Banner4.flf +683 -0
  38. data/ext/asciimo/fonts/Barbwire.flf +778 -0
  39. data/ext/asciimo/fonts/Basic.flf +778 -0
  40. data/ext/asciimo/fonts/Bear.flf +873 -0
  41. data/ext/asciimo/fonts/Bell.flf +588 -0
  42. data/ext/asciimo/fonts/Benjamin.flf +113 -0
  43. data/ext/asciimo/fonts/Big.flf +778 -0
  44. data/ext/asciimo/fonts/Big_Chief.flf +778 -0
  45. data/ext/asciimo/fonts/Big_Money_ne.flf +1063 -0
  46. data/ext/asciimo/fonts/Big_Money_nw.flf +1063 -0
  47. data/ext/asciimo/fonts/Big_Money_se.flf +1158 -0
  48. data/ext/asciimo/fonts/Big_Money_sw.flf +1158 -0
  49. data/ext/asciimo/fonts/Bigfig.flf +303 -0
  50. data/ext/asciimo/fonts/Binary.flf +113 -0
  51. data/ext/asciimo/fonts/Block.flf +778 -0
  52. data/ext/asciimo/fonts/Blocks.flf +1063 -0
  53. data/ext/asciimo/fonts/Bolger.flf +683 -0
  54. data/ext/asciimo/fonts/Braced.flf +493 -0
  55. data/ext/asciimo/fonts/Bright.flf +588 -0
  56. data/ext/asciimo/fonts/Broadway.flf +1063 -0
  57. data/ext/asciimo/fonts/Broadway_KB.flf +303 -0
  58. data/ext/asciimo/fonts/Bubble.flf +398 -0
  59. data/ext/asciimo/fonts/Bulbhead.flf +398 -0
  60. data/ext/asciimo/fonts/Caligraphy.flf +2013 -0
  61. data/ext/asciimo/fonts/Caligraphy2.flf +1918 -0
  62. data/ext/asciimo/fonts/Cards.flf +588 -0
  63. data/ext/asciimo/fonts/Catwalk.flf +778 -0
  64. data/ext/asciimo/fonts/Chiseled.flf +873 -0
  65. data/ext/asciimo/fonts/Chunky.flf +493 -0
  66. data/ext/asciimo/fonts/Coinstak.flf +778 -0
  67. data/ext/asciimo/fonts/Cola.flf +588 -0
  68. data/ext/asciimo/fonts/Colossal.flf +1063 -0
  69. data/ext/asciimo/fonts/Computer.flf +683 -0
  70. data/ext/asciimo/fonts/Contessa.flf +398 -0
  71. data/ext/asciimo/fonts/Contrast.flf +588 -0
  72. data/ext/asciimo/fonts/Cosmike.flf +588 -0
  73. data/ext/asciimo/fonts/Crawford.flf +778 -0
  74. data/ext/asciimo/fonts/Crawford2.flf +778 -0
  75. data/ext/asciimo/fonts/Crazy.flf +1253 -0
  76. data/ext/asciimo/fonts/Cricket.flf +778 -0
  77. data/ext/asciimo/fonts/Cursive.flf +588 -0
  78. data/ext/asciimo/fonts/Cyberlarge.flf +398 -0
  79. data/ext/asciimo/fonts/Cybermedium.flf +398 -0
  80. data/ext/asciimo/fonts/Cybersmall.flf +208 -0
  81. data/ext/asciimo/fonts/Cygnet.flf +493 -0
  82. data/ext/asciimo/fonts/DANC4.flf +398 -0
  83. data/ext/asciimo/fonts/DWhistled.flf +968 -0
  84. data/ext/asciimo/fonts/Dancing_Font.flf +683 -0
  85. data/ext/asciimo/fonts/Decimal.flf +113 -0
  86. data/ext/asciimo/fonts/Def_Leppard.flf +1538 -0
  87. data/ext/asciimo/fonts/Diamond.flf +778 -0
  88. data/ext/asciimo/fonts/Diet_Cola.flf +588 -0
  89. data/ext/asciimo/fonts/Digital.flf +303 -0
  90. data/ext/asciimo/fonts/Doh.flf +2393 -0
  91. data/ext/asciimo/fonts/Doom.flf +778 -0
  92. data/ext/asciimo/fonts/Dot_Matrix.flf +968 -0
  93. data/ext/asciimo/fonts/Double.flf +493 -0
  94. data/ext/asciimo/fonts/Double_Shorts.flf +303 -0
  95. data/ext/asciimo/fonts/Dr_Pepper.flf +493 -0
  96. data/ext/asciimo/fonts/Efti_Chess.flf +493 -0
  97. data/ext/asciimo/fonts/Efti_Font.flf +493 -0
  98. data/ext/asciimo/fonts/Efti_Italic.flf +493 -0
  99. data/ext/asciimo/fonts/Efti_Piti.flf +303 -0
  100. data/ext/asciimo/fonts/Efti_Robot.flf +588 -0
  101. data/ext/asciimo/fonts/Efti_Wall.flf +398 -0
  102. data/ext/asciimo/fonts/Efti_Water.flf +398 -0
  103. data/ext/asciimo/fonts/Epic.flf +873 -0
  104. data/ext/asciimo/fonts/Fender.flf +683 -0
  105. data/ext/asciimo/fonts/Filter.flf +493 -0
  106. data/ext/asciimo/fonts/Fire_Font_k.flf +873 -0
  107. data/ext/asciimo/fonts/Fire_Font_s.flf +873 -0
  108. data/ext/asciimo/fonts/Flipped.flf +398 -0
  109. data/ext/asciimo/fonts/Flower_Power.flf +968 -0
  110. data/ext/asciimo/fonts/Four_Tops.flf +398 -0
  111. data/ext/asciimo/fonts/Fraktur.flf +1443 -0
  112. data/ext/asciimo/fonts/Fun_Face.flf +683 -0
  113. data/ext/asciimo/fonts/Fun_Faces.flf +683 -0
  114. data/ext/asciimo/fonts/Fuzzy.flf +683 -0
  115. data/ext/asciimo/fonts/Georgi16.flf +1538 -0
  116. data/ext/asciimo/fonts/Georgia11.flf +1063 -0
  117. data/ext/asciimo/fonts/Ghost.flf +873 -0
  118. data/ext/asciimo/fonts/Ghoulish.flf +683 -0
  119. data/ext/asciimo/fonts/Glenyn.flf +398 -0
  120. data/ext/asciimo/fonts/Goofy.flf +588 -0
  121. data/ext/asciimo/fonts/Gothic.flf +873 -0
  122. data/ext/asciimo/fonts/Graceful.flf +398 -0
  123. data/ext/asciimo/fonts/Gradient.flf +873 -0
  124. data/ext/asciimo/fonts/Graffiti.flf +588 -0
  125. data/ext/asciimo/fonts/Greek.flf +873 -0
  126. data/ext/asciimo/fonts/Heart_Left.flf +398 -0
  127. data/ext/asciimo/fonts/Heart_Right.flf +398 -0
  128. data/ext/asciimo/fonts/Henry_3D.flf +778 -0
  129. data/ext/asciimo/fonts/Hex.flf +113 -0
  130. data/ext/asciimo/fonts/Hieroglyphs.flf +398 -0
  131. data/ext/asciimo/fonts/Hollywood.flf +968 -0
  132. data/ext/asciimo/fonts/Horizontal_Left.flf +588 -0
  133. data/ext/asciimo/fonts/Horizontal_Right.flf +588 -0
  134. data/ext/asciimo/fonts/ICL_1900.flf +1253 -0
  135. data/ext/asciimo/fonts/Impossible.flf +1158 -0
  136. data/ext/asciimo/fonts/Invita.flf +588 -0
  137. data/ext/asciimo/fonts/Isometric1.flf +1063 -0
  138. data/ext/asciimo/fonts/Isometric2.flf +1063 -0
  139. data/ext/asciimo/fonts/Isometric3.flf +1063 -0
  140. data/ext/asciimo/fonts/Isometric4.flf +1063 -0
  141. data/ext/asciimo/fonts/Italic.flf +398 -0
  142. data/ext/asciimo/fonts/Ivrit.flf +588 -0
  143. data/ext/asciimo/fonts/JS_Block Letters.flf +303 -0
  144. data/ext/asciimo/fonts/JS_Bracket Letters.flf +398 -0
  145. data/ext/asciimo/fonts/JS_Capital Curves.flf +398 -0
  146. data/ext/asciimo/fonts/JS_Cursive.flf +588 -0
  147. data/ext/asciimo/fonts/JS_Stick Letters.flf +398 -0
  148. data/ext/asciimo/fonts/Jacky.flf +778 -0
  149. data/ext/asciimo/fonts/Jazmine.flf +968 -0
  150. data/ext/asciimo/fonts/Jerusalem.flf +683 -0
  151. data/ext/asciimo/fonts/Katakana.flf +778 -0
  152. data/ext/asciimo/fonts/Kban.flf +683 -0
  153. data/ext/asciimo/fonts/Keyboard.flf +873 -0
  154. data/ext/asciimo/fonts/Knob.flf +398 -0
  155. data/ext/asciimo/fonts/Konto.flf +208 -0
  156. data/ext/asciimo/fonts/Konto_Slant.flf +208 -0
  157. data/ext/asciimo/fonts/LCD.flf +588 -0
  158. data/ext/asciimo/fonts/Larry_3D.flf +873 -0
  159. data/ext/asciimo/fonts/Lean.flf +778 -0
  160. data/ext/asciimo/fonts/Letters.flf +588 -0
  161. data/ext/asciimo/fonts/Lil_Devil.flf +778 -0
  162. data/ext/asciimo/fonts/Line_Blocks.flf +493 -0
  163. data/ext/asciimo/fonts/Linux.flf +398 -0
  164. data/ext/asciimo/fonts/Lockergnome.flf +398 -0
  165. data/ext/asciimo/fonts/Madrid.flf +398 -0
  166. data/ext/asciimo/fonts/Marquee.flf +778 -0
  167. data/ext/asciimo/fonts/Maxfour.flf +398 -0
  168. data/ext/asciimo/fonts/Merlin1.flf +778 -0
  169. data/ext/asciimo/fonts/Merlin2.flf +873 -0
  170. data/ext/asciimo/fonts/Mike.flf +303 -0
  171. data/ext/asciimo/fonts/Mini.flf +398 -0
  172. data/ext/asciimo/fonts/Mirror.flf +588 -0
  173. data/ext/asciimo/fonts/Mnemonic.flf +113 -0
  174. data/ext/asciimo/fonts/Modular.flf +683 -0
  175. data/ext/asciimo/fonts/Morse.flf +113 -0
  176. data/ext/asciimo/fonts/Morse2.flf +113 -0
  177. data/ext/asciimo/fonts/Moscow.flf +588 -0
  178. data/ext/asciimo/fonts/Mshebrew210.flf +398 -0
  179. data/ext/asciimo/fonts/Muzzle.flf +398 -0
  180. data/ext/asciimo/fonts/NScript.flf +1538 -0
  181. data/ext/asciimo/fonts/NT_Greek.flf +873 -0
  182. data/ext/asciimo/fonts/NV_Script.flf +1538 -0
  183. data/ext/asciimo/fonts/Nancyj.flf +778 -0
  184. data/ext/asciimo/fonts/Nancyj_Fancy.flf +778 -0
  185. data/ext/asciimo/fonts/Nancyj_Improved.flf +778 -0
  186. data/ext/asciimo/fonts/Nancyj_Underlined.flf +778 -0
  187. data/ext/asciimo/fonts/Nipples.flf +778 -0
  188. data/ext/asciimo/fonts/O8.flf +588 -0
  189. data/ext/asciimo/fonts/OS2.flf +683 -0
  190. data/ext/asciimo/fonts/Octal.flf +113 -0
  191. data/ext/asciimo/fonts/Ogre.flf +588 -0
  192. data/ext/asciimo/fonts/Old_Banner.flf +683 -0
  193. data/ext/asciimo/fonts/Pawp.flf +873 -0
  194. data/ext/asciimo/fonts/Peaks.flf +778 -0
  195. data/ext/asciimo/fonts/Peaks_Slant.flf +588 -0
  196. data/ext/asciimo/fonts/Pebbles.flf +968 -0
  197. data/ext/asciimo/fonts/Pepper.flf +398 -0
  198. data/ext/asciimo/fonts/Poison.flf +1158 -0
  199. data/ext/asciimo/fonts/Puffy.flf +778 -0
  200. data/ext/asciimo/fonts/Puzzle.flf +493 -0
  201. data/ext/asciimo/fonts/Pyramid.flf +303 -0
  202. data/ext/asciimo/fonts/Rammstein.flf +683 -0
  203. data/ext/asciimo/fonts/Rectangles.flf +588 -0
  204. data/ext/asciimo/fonts/Red_Phoenix.flf +683 -0
  205. data/ext/asciimo/fonts/Relief.flf +683 -0
  206. data/ext/asciimo/fonts/Relief2.flf +683 -0
  207. data/ext/asciimo/fonts/Reverse.flf +1063 -0
  208. data/ext/asciimo/fonts/Roman.flf +968 -0
  209. data/ext/asciimo/fonts/Rot13.flf +113 -0
  210. data/ext/asciimo/fonts/Rotated.flf +303 -0
  211. data/ext/asciimo/fonts/Rounded.flf +683 -0
  212. data/ext/asciimo/fonts/Rowan_Cap.flf +588 -0
  213. data/ext/asciimo/fonts/Rozzo.flf +683 -0
  214. data/ext/asciimo/fonts/Runic.flf +588 -0
  215. data/ext/asciimo/fonts/Runyc.flf +588 -0
  216. data/ext/asciimo/fonts/SL_Script.flf +588 -0
  217. data/ext/asciimo/fonts/S_Blood.flf +588 -0
  218. data/ext/asciimo/fonts/Santa_Clara.flf +588 -0
  219. data/ext/asciimo/fonts/Script.flf +683 -0
  220. data/ext/asciimo/fonts/Serifcap.flf +398 -0
  221. data/ext/asciimo/fonts/Shadow.flf +493 -0
  222. data/ext/asciimo/fonts/Shimrod.flf +588 -0
  223. data/ext/asciimo/fonts/Short.flf +303 -0
  224. data/ext/asciimo/fonts/Slant.flf +588 -0
  225. data/ext/asciimo/fonts/Slant_Relief.flf +873 -0
  226. data/ext/asciimo/fonts/Slide.flf +588 -0
  227. data/ext/asciimo/fonts/Small.flf +493 -0
  228. data/ext/asciimo/fonts/Small_Caps.flf +493 -0
  229. data/ext/asciimo/fonts/Small_Isometric1.flf +683 -0
  230. data/ext/asciimo/fonts/Small_Keyboard.flf +398 -0
  231. data/ext/asciimo/fonts/Small_Poison.flf +683 -0
  232. data/ext/asciimo/fonts/Small_Script.flf +493 -0
  233. data/ext/asciimo/fonts/Small_Shadow.flf +398 -0
  234. data/ext/asciimo/fonts/Small_Slant.flf +493 -0
  235. data/ext/asciimo/fonts/Small_Tengwar.flf +303 -0
  236. data/ext/asciimo/fonts/Soft.flf +683 -0
  237. data/ext/asciimo/fonts/Speed.flf +588 -0
  238. data/ext/asciimo/fonts/Spliff.flf +493 -0
  239. data/ext/asciimo/fonts/Stacey.flf +683 -0
  240. data/ext/asciimo/fonts/Stampate.flf +588 -0
  241. data/ext/asciimo/fonts/Stampatello.flf +588 -0
  242. data/ext/asciimo/fonts/Standard.flf +588 -0
  243. data/ext/asciimo/fonts/Star_Strips.flf +873 -0
  244. data/ext/asciimo/fonts/Star_Wars.flf +683 -0
  245. data/ext/asciimo/fonts/Stellar.flf +778 -0
  246. data/ext/asciimo/fonts/Stforek.flf +398 -0
  247. data/ext/asciimo/fonts/Stick_Letters.flf +398 -0
  248. data/ext/asciimo/fonts/Stop.flf +683 -0
  249. data/ext/asciimo/fonts/Straight.flf +398 -0
  250. data/ext/asciimo/fonts/Sub_Zero.flf +588 -0
  251. data/ext/asciimo/fonts/Swamp_Land.flf +778 -0
  252. data/ext/asciimo/fonts/Swan.flf +873 -0
  253. data/ext/asciimo/fonts/Sweet.flf +1253 -0
  254. data/ext/asciimo/fonts/Tanja.flf +778 -0
  255. data/ext/asciimo/fonts/Tengwar.flf +968 -0
  256. data/ext/asciimo/fonts/Term.flf +113 -0
  257. data/ext/asciimo/fonts/Test1.flf +398 -0
  258. data/ext/asciimo/fonts/Thick.flf +493 -0
  259. data/ext/asciimo/fonts/Thin.flf +588 -0
  260. data/ext/asciimo/fonts/Thorned.flf +493 -0
  261. data/ext/asciimo/fonts/Three_Point.flf +303 -0
  262. data/ext/asciimo/fonts/Ticks.flf +588 -0
  263. data/ext/asciimo/fonts/Ticks_Slant.flf +588 -0
  264. data/ext/asciimo/fonts/Tiles.flf +778 -0
  265. data/ext/asciimo/fonts/Tinker_Toy.flf +683 -0
  266. data/ext/asciimo/fonts/Tombstone.flf +493 -0
  267. data/ext/asciimo/fonts/Train.flf +588 -0
  268. data/ext/asciimo/fonts/Trek.flf +588 -0
  269. data/ext/asciimo/fonts/Tsalagi.flf +493 -0
  270. data/ext/asciimo/fonts/Tubular.flf +778 -0
  271. data/ext/asciimo/fonts/Twisted.flf +778 -0
  272. data/ext/asciimo/fonts/Two_Point.flf +208 -0
  273. data/ext/asciimo/fonts/USA_Flag.flf +588 -0
  274. data/ext/asciimo/fonts/Univers.flf +1063 -0
  275. data/ext/asciimo/fonts/Varsity.flf +683 -0
  276. data/ext/asciimo/fonts/Wavy.flf +398 -0
  277. data/ext/asciimo/fonts/Weird.flf +588 -0
  278. data/ext/asciimo/fonts/Wet_Letter.flf +683 -0
  279. data/ext/asciimo/fonts/Whimsy.flf +968 -0
  280. data/ext/asciimo/fonts/Wow.flf +113 -0
  281. data/ext/asciimo/images/asciimo.png +0 -0
  282. data/ext/asciimo/index.html +169 -0
  283. data/ext/asciimo/lib/asciimo.js +1685 -0
  284. data/ext/asciimo/lib/colors.js +28 -0
  285. data/ext/asciimo/lib/fonts.js +276 -0
  286. data/ext/asciimo/lib/jquery.js +6240 -0
  287. data/ext/asciimo/node-demo.js +34 -0
  288. data/lib/asciimo.rb +47 -0
  289. metadata +369 -0
@@ -0,0 +1,113 @@
1
+ ../../fonts/Wow.flf
2
+ flf
3
+ 10
4
+ monospace
5
+
6
+ $
7
+ 0
8
+ true
9
+ false
10
+ false
11
+ false
12
+ false
13
+ false
14
+ false
15
+ false
16
+ 95
17
+ 1
18
+ $
19
+ !!1
20
+ ''
21
+ #
22
+ $
23
+ %
24
+ &
25
+ '
26
+ (
27
+ )
28
+ *
29
+ +
30
+ ,
31
+ --
32
+ .
33
+ /
34
+ 0
35
+ 1
36
+ 2
37
+ 3
38
+ 4
39
+ 5
40
+ 6
41
+ 7
42
+ 8
43
+ 9
44
+ ::
45
+ :;
46
+ <
47
+ :::
48
+ >
49
+ ?
50
+ @
51
+ //-\\
52
+ ][3
53
+ <<
54
+ ][_)
55
+ ]E
56
+ ][=
57
+ ((6
58
+ ][-][
59
+ ]][
60
+ ;_][
61
+ ][<
62
+ ][_
63
+ ][\\/][
64
+ ][\\][
65
+ [[]]
66
+ ]]P
67
+ [[]].
68
+ ][2
69
+ ((5
70
+ `][`
71
+ ][_][
72
+ \\\\/
73
+ \\\\/\\\\/
74
+ >><<
75
+ ``//
76
+ ``//.
77
+ [
78
+ \\
79
+ ]
80
+ ^
81
+ _
82
+ `
83
+ //-\\
84
+ ][3
85
+ <<
86
+ ][_)
87
+ ]E
88
+ ][=
89
+ ((6
90
+ ][-][
91
+ ]][
92
+ ;_][
93
+ ][<
94
+ ][_
95
+ ][\\/][
96
+ ][\\][
97
+ [[]]
98
+ ]]P
99
+ [[]].
100
+ ][2
101
+ ((5
102
+ `][`
103
+ ][_][
104
+ \\\\/
105
+ \\\\/\\\\/
106
+ >><<
107
+ ``//
108
+ ``//.
109
+ {
110
+ |
111
+ }
112
+ ~
113
+ Author : Pipeline<br/>Date : 2005/12/2 19:56:55<br/>Version: 1.0<br/>-------------------------------------------------<br/>This font was inspired by pwning nubs in WoW<br/>Use it when you feel a nubblestiltskin is just<br/>begging to be RUINED.<br/>-------------------------------------------------<br/>This font has been created using JavE's FIGlet font export assistant.<br/>Have a look at: http://www.jave.de<br/><br/>Permission is hereby given to modify this font, as long as the<br/>modifier's name is placed on a comment line.<br/>
@@ -0,0 +1,169 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+
3
+ <html>
4
+ <head>
5
+ <title>asciimo - create awesome ascii art with javascript! works in the browser or node.js</title>
6
+
7
+
8
+ <!-- lol css -->
9
+ <style type="text/css">
10
+ * { padding: 0; margin: 0; }
11
+ body {
12
+ padding: 30px;
13
+ padding-top:5px;
14
+ font-family: Arial, Helvetica, sans-serif;
15
+ }
16
+ h1 {
17
+ margin-bottom: 1em;
18
+ border-bottom: 1px solid #ccc;
19
+ }
20
+
21
+ h2 {
22
+ margin-bottom: 1em;
23
+ border-bottom: 1px solid #ccc;
24
+ }
25
+
26
+ h1 {
27
+ margin-bottom: 0.7em;
28
+ }
29
+
30
+ h2 {
31
+ margin-top: 1em;
32
+ }
33
+
34
+ a { color:#0000FF;}
35
+ a.visited{ color:#0000FF;}
36
+
37
+
38
+ #theCode{width:100%;height:80px;}
39
+ #asciiArt{ width:3000px; height:1000px; color:white; background-color:black; scroll:auto;}
40
+ .ninja{font-size:10px;}
41
+ </style>
42
+ <script type="text/javascript" src="./lib/asciimo.js"></script>
43
+
44
+ <!-- fonts.js doesn't contain the fonts, just the font names. fonts are located in /asciimo/fonts/ -->
45
+ <script type="text/javascript" src="./lib/fonts.js"></script>
46
+
47
+ <!-- jquery not required, just use this this demo page -->
48
+ <script type="text/javascript" src="./lib/jquery.js"></script>
49
+
50
+
51
+ <script type="text/javascript">
52
+
53
+ // not used, could be implemented, maybe AJAX browser cache is good enough? do some research!
54
+ var fontCache = {};
55
+
56
+ $(document).ready(function(){
57
+
58
+ // populate the select box
59
+ for(var i = 0; i<asciimoFonts.length; i++){
60
+ var fontTitle = asciimoFonts[i].replace('.flf','').replace('.aol',''); // remove the file extentions for the title
61
+ $('#fontSelector').append('<option value = "'+asciimoFonts[i]+'">'+fontTitle+'</option>');
62
+ }
63
+
64
+ // protip : understanding the following two blocks of code will make you jQuery ninja
65
+
66
+ /***** NAMED EVENTS *****/
67
+
68
+ // change the font and load a new font via jQuery async AJAX request
69
+ $(document).bind('##CHANGE_FONT##', function(e, data){
70
+ var font = data.fontName;
71
+ $.get('./fonts/' + font,function(rsp){
72
+ loadFont(rsp); // call asciimo API method, we can make this better. just file a support issue!
73
+ $(document).trigger('##RENDER_ASCII_ART##'); // the font has changed, lets call the render ascii art event
74
+ });
75
+ });
76
+
77
+ $(document).bind('##RENDER_ASCII_ART##', function(e){
78
+ $('#asciiArt').html('<pre>' + createLargeText($('#theCode').val()) + '</pre>');
79
+ });
80
+
81
+ /**** END NAMED EVENTS ****/
82
+
83
+ /**** BIND UI EVENTS ****/
84
+
85
+ // select box change
86
+ $('#fontSelector').change(function(){
87
+ $(document).trigger('##CHANGE_FONT##', {"fontName":$(this).val()})
88
+ });
89
+
90
+ // you would think jQuery.change() would cover the keypress event on select boxes?
91
+ $("#fontSelector").keypress(function (){
92
+ $(document).trigger('##CHANGE_FONT##', {"fontName":$(this).val()})
93
+ });
94
+
95
+ // keyup on textarea
96
+ $('#theCode').keyup(function(e){
97
+ $(document).trigger('##RENDER_ASCII_ART##');
98
+ });
99
+
100
+ $('#run').click(function(e){
101
+ $(document).trigger('##RENDER_ASCII_ART##');
102
+ });
103
+
104
+ /**** END UI BIND EVENTS ****/
105
+
106
+ // little bit of a onReady hack. i'll fix the API a bit so this can be done better
107
+ $(document).trigger('##CHANGE_FONT##', {"fontName":'Doh.flf'});
108
+ $('#fontSelector').val('Doh.flf');
109
+
110
+ });
111
+ </script>
112
+
113
+ </head>
114
+ <body>
115
+ <table>
116
+ <tr valign = "middle">
117
+ <td><img src = "./images/asciimo.png"/></td>
118
+ <td>
119
+ <br/>
120
+ <br/>
121
+ <br/>
122
+ <h1>greetings, i am asciimo</h1>
123
+ <h1>i create awesome ascii art with javascript!</h1>
124
+ <h1>i work in <a href = "http://github.com/marak/asciimo">node.js</a> and the <a href = "http://github.com/marak/asciimo">browser</a></h1>
125
+ <form>
126
+ <textarea id = "theCode" class = "box">art is fun</textarea>
127
+ <select id = "fontSelector" name = "fontSelector"></select>
128
+ <input type = "button" id = "run" name = "run" value = "<== change select box to change font. type in the text area to change text. click here to force render. " />
129
+ <br/>
130
+ </form>
131
+ <br/>
132
+ <span class = "ninja"><strong>protip:</strong> using a non webkit browser will let you quickly iterate through the select box using your keyboard. for some reason webkit likes to open the entire select box &gt;.&lt;</span>
133
+ </td>
134
+ </tr>
135
+ </table>
136
+ <div id = "asciiArt" class = "box">
137
+ <pre>
138
+
139
+ tttt iiii ffffffffffffffff
140
+ ttt:::t i::::i f::::::::::::::::f
141
+ t:::::t iiii f::::::::::::::::::f
142
+ t:::::t f::::::fffffff:::::f
143
+ aaaaaaaaaaaaa rrrrr rrrrrrrrr ttttttt:::::ttttttt iiiiiii ssssssssss f:::::f ffffffuuuuuu uuuuuunnnn nnnnnnnn
144
+ a::::::::::::a r::::rrr:::::::::r t:::::::::::::::::t i:::::i ss::::::::::s f:::::f u::::u u::::un:::nn::::::::nn
145
+ aaaaaaaaa:::::ar:::::::::::::::::r t:::::::::::::::::t i::::i ss:::::::::::::s f:::::::ffffff u::::u u::::un::::::::::::::nn
146
+ a::::arr::::::rrrrr::::::rtttttt:::::::tttttt i::::i s::::::ssss:::::s f::::::::::::f u::::u u::::unn:::::::::::::::n
147
+ aaaaaaa:::::a r:::::r r:::::r t:::::t i::::i s:::::s ssssss f::::::::::::f u::::u u::::u n:::::nnnn:::::n
148
+ aa::::::::::::a r:::::r rrrrrrr t:::::t i::::i s::::::s f:::::::ffffff u::::u u::::u n::::n n::::n
149
+ a::::aaaa::::::a r:::::r t:::::t i::::i s::::::s f:::::f u::::u u::::u n::::n n::::n
150
+ a::::a a:::::a r:::::r t:::::t tttttt i::::i ssssss s:::::s f:::::f u:::::uuuu:::::u n::::n n::::n
151
+ a::::a a:::::a r:::::r t::::::tttt:::::t i::::::is:::::ssss::::::s f:::::::f u:::::::::::::::uun::::n n::::n
152
+ a:::::aaaa::::::a r:::::r tt::::::::::::::t i::::::is::::::::::::::s f:::::::f u:::::::::::::::un::::n n::::n
153
+ a::::::::::aa:::ar:::::r tt:::::::::::tt i::::::i s:::::::::::ss f:::::::f uu::::::::uu:::un::::n n::::n
154
+ aaaaaaaaaa aaaarrrrrrr ttttttttttt iiiiiiii sssssssssss fffffffff uuuuuuuu uuuunnnnnn nnnnnn
155
+
156
+
157
+
158
+
159
+
160
+
161
+ </pre>
162
+
163
+
164
+ </div>
165
+ <a href = "http://github.com/marak/asciimo/">
166
+ <img alt="Fork me on GitHub" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" style="position: absolute; z-index: 10; top: 0pt; right: 0pt; border: 0pt none;">
167
+ </a>
168
+ </body>
169
+ </html>
@@ -0,0 +1,1685 @@
1
+ /*
2
+ asciimo.js - written by Marak Squires
3
+ saved from the internet @ http://patorjk.com/software/taag/
4
+
5
+ i had to do unholy things to make the original code work, seriously.
6
+ check the commit logs on github and you'll see how much "code" i had to delete and refactor.
7
+ what's left isnt really acceptable, but it does work.
8
+
9
+ let's clean this up and get a more comprehensive font database!
10
+
11
+ -- Marak
12
+ */
13
+
14
+
15
+ if(typeof exports != 'undefined'){
16
+
17
+ var fs = require('fs');
18
+ var sys = require('sys');
19
+
20
+ exports.text = function(fontName, text, callback){
21
+ fs.readFile('./fonts/' + fontName, function(err, contents){
22
+ if(err){
23
+ //sys.puts(err);
24
+ }
25
+ try{
26
+ loadFont(contents.toString());
27
+ }
28
+ catch(err){
29
+ sys.puts(('couldnt load font file ' + fontName + ' not going to render your text'));
30
+ }
31
+ var font = createLargeText(text);
32
+ callback(font);
33
+ });
34
+ };
35
+ }
36
+
37
+ /**** DRAGONS START HERE, be warned ******/
38
+
39
+ // MARAK SAYS : ughhh i think we have to setup the base state for this big fontChars array to work.
40
+ // i haven't figured out if we can just have the loadFont method handle this...
41
+ var fontChars = new Array(95);
42
+
43
+ // char height
44
+ var charHeight = 7;
45
+
46
+ // basic font info
47
+ var fontPointSize = 10;
48
+ var fontFace = "monospace";
49
+
50
+ // author's initials
51
+ var initials = "";
52
+
53
+ // font file type extension
54
+ var fontFileExt = "flf";
55
+
56
+ for (var i = 0; i < 95; i++)
57
+ {
58
+ fontChars[i] = new Array(charHeight);
59
+ }
60
+
61
+ // the first font gets hardcoded for some reason, the rest of the fonts are loaded async
62
+ // and loaded into memory with loadFont()
63
+ fontChars[0][0] = "$ $";
64
+ fontChars[0][1] = "$ $";
65
+ fontChars[0][2] = "$ $";
66
+ fontChars[0][3] = "$ $";
67
+ fontChars[0][4] = "$ $";
68
+ fontChars[0][5] = "$ $";
69
+ fontChars[0][6] = "$ $";
70
+ fontChars[1][0] = " _ ";
71
+ fontChars[1][1] = "U|\"|u ";
72
+ fontChars[1][2] = "\\| |/ ";
73
+ fontChars[1][3] = " |_| ";
74
+ fontChars[1][4] = " (_) ";
75
+ fontChars[1][5] = " |||_ ";
76
+ fontChars[1][6] = "(__)_) ";
77
+ fontChars[2][0] = "\"";
78
+ fontChars[2][1] = " ";
79
+ fontChars[2][2] = " ";
80
+ fontChars[2][3] = " ";
81
+ fontChars[2][4] = " ";
82
+ fontChars[2][5] = " ";
83
+ fontChars[2][6] = " ";
84
+ fontChars[3][0] = "";
85
+ fontChars[3][1] = " ";
86
+ fontChars[3][2] = " ";
87
+ fontChars[3][3] = " ";
88
+ fontChars[3][4] = " ";
89
+ fontChars[3][5] = " ";
90
+ fontChars[3][6] = " ";
91
+ fontChars[4][0] = "$";
92
+ fontChars[4][1] = " ";
93
+ fontChars[4][2] = " ";
94
+ fontChars[4][3] = " ";
95
+ fontChars[4][4] = " ";
96
+ fontChars[4][5] = " ";
97
+ fontChars[4][6] = " ";
98
+ fontChars[5][0] = "%";
99
+ fontChars[5][1] = " ";
100
+ fontChars[5][2] = " ";
101
+ fontChars[5][3] = " ";
102
+ fontChars[5][4] = " ";
103
+ fontChars[5][5] = " ";
104
+ fontChars[5][6] = " ";
105
+ fontChars[6][0] = "&";
106
+ fontChars[6][1] = " ";
107
+ fontChars[6][2] = " ";
108
+ fontChars[6][3] = " ";
109
+ fontChars[6][4] = " ";
110
+ fontChars[6][5] = " ";
111
+ fontChars[6][6] = " ";
112
+ fontChars[7][0] = " _ ";
113
+ fontChars[7][1] = "|\"| ";
114
+ fontChars[7][2] = "|_| ";
115
+ fontChars[7][3] = " ";
116
+ fontChars[7][4] = " ";
117
+ fontChars[7][5] = " ";
118
+ fontChars[7][6] = " ";
119
+ fontChars[8][0] = "(";
120
+ fontChars[8][1] = " ";
121
+ fontChars[8][2] = " ";
122
+ fontChars[8][3] = " ";
123
+ fontChars[8][4] = " ";
124
+ fontChars[8][5] = " ";
125
+ fontChars[8][6] = " ";
126
+ fontChars[9][0] = ")";
127
+ fontChars[9][1] = " ";
128
+ fontChars[9][2] = " ";
129
+ fontChars[9][3] = " ";
130
+ fontChars[9][4] = " ";
131
+ fontChars[9][5] = " ";
132
+ fontChars[9][6] = " ";
133
+ fontChars[10][0] = "*";
134
+ fontChars[10][1] = " ";
135
+ fontChars[10][2] = " ";
136
+ fontChars[10][3] = " ";
137
+ fontChars[10][4] = " ";
138
+ fontChars[10][5] = " ";
139
+ fontChars[10][6] = " ";
140
+ fontChars[11][0] = "+";
141
+ fontChars[11][1] = " ";
142
+ fontChars[11][2] = " ";
143
+ fontChars[11][3] = " ";
144
+ fontChars[11][4] = " ";
145
+ fontChars[11][5] = " ";
146
+ fontChars[11][6] = " ";
147
+ fontChars[12][0] = " ";
148
+ fontChars[12][1] = " ";
149
+ fontChars[12][2] = " ";
150
+ fontChars[12][3] = " ";
151
+ fontChars[12][4] = " _ ";
152
+ fontChars[12][5] = "(\") ";
153
+ fontChars[12][6] = " \\| ";
154
+ fontChars[13][0] = " ";
155
+ fontChars[13][1] = " ";
156
+ fontChars[13][2] = " U u ";
157
+ fontChars[13][3] = " /___\\ ";
158
+ fontChars[13][4] = "|__\"__| ";
159
+ fontChars[13][5] = " ";
160
+ fontChars[13][6] = " ";
161
+ fontChars[14][0] = " ";
162
+ fontChars[14][1] = " ";
163
+ fontChars[14][2] = " ";
164
+ fontChars[14][3] = " ";
165
+ fontChars[14][4] = " _ ";
166
+ fontChars[14][5] = "(\") ";
167
+ fontChars[14][6] = " \" ";
168
+ fontChars[15][0] = "/";
169
+ fontChars[15][1] = " ";
170
+ fontChars[15][2] = " ";
171
+ fontChars[15][3] = " ";
172
+ fontChars[15][4] = " ";
173
+ fontChars[15][5] = " ";
174
+ fontChars[15][6] = " ";
175
+ fontChars[16][0] = " ___ ";
176
+ fontChars[16][1] = " / _\"\\ u ";
177
+ fontChars[16][2] = "| / U |/ ";
178
+ fontChars[16][3] = "| \\// |,-. ";
179
+ fontChars[16][4] = " \\___/(_/ ";
180
+ fontChars[16][5] = " // ";
181
+ fontChars[16][6] = " (__) ";
182
+ fontChars[17][0] = " _ ";
183
+ fontChars[17][1] = " /\"| ";
184
+ fontChars[17][2] = " u | |u ";
185
+ fontChars[17][3] = " \\| |/ ";
186
+ fontChars[17][4] = " |_| ";
187
+ fontChars[17][5] = " _//<,-, ";
188
+ fontChars[17][6] = "(__)(_/ ";
189
+ fontChars[18][0] = " ____ ";
190
+ fontChars[18][1] = " |___\"\\ ";
191
+ fontChars[18][2] = " U __) | ";
192
+ fontChars[18][3] = " \\/ __/ \\ ";
193
+ fontChars[18][4] = " |_____|u ";
194
+ fontChars[18][5] = " << // ";
195
+ fontChars[18][6] = "(__)(__) ";
196
+ fontChars[19][0] = " _____ ";
197
+ fontChars[19][1] = "|___\"/u ";
198
+ fontChars[19][2] = "U_|_ \\/ ";
199
+ fontChars[19][3] = " ___) | ";
200
+ fontChars[19][4] = "|____/ ";
201
+ fontChars[19][5] = " _// \\\\ ";
202
+ fontChars[19][6] = "(__)(__) ";
203
+ fontChars[20][0] = " _ _ ";
204
+ fontChars[20][1] = "| ||\"| ";
205
+ fontChars[20][2] = "| || |_ ";
206
+ fontChars[20][3] = "|__ _| ";
207
+ fontChars[20][4] = " /|_|\\ ";
208
+ fontChars[20][5] = " u_|||_u ";
209
+ fontChars[20][6] = " (__)__) ";
210
+ fontChars[21][0] = " ____ ";
211
+ fontChars[21][1] = "U|\"___|u ";
212
+ fontChars[21][2] = "\\|___ \\/ ";
213
+ fontChars[21][3] = " ___) | ";
214
+ fontChars[21][4] = " |____/ ";
215
+ fontChars[21][5] = ",-,>>\\,-. ";
216
+ fontChars[21][6] = " \\ ) (_/ ";
217
+ fontChars[22][0] = " __ ";
218
+ fontChars[22][1] = "U /\"/_ u ";
219
+ fontChars[22][2] = "\\| '_ \\/ ";
220
+ fontChars[22][3] = " | (_) | ";
221
+ fontChars[22][4] = " \\___/ ";
222
+ fontChars[22][5] = " _// \\\\_ ";
223
+ fontChars[22][6] = "(__) (__) ";
224
+ fontChars[23][0] = " _____ ";
225
+ fontChars[23][1] = " |___ \"| ";
226
+ fontChars[23][2] = " / / ";
227
+ fontChars[23][3] = " u// /\\ ";
228
+ fontChars[23][4] = " /_/ U ";
229
+ fontChars[23][5] = " <<>>_ ";
230
+ fontChars[23][6] = "(__)__) ";
231
+ fontChars[24][0] = " ___ ";
232
+ fontChars[24][1] = "U( \" ) u ";
233
+ fontChars[24][2] = "\\/ \\/ ";
234
+ fontChars[24][3] = "| ( ) | ";
235
+ fontChars[24][4] = " \\___/>> ";
236
+ fontChars[24][5] = " )( (__) ";
237
+ fontChars[24][6] = " (__) ";
238
+ fontChars[25][0] = " ___ ";
239
+ fontChars[25][1] = " / _\"\\ ";
240
+ fontChars[25][2] = " | (_) | ";
241
+ fontChars[25][3] = " /\\__, |\\ ";
242
+ fontChars[25][4] = "U<< |_/ u ";
243
+ fontChars[25][5] = "(__) )( ";
244
+ fontChars[25][6] = " (__) ";
245
+ fontChars[26][0] = " ";
246
+ fontChars[26][1] = " _ ";
247
+ fontChars[26][2] = "(\") ";
248
+ fontChars[26][3] = " ";
249
+ fontChars[26][4] = " _ ";
250
+ fontChars[26][5] = "(\") ";
251
+ fontChars[26][6] = " ";
252
+ fontChars[27][0] = ";";
253
+ fontChars[27][1] = " ";
254
+ fontChars[27][2] = " ";
255
+ fontChars[27][3] = " ";
256
+ fontChars[27][4] = " ";
257
+ fontChars[27][5] = " ";
258
+ fontChars[27][6] = " ";
259
+ fontChars[28][0] = "<";
260
+ fontChars[28][1] = " ";
261
+ fontChars[28][2] = " ";
262
+ fontChars[28][3] = " ";
263
+ fontChars[28][4] = " ";
264
+ fontChars[28][5] = " ";
265
+ fontChars[28][6] = " ";
266
+ fontChars[29][0] = "=";
267
+ fontChars[29][1] = " ";
268
+ fontChars[29][2] = " ";
269
+ fontChars[29][3] = " ";
270
+ fontChars[29][4] = " ";
271
+ fontChars[29][5] = " ";
272
+ fontChars[29][6] = " ";
273
+ fontChars[30][0] = ">";
274
+ fontChars[30][1] = " ";
275
+ fontChars[30][2] = " ";
276
+ fontChars[30][3] = " ";
277
+ fontChars[30][4] = " ";
278
+ fontChars[30][5] = " ";
279
+ fontChars[30][6] = " ";
280
+ fontChars[31][0] = " ___ ";
281
+ fontChars[31][1] = " |__\"\\ ";
282
+ fontChars[31][2] = "U / /u ";
283
+ fontChars[31][3] = " \\|_|/ ";
284
+ fontChars[31][4] = " (_) ";
285
+ fontChars[31][5] = " _//\\,-. ";
286
+ fontChars[31][6] = "(__)( / ";
287
+ fontChars[32][0] = "@";
288
+ fontChars[32][1] = " ";
289
+ fontChars[32][2] = " ";
290
+ fontChars[32][3] = " ";
291
+ fontChars[32][4] = " ";
292
+ fontChars[32][5] = " ";
293
+ fontChars[32][6] = " ";
294
+ fontChars[33][0] = " _ ";
295
+ fontChars[33][1] = "U /\"\\ u ";
296
+ fontChars[33][2] = " \\/ _ \\/ ";
297
+ fontChars[33][3] = " / ___ \\ ";
298
+ fontChars[33][4] = "/_/ \\_\\ ";
299
+ fontChars[33][5] = " \\\\ >> ";
300
+ fontChars[33][6] = "(__) (__) ";
301
+ fontChars[34][0] = " ____ ";
302
+ fontChars[34][1] = "U | __\")u ";
303
+ fontChars[34][2] = " \\| _ \\/ ";
304
+ fontChars[34][3] = " | |_) | ";
305
+ fontChars[34][4] = " |____/ ";
306
+ fontChars[34][5] = " _|| \\\\_ ";
307
+ fontChars[34][6] = "(__) (__) ";
308
+ fontChars[35][0] = " ____ ";
309
+ fontChars[35][1] = "U /\"___| ";
310
+ fontChars[35][2] = "\\| | u ";
311
+ fontChars[35][3] = " | |/__ ";
312
+ fontChars[35][4] = " \\____| ";
313
+ fontChars[35][5] = " _// \\\\ ";
314
+ fontChars[35][6] = "(__)(__) ";
315
+ fontChars[36][0] = " ____ ";
316
+ fontChars[36][1] = " | _\"\\ ";
317
+ fontChars[36][2] = "/| | | | ";
318
+ fontChars[36][3] = "U| |_| |\\ ";
319
+ fontChars[36][4] = " |____/ u ";
320
+ fontChars[36][5] = " |||_ ";
321
+ fontChars[36][6] = " (__)_) ";
322
+ fontChars[37][0] = "U _____ u ";
323
+ fontChars[37][1] = "\\| ___\"|/ ";
324
+ fontChars[37][2] = " | _|\" ";
325
+ fontChars[37][3] = " | |___ ";
326
+ fontChars[37][4] = " |_____| ";
327
+ fontChars[37][5] = " << >> ";
328
+ fontChars[37][6] = "(__) (__) ";
329
+ fontChars[38][0] = " _____ ";
330
+ fontChars[38][1] = " |\" ___| ";
331
+ fontChars[38][2] = "U| |_ u ";
332
+ fontChars[38][3] = "\\| _|/ ";
333
+ fontChars[38][4] = " |_| ";
334
+ fontChars[38][5] = " )(\\\\,- ";
335
+ fontChars[38][6] = "(__)(_/ ";
336
+ fontChars[39][0] = " ____ ";
337
+ fontChars[39][1] = "U /\"___|u ";
338
+ fontChars[39][2] = "\\| | _ / ";
339
+ fontChars[39][3] = " | |_| | ";
340
+ fontChars[39][4] = " \\____| ";
341
+ fontChars[39][5] = " _)(|_ ";
342
+ fontChars[39][6] = " (__)__) ";
343
+ fontChars[40][0] = " _ _ ";
344
+ fontChars[40][1] = " |'| |'| ";
345
+ fontChars[40][2] = "/| |_| |\\ ";
346
+ fontChars[40][3] = "U| _ |u ";
347
+ fontChars[40][4] = " |_| |_| ";
348
+ fontChars[40][5] = " // \\\\ ";
349
+ fontChars[40][6] = "(_\") (\"_) ";
350
+ fontChars[41][0] = " ";
351
+ fontChars[41][1] = " ___ ";
352
+ fontChars[41][2] = " |_\"_| ";
353
+ fontChars[41][3] = " | | ";
354
+ fontChars[41][4] = " U/| |\\u ";
355
+ fontChars[41][5] = ".-,_|___|_,-. ";
356
+ fontChars[41][6] = " \\_)-' '-(_/ ";
357
+ fontChars[42][0] = " _ ";
358
+ fontChars[42][1] = " U |\"| u ";
359
+ fontChars[42][2] = " _ \\| |/ ";
360
+ fontChars[42][3] = "| |_| |_,-. ";
361
+ fontChars[42][4] = " \\___/-(_/ ";
362
+ fontChars[42][5] = " _// ";
363
+ fontChars[42][6] = " (__) ";
364
+ fontChars[43][0] = " _ __ ";
365
+ fontChars[43][1] = " |\"|/ / ";
366
+ fontChars[43][2] = " | ' / ";
367
+ fontChars[43][3] = "U/| . \\\\u ";
368
+ fontChars[43][4] = " |_|\\_\\ ";
369
+ fontChars[43][5] = ",-,>> \\\\,-. ";
370
+ fontChars[43][6] = " \\.) (_/ ";
371
+ fontChars[44][0] = " _ ";
372
+ fontChars[44][1] = " |\"| ";
373
+ fontChars[44][2] = "U | | u ";
374
+ fontChars[44][3] = " \\| |/__ ";
375
+ fontChars[44][4] = " |_____| ";
376
+ fontChars[44][5] = " // \\\\ ";
377
+ fontChars[44][6] = " (_\")(\"_) ";
378
+ fontChars[45][0] = " __ __ ";
379
+ fontChars[45][1] = "U|' \\/ '|u ";
380
+ fontChars[45][2] = "\\| |\\/| |/ ";
381
+ fontChars[45][3] = " | | | | ";
382
+ fontChars[45][4] = " |_| |_| ";
383
+ fontChars[45][5] = "<<,-,,-. ";
384
+ fontChars[45][6] = " (./ \\.) ";
385
+ fontChars[46][0] = " _ _ ";
386
+ fontChars[46][1] = " | \\ |\"| ";
387
+ fontChars[46][2] = "<| \\| |> ";
388
+ fontChars[46][3] = "U| |\\ |u ";
389
+ fontChars[46][4] = " |_| \\_| ";
390
+ fontChars[46][5] = " || \\\\,-. ";
391
+ fontChars[46][6] = " (_\") (_/ ";
392
+ fontChars[47][0] = " U ___ u ";
393
+ fontChars[47][1] = " \\/\"_ \\/ ";
394
+ fontChars[47][2] = " | | | | ";
395
+ fontChars[47][3] = ".-,_| |_| | ";
396
+ fontChars[47][4] = " \\_)-\\___/ ";
397
+ fontChars[47][5] = " \\\\ ";
398
+ fontChars[47][6] = " (__) ";
399
+ fontChars[48][0] = " ____ ";
400
+ fontChars[48][1] = "U| _\"\\ u ";
401
+ fontChars[48][2] = "\\| |_) |/ ";
402
+ fontChars[48][3] = " | __/ ";
403
+ fontChars[48][4] = " |_| ";
404
+ fontChars[48][5] = " ||>>_ ";
405
+ fontChars[48][6] = "(__)__) ";
406
+ fontChars[49][0] = " ___ ";
407
+ fontChars[49][1] = " / \" \\ ";
408
+ fontChars[49][2] = " | |\"| | ";
409
+ fontChars[49][3] = "/| |_| |\\ ";
410
+ fontChars[49][4] = "U \\__\\_\\u ";
411
+ fontChars[49][5] = " \\\\// ";
412
+ fontChars[49][6] = " (_(__) ";
413
+ fontChars[50][0] = " ____ ";
414
+ fontChars[50][1] = "U | _\"\\ u ";
415
+ fontChars[50][2] = " \\| |_) |/ ";
416
+ fontChars[50][3] = " | _ < ";
417
+ fontChars[50][4] = " |_| \\_\\ ";
418
+ fontChars[50][5] = " // \\\\_ ";
419
+ fontChars[50][6] = " (__) (__) ";
420
+ fontChars[51][0] = " ____ ";
421
+ fontChars[51][1] = " / __\"| u ";
422
+ fontChars[51][2] = "<\\___ \\/ ";
423
+ fontChars[51][3] = " u___) | ";
424
+ fontChars[51][4] = " |____/>> ";
425
+ fontChars[51][5] = " )( (__) ";
426
+ fontChars[51][6] = " (__) ";
427
+ fontChars[52][0] = " _____ ";
428
+ fontChars[52][1] = " |_ \" _| ";
429
+ fontChars[52][2] = " | | ";
430
+ fontChars[52][3] = " /| |\\ ";
431
+ fontChars[52][4] = " u |_|U ";
432
+ fontChars[52][5] = " _// \\\\_ ";
433
+ fontChars[52][6] = "(__) (__) ";
434
+ fontChars[53][0] = " _ _ ";
435
+ fontChars[53][1] = "U |\"|u| | ";
436
+ fontChars[53][2] = " \\| |\\| | ";
437
+ fontChars[53][3] = " | |_| | ";
438
+ fontChars[53][4] = " <<\\___/ ";
439
+ fontChars[53][5] = "(__) )( ";
440
+ fontChars[53][6] = " (__) ";
441
+ fontChars[54][0] = " __ __ ";
442
+ fontChars[54][1] = " \\ \\ /\"/u ";
443
+ fontChars[54][2] = " \\ \\ / // ";
444
+ fontChars[54][3] = " /\\ V /_,-. ";
445
+ fontChars[54][4] = " U \\_/-(_/ ";
446
+ fontChars[54][5] = " // ";
447
+ fontChars[54][6] = " (__) ";
448
+ fontChars[55][0] = " ";
449
+ fontChars[55][1] = " __ __ ";
450
+ fontChars[55][2] = " \\\"\\ /\"/ ";
451
+ fontChars[55][3] = " /\\ \\ /\\ / /\\ ";
452
+ fontChars[55][4] = "U \\ V V / U";
453
+ fontChars[55][5] = ".-,_\\ /\\ /_,-.";
454
+ fontChars[55][6] = " \\_)-' '-(_/ ";
455
+ fontChars[56][0] = " __ __ ";
456
+ fontChars[56][1] = " \\ \\/\"/ ";
457
+ fontChars[56][2] = " /\\ /\\ ";
458
+ fontChars[56][3] = " U / \\ u ";
459
+ fontChars[56][4] = " /_/\\_\\ ";
460
+ fontChars[56][5] = ",-,>> \\\\_ ";
461
+ fontChars[56][6] = " \\_) (__) ";
462
+ fontChars[57][0] = " __ __ ";
463
+ fontChars[57][1] = " \\ \\ / / ";
464
+ fontChars[57][2] = " \\ V / ";
465
+ fontChars[57][3] = " U_|\"|_u ";
466
+ fontChars[57][4] = " |_| ";
467
+ fontChars[57][5] = ".-,//|(_ ";
468
+ fontChars[57][6] = " \\_) (__) ";
469
+ fontChars[58][0] = " _____ ";
470
+ fontChars[58][1] = " |\"_ /u ";
471
+ fontChars[58][2] = " U / // ";
472
+ fontChars[58][3] = " \\/ /_ ";
473
+ fontChars[58][4] = " /____| ";
474
+ fontChars[58][5] = " _//<<,- ";
475
+ fontChars[58][6] = "(__) (_/ ";
476
+ fontChars[59][0] = "[";
477
+ fontChars[59][1] = " ";
478
+ fontChars[59][2] = " ";
479
+ fontChars[59][3] = " ";
480
+ fontChars[59][4] = " ";
481
+ fontChars[59][5] = " ";
482
+ fontChars[59][6] = " ";
483
+ fontChars[60][0] = "\\";
484
+ fontChars[60][1] = " ";
485
+ fontChars[60][2] = " ";
486
+ fontChars[60][3] = " ";
487
+ fontChars[60][4] = " ";
488
+ fontChars[60][5] = " ";
489
+ fontChars[60][6] = " ";
490
+ fontChars[61][0] = "]";
491
+ fontChars[61][1] = " ";
492
+ fontChars[61][2] = " ";
493
+ fontChars[61][3] = " ";
494
+ fontChars[61][4] = " ";
495
+ fontChars[61][5] = " ";
496
+ fontChars[61][6] = " ";
497
+ fontChars[62][0] = "U _ u ";
498
+ fontChars[62][1] = "\\/\"\\/ ";
499
+ fontChars[62][2] = "|/`\\| ";
500
+ fontChars[62][3] = " ";
501
+ fontChars[62][4] = " ";
502
+ fontChars[62][5] = " ";
503
+ fontChars[62][6] = " ";
504
+ fontChars[63][0] = "_";
505
+ fontChars[63][1] = " ";
506
+ fontChars[63][2] = " ";
507
+ fontChars[63][3] = " ";
508
+ fontChars[63][4] = " ";
509
+ fontChars[63][5] = " ";
510
+ fontChars[63][6] = " ";
511
+ fontChars[64][0] = " ___ ";
512
+ fontChars[64][1] = "(\" / ";
513
+ fontChars[64][2] = " )/ ";
514
+ fontChars[64][3] = " ";
515
+ fontChars[64][4] = " ";
516
+ fontChars[64][5] = " ";
517
+ fontChars[64][6] = " ";
518
+ fontChars[65][0] = " _ ";
519
+ fontChars[65][1] = "U /\"\\ u ";
520
+ fontChars[65][2] = " \\/ _ \\/ ";
521
+ fontChars[65][3] = " / ___ \\ ";
522
+ fontChars[65][4] = "/_/ \\_\\ ";
523
+ fontChars[65][5] = " \\\\ >> ";
524
+ fontChars[65][6] = "(__) (__) ";
525
+ fontChars[66][0] = " ____ ";
526
+ fontChars[66][1] = "U | __\")u ";
527
+ fontChars[66][2] = " \\| _ \\/ ";
528
+ fontChars[66][3] = " | |_) | ";
529
+ fontChars[66][4] = " |____/ ";
530
+ fontChars[66][5] = " _|| \\\\_ ";
531
+ fontChars[66][6] = "(__) (__) ";
532
+ fontChars[67][0] = " ____ ";
533
+ fontChars[67][1] = "U /\"___| ";
534
+ fontChars[67][2] = "\\| | u ";
535
+ fontChars[67][3] = " | |/__ ";
536
+ fontChars[67][4] = " \\____| ";
537
+ fontChars[67][5] = " _// \\\\ ";
538
+ fontChars[67][6] = "(__)(__) ";
539
+ fontChars[68][0] = " ____ ";
540
+ fontChars[68][1] = " | _\"\\ ";
541
+ fontChars[68][2] = "/| | | | ";
542
+ fontChars[68][3] = "U| |_| |\\ ";
543
+ fontChars[68][4] = " |____/ u ";
544
+ fontChars[68][5] = " |||_ ";
545
+ fontChars[68][6] = " (__)_) ";
546
+ fontChars[69][0] = "U _____ u ";
547
+ fontChars[69][1] = "\\| ___\"|/ ";
548
+ fontChars[69][2] = " | _|\" ";
549
+ fontChars[69][3] = " | |___ ";
550
+ fontChars[69][4] = " |_____| ";
551
+ fontChars[69][5] = " << >> ";
552
+ fontChars[69][6] = "(__) (__) ";
553
+ fontChars[70][0] = " _____ ";
554
+ fontChars[70][1] = " |\" ___| ";
555
+ fontChars[70][2] = "U| |_ u ";
556
+ fontChars[70][3] = "\\| _|/ ";
557
+ fontChars[70][4] = " |_| ";
558
+ fontChars[70][5] = " )(\\\\,- ";
559
+ fontChars[70][6] = "(__)(_/ ";
560
+ fontChars[71][0] = " ____ ";
561
+ fontChars[71][1] = "U /\"___|u ";
562
+ fontChars[71][2] = "\\| | _ / ";
563
+ fontChars[71][3] = " | |_| | ";
564
+ fontChars[71][4] = " \\____| ";
565
+ fontChars[71][5] = " _)(|_ ";
566
+ fontChars[71][6] = " (__)__) ";
567
+ fontChars[72][0] = " _ _ ";
568
+ fontChars[72][1] = " |'| |'| ";
569
+ fontChars[72][2] = "/| |_| |\\ ";
570
+ fontChars[72][3] = "U| _ |u ";
571
+ fontChars[72][4] = " |_| |_| ";
572
+ fontChars[72][5] = " // \\\\ ";
573
+ fontChars[72][6] = "(_\") (\"_) ";
574
+ fontChars[73][0] = " ";
575
+ fontChars[73][1] = " ___ ";
576
+ fontChars[73][2] = " |_\"_| ";
577
+ fontChars[73][3] = " | | ";
578
+ fontChars[73][4] = " U/| |\\u ";
579
+ fontChars[73][5] = ".-,_|___|_,-. ";
580
+ fontChars[73][6] = " \\_)-' '-(_/ ";
581
+ fontChars[74][0] = " _ ";
582
+ fontChars[74][1] = " U |\"| u ";
583
+ fontChars[74][2] = " _ \\| |/ ";
584
+ fontChars[74][3] = "| |_| |_,-. ";
585
+ fontChars[74][4] = " \\___/-(_/ ";
586
+ fontChars[74][5] = " _// ";
587
+ fontChars[74][6] = " (__) ";
588
+ fontChars[75][0] = " _ __ ";
589
+ fontChars[75][1] = " |\"|/ / ";
590
+ fontChars[75][2] = " | ' / ";
591
+ fontChars[75][3] = "U/| . \\\\u ";
592
+ fontChars[75][4] = " |_|\\_\\ ";
593
+ fontChars[75][5] = ",-,>> \\\\,-. ";
594
+ fontChars[75][6] = " \\.) (_/ ";
595
+ fontChars[76][0] = " _ ";
596
+ fontChars[76][1] = " |\"| ";
597
+ fontChars[76][2] = "U | | u ";
598
+ fontChars[76][3] = " \\| |/__ ";
599
+ fontChars[76][4] = " |_____| ";
600
+ fontChars[76][5] = " // \\\\ ";
601
+ fontChars[76][6] = " (_\")(\"_) ";
602
+ fontChars[77][0] = " __ __ ";
603
+ fontChars[77][1] = "U|' \\/ '|u ";
604
+ fontChars[77][2] = "\\| |\\/| |/ ";
605
+ fontChars[77][3] = " | | | | ";
606
+ fontChars[77][4] = " |_| |_| ";
607
+ fontChars[77][5] = "<<,-,,-. ";
608
+ fontChars[77][6] = " (./ \\.) ";
609
+ fontChars[78][0] = " _ _ ";
610
+ fontChars[78][1] = " | \\ |\"| ";
611
+ fontChars[78][2] = "<| \\| |> ";
612
+ fontChars[78][3] = "U| |\\ |u ";
613
+ fontChars[78][4] = " |_| \\_| ";
614
+ fontChars[78][5] = " || \\\\,-. ";
615
+ fontChars[78][6] = " (_\") (_/ ";
616
+ fontChars[79][0] = " U ___ u ";
617
+ fontChars[79][1] = " \\/\"_ \\/ ";
618
+ fontChars[79][2] = " | | | | ";
619
+ fontChars[79][3] = ".-,_| |_| | ";
620
+ fontChars[79][4] = " \\_)-\\___/ ";
621
+ fontChars[79][5] = " \\\\ ";
622
+ fontChars[79][6] = " (__) ";
623
+ fontChars[80][0] = " ____ ";
624
+ fontChars[80][1] = "U| _\"\\ u ";
625
+ fontChars[80][2] = "\\| |_) |/ ";
626
+ fontChars[80][3] = " | __/ ";
627
+ fontChars[80][4] = " |_| ";
628
+ fontChars[80][5] = " ||>>_ ";
629
+ fontChars[80][6] = "(__)__) ";
630
+ fontChars[81][0] = " ___ ";
631
+ fontChars[81][1] = " / \" \\ ";
632
+ fontChars[81][2] = " | |\"| | ";
633
+ fontChars[81][3] = "/| |_| |\\ ";
634
+ fontChars[81][4] = "U \\__\\_\\u ";
635
+ fontChars[81][5] = " \\\\// ";
636
+ fontChars[81][6] = " (_(__) ";
637
+ fontChars[82][0] = " ____ ";
638
+ fontChars[82][1] = "U | _\"\\ u ";
639
+ fontChars[82][2] = " \\| |_) |/ ";
640
+ fontChars[82][3] = " | _ < ";
641
+ fontChars[82][4] = " |_| \\_\\ ";
642
+ fontChars[82][5] = " // \\\\_ ";
643
+ fontChars[82][6] = " (__) (__) ";
644
+ fontChars[83][0] = " ____ ";
645
+ fontChars[83][1] = " / __\"| u ";
646
+ fontChars[83][2] = "<\\___ \\/ ";
647
+ fontChars[83][3] = " u___) | ";
648
+ fontChars[83][4] = " |____/>> ";
649
+ fontChars[83][5] = " )( (__) ";
650
+ fontChars[83][6] = " (__) ";
651
+ fontChars[84][0] = " _____ ";
652
+ fontChars[84][1] = " |_ \" _| ";
653
+ fontChars[84][2] = " | | ";
654
+ fontChars[84][3] = " /| |\\ ";
655
+ fontChars[84][4] = " u |_|U ";
656
+ fontChars[84][5] = " _// \\\\_ ";
657
+ fontChars[84][6] = "(__) (__) ";
658
+ fontChars[85][0] = " _ _ ";
659
+ fontChars[85][1] = "U |\"|u| | ";
660
+ fontChars[85][2] = " \\| |\\| | ";
661
+ fontChars[85][3] = " | |_| | ";
662
+ fontChars[85][4] = " <<\\___/ ";
663
+ fontChars[85][5] = "(__) )( ";
664
+ fontChars[85][6] = " (__) ";
665
+ fontChars[86][0] = " __ __ ";
666
+ fontChars[86][1] = " \\ \\ /\"/u ";
667
+ fontChars[86][2] = " \\ \\ / // ";
668
+ fontChars[86][3] = " /\\ V /_,-. ";
669
+ fontChars[86][4] = " U \\_/-(_/ ";
670
+ fontChars[86][5] = " // ";
671
+ fontChars[86][6] = " (__) ";
672
+ fontChars[87][0] = " ";
673
+ fontChars[87][1] = " __ __ ";
674
+ fontChars[87][2] = " \\\"\\ /\"/ ";
675
+ fontChars[87][3] = " /\\ \\ /\\ / /\\ ";
676
+ fontChars[87][4] = "U \\ V V / U";
677
+ fontChars[87][5] = ".-,_\\ /\\ /_,-.";
678
+ fontChars[87][6] = " \\_)-' '-(_/ ";
679
+ fontChars[88][0] = " __ __ ";
680
+ fontChars[88][1] = " \\ \\/\"/ ";
681
+ fontChars[88][2] = " /\\ /\\ ";
682
+ fontChars[88][3] = " U / \\ u ";
683
+ fontChars[88][4] = " /_/\\_\\ ";
684
+ fontChars[88][5] = ",-,>> \\\\_ ";
685
+ fontChars[88][6] = " \\_) (__) ";
686
+ fontChars[89][0] = " __ __ ";
687
+ fontChars[89][1] = " \\ \\ / / ";
688
+ fontChars[89][2] = " \\ V / ";
689
+ fontChars[89][3] = " U_|\"|_u ";
690
+ fontChars[89][4] = " |_| ";
691
+ fontChars[89][5] = ".-,//|(_ ";
692
+ fontChars[89][6] = " \\_) (__) ";
693
+ fontChars[90][0] = " _____ ";
694
+ fontChars[90][1] = " |\"_ /u ";
695
+ fontChars[90][2] = " U / // ";
696
+ fontChars[90][3] = " \\/ /_ ";
697
+ fontChars[90][4] = " /____| ";
698
+ fontChars[90][5] = " _//<<,- ";
699
+ fontChars[90][6] = "(__) (_/ ";
700
+ fontChars[91][0] = " __ ";
701
+ fontChars[91][1] = "u /\"/U ";
702
+ fontChars[91][2] = " \\| |/ ";
703
+ fontChars[91][3] = " < < ";
704
+ fontChars[91][4] = " | | ";
705
+ fontChars[91][5] = " <<\\_\\ ";
706
+ fontChars[91][6] = "(__)_) ";
707
+ fontChars[92][0] = "|";
708
+ fontChars[92][1] = " ";
709
+ fontChars[92][2] = " ";
710
+ fontChars[92][3] = " ";
711
+ fontChars[92][4] = " ";
712
+ fontChars[92][5] = " ";
713
+ fontChars[92][6] = " ";
714
+ fontChars[93][0] = "__ ";
715
+ fontChars[93][1] = "\\\"\\ u ";
716
+ fontChars[93][2] = " | |/ ";
717
+ fontChars[93][3] = "/ > > ";
718
+ fontChars[93][4] = "U| | ";
719
+ fontChars[93][5] = "/_/>>_ ";
720
+ fontChars[93][6] = " (_(__) ";
721
+ fontChars[94][0] = "~";
722
+ fontChars[94][1] = " ";
723
+ fontChars[94][2] = " ";
724
+ fontChars[94][3] = " ";
725
+ fontChars[94][4] = " ";
726
+ fontChars[94][5] = " ";
727
+ fontChars[94][6] = " ";
728
+
729
+ // this variable lets us know the last page the user clicked
730
+ // this is useful when changing colors of the display (background / text color)
731
+
732
+ // 0 = output page
733
+ // 1 = author page
734
+ // 2 = test all page
735
+
736
+
737
+ function convert_to_boolean(str)
738
+ {
739
+ var ret = false;
740
+ if (str == "true")
741
+ {
742
+ ret = true;
743
+ }
744
+ return ret;
745
+ }
746
+
747
+
748
+ function loadFont(fontText)
749
+ {
750
+
751
+ var retData =fontText;
752
+ var retArray = retData.split("\n");
753
+
754
+ var retIndex = 0;
755
+
756
+ theFontName = retArray[retIndex++];
757
+
758
+ fontFileExt = retArray[retIndex++];
759
+ fontPointSize = retArray[retIndex++];
760
+ fontFace = retArray[retIndex++];
761
+ initials = retArray[retIndex++];
762
+ hardblank = retArray[retIndex++];
763
+ printDirection = retArray[retIndex++];
764
+ hFullWidth = convert_to_boolean(retArray[retIndex++]);
765
+ hFitting = convert_to_boolean(retArray[retIndex++]);
766
+ hSmush1 = convert_to_boolean(retArray[retIndex++]);
767
+ hSmush2 = convert_to_boolean(retArray[retIndex++]);
768
+ hSmush3 = convert_to_boolean(retArray[retIndex++]);
769
+ hSmush4 = convert_to_boolean(retArray[retIndex++]);
770
+ hSmush5 = convert_to_boolean(retArray[retIndex++]);
771
+ hSmush6 = convert_to_boolean(retArray[retIndex++]);
772
+ var numChars = retArray[retIndex++];
773
+ charHeight = retArray[retIndex++];
774
+
775
+ //alert(hFitting + "," + hFullWidth + "," + hSmush1 + "," + hSmush2 + "," + hSmush3);
776
+ //alert(fontFileExt + "," + fontPointSize + "," +fontFace + "," + initials + "," + hardblank);
777
+
778
+ fontChars = null;
779
+ fontChars = new Array(numChars);
780
+
781
+ for (var i = 0; i < numChars; i++)
782
+ {
783
+ fontChars[i] = new Array(charHeight);
784
+ }
785
+
786
+ var inLoop = 0;
787
+
788
+ for (i = 0; i < numChars; i++)
789
+ {
790
+ for (var i2 = 0; i2 < charHeight; i2++)
791
+ {
792
+ if ( fontFileExt == "aol" )
793
+ {
794
+ fontChars[i][i2] = text_decode(retArray[retIndex]);
795
+ }
796
+ else
797
+ {
798
+ fontChars[i][i2] = retArray[retIndex];
799
+ }
800
+
801
+ // replace escape sequences
802
+ fontChars[i][i2] = fontChars[i][i2].replace(/</g, "<");
803
+ fontChars[i][i2] = fontChars[i][i2].replace(/>/g, ">");
804
+ fontChars[i][i2] = fontChars[i][i2].replace(/\\"/g, "\"");
805
+ fontChars[i][i2] = fontChars[i][i2].replace(/\\\\/g, "\\");
806
+ retIndex++;
807
+
808
+ inLoop++;
809
+ }
810
+ }
811
+
812
+ // the author's comments
813
+ authorComments = "";
814
+ for (var i2 = retIndex; i2 < retArray.length; i2++)
815
+ {
816
+ authorComments = authorComments + retArray[i2] + "\n";
817
+ }
818
+ authorComments = authorComments.replace(/\\"/g, "\"");
819
+ authorComments = authorComments.replace(/\\\\/g, "\\");
820
+
821
+ // MARAK SAYS : this should be moot now that we have some real seperation of concerns and control flow, fucking legacy code
822
+ //generateText(document.fontSettings.inputText.value);
823
+
824
+ curFontName = theFontName;
825
+ }
826
+
827
+
828
+
829
+
830
+
831
+
832
+ var defaultHorizontalSmush = true;
833
+
834
+ var hFullWidth = false;
835
+ var hUnivSmush = false;
836
+ var hFitting = false;
837
+ var hSmush1 = true;
838
+ var hSmush2 = false;
839
+ var hSmush3 = false;
840
+ var hSmush4 = false;
841
+ var hSmush5 = false;
842
+ var hSmush6 = false;
843
+
844
+ var vFullWidth = true;
845
+ var vUnivSmush = false;
846
+ var vFitting = false;
847
+ var vSmush1 = false;
848
+ var vSmush2 = false;
849
+ var vSmush3 = false;
850
+ var vSmush4 = false;
851
+ var vSmush5 = false;
852
+ var hardblank = "$";
853
+
854
+ var printDirection = 0;
855
+
856
+ var authorComments = "Author : Myflix<br/>Date : 2003/10/18 21:37:14<br/>Version: 1.0<br/>-------------------------------------------------<br/><br/>-------------------------------------------------<br/>This font has been created using JavE's FIGlet font export assistant.<br/>Have a look at: http://www.jave.de<br/><br/>Permission is hereby given to modify this font, as long as the<br/>modifier's name is placed on a comment line.<br/><br/>---<br/><br/>Font modified June 17, 2007 by patorjk <br/>This was to widen the space character.<br/>";
857
+
858
+
859
+
860
+ // trims the whites spaces in front and in back of the string
861
+ String.prototype.trim = function()
862
+ {
863
+ return this.replace(/^\s+|\s+$/g, '');
864
+ }
865
+
866
+ String.prototype.urlsToHyperlinks = function()
867
+ {
868
+ return this.replace(/\bhttp:[^ \)\n\<,]+/g, "<a href='$&' target='_new'>$&</a>");
869
+ }
870
+
871
+ // reverses a string
872
+ String.prototype.reverse = function()
873
+ {
874
+ var ret = "";
875
+ for (var i = 0; i <= this.length; i++)
876
+ {
877
+ ret = this.charAt(i) + ret;
878
+ }
879
+ return ret;
880
+ }
881
+
882
+ var fL = [];
883
+ var ii = 0;
884
+
885
+ // font count: 318
886
+
887
+ fL[ii++] = "1Row.flf";
888
+ fL[ii++] = "3-D.flf";
889
+ fL[ii++] = "3D Diagonal.flf";
890
+ fL[ii++] = "3x5.flf";
891
+ fL[ii++] = "4Max.flf";
892
+ fL[ii++] = "5 Line Oblique.flf";
893
+
894
+ fL[ii++] = "AMC 3 Line.flf";
895
+ fL[ii++] = "AMC 3 Liv1.flf";
896
+ fL[ii++] = "AMC AAA01.flf";
897
+ fL[ii++] = "AMC Neko.flf";
898
+ fL[ii++] = "AMC Razor.flf";
899
+ fL[ii++] = "AMC Razor2.flf";
900
+ fL[ii++] = "AMC Slash.flf";
901
+ fL[ii++] = "AMC Slider.flf";
902
+ fL[ii++] = "AMC Thin.flf";
903
+ fL[ii++] = "AMC Tubes.flf";
904
+ fL[ii++] = "AMC Untitled.flf";
905
+ fL[ii++] = "ASCII New Roman.flf";
906
+ fL[ii++] = "Abraxis-Big.aol";
907
+ fL[ii++] = "Abraxis-Small.aol";
908
+ fL[ii++] = "Acrobatic.flf";
909
+ fL[ii++] = "Alligator.flf";
910
+ fL[ii++] = "Alligator2.flf";
911
+ fL[ii++] = "Alpha.flf";
912
+ fL[ii++] = "Alphabet.flf";
913
+ fL[ii++] = "Arrows.flf";
914
+ fL[ii++] = "Avatar.flf";
915
+
916
+ fL[ii++] = "B1FF.flf";
917
+ fL[ii++] = "Banner.flf";
918
+ fL[ii++] = "Banner3-D.flf";
919
+ fL[ii++] = "Banner3.flf";
920
+ fL[ii++] = "Banner4.flf";
921
+ fL[ii++] = "Barbwire.flf";
922
+ fL[ii++] = "Basic.flf";
923
+ fL[ii++] = "Bear.flf";
924
+ fL[ii++] = "Bell.flf";
925
+ fL[ii++] = "Benjamin.flf";
926
+ fL[ii++] = "Bent.aol";
927
+ fL[ii++] = "Big Chief.flf";
928
+ fL[ii++] = "Big Money-ne.flf";
929
+ fL[ii++] = "Big Money-nw.flf";
930
+ fL[ii++] = "Big Money-se.flf";
931
+ fL[ii++] = "Big Money-sw.flf";
932
+ fL[ii++] = "Big.flf";
933
+ fL[ii++] = "Bigfig.flf";
934
+ fL[ii++] = "Binary.flf";
935
+ fL[ii++] = "Blest.aol";
936
+ fL[ii++] = "Block.flf";
937
+ fL[ii++] = "Blocks.flf";
938
+ fL[ii++] = "Boie.aol";
939
+ fL[ii++] = "Boie2.aol";
940
+ fL[ii++] = "Bolger.flf";
941
+ fL[ii++] = "Bone's Font.aol";
942
+ fL[ii++] = "Braced.flf";
943
+ fL[ii++] = "Bright.flf";
944
+ fL[ii++] = "Broadway KB.flf";
945
+ fL[ii++] = "Broadway.flf";
946
+ fL[ii++] = "Bubble.flf";
947
+ fL[ii++] = "Bulbhead.flf";
948
+
949
+ fL[ii++] = "CaMiZ.aol";
950
+ fL[ii++] = "Caligraphy.flf";
951
+ fL[ii++] = "Caligraphy2.flf";
952
+ fL[ii++] = "Cards.flf";
953
+ fL[ii++] = "Catwalk.flf";
954
+ fL[ii++] = "CeA.aol";
955
+ fL[ii++] = "CeA2.aol";
956
+ fL[ii++] = "Cheese.aol";
957
+ fL[ii++] = "Chiseled.flf";
958
+ fL[ii++] = "Chunky.flf";
959
+ fL[ii++] = "Coinstak.flf";
960
+ fL[ii++] = "Cola.flf";
961
+ fL[ii++] = "Colossal.flf";
962
+ fL[ii++] = "Computer.flf";
963
+ fL[ii++] = "Contessa.flf";
964
+ fL[ii++] = "Contrast.flf";
965
+ fL[ii++] = "Cosmike.flf";
966
+ fL[ii++] = "Crawford.flf";
967
+ fL[ii++] = "Crawford2.flf";
968
+ fL[ii++] = "Crazy.flf";
969
+ fL[ii++] = "Cricket.flf";
970
+ fL[ii++] = "Cursive.flf";
971
+ fL[ii++] = "Cyberlarge.flf";
972
+ fL[ii++] = "Cybermedium.flf";
973
+ fL[ii++] = "Cybersmall.flf";
974
+ fL[ii++] = "Cygnet.flf";
975
+
976
+ fL[ii++] = "DANC4.flf";
977
+ fL[ii++] = "DWhistled.flf";
978
+ fL[ii++] = "DaiR.aol";
979
+ fL[ii++] = "Dancing Font.flf";
980
+ fL[ii++] = "Decimal.flf";
981
+ fL[ii++] = "Def Leppard.flf";
982
+ fL[ii++] = "Diamond.flf";
983
+ fL[ii++] = "Diet Cola.flf";
984
+ fL[ii++] = "Digital.flf";
985
+ fL[ii++] = "Doh.flf";
986
+ fL[ii++] = "Doom.flf";
987
+ fL[ii++] = "Dot Matrix.flf";
988
+ fL[ii++] = "Double Shorts.flf";
989
+ fL[ii++] = "Double.flf";
990
+ fL[ii++] = "Dr Pepper.flf";
991
+
992
+ fL[ii++] = "Efti Chess.flf";
993
+ fL[ii++] = "Efti Font.flf";
994
+ fL[ii++] = "Efti Italic.flf";
995
+ fL[ii++] = "Efti Piti.flf";
996
+ fL[ii++] = "Efti Robot.flf";
997
+ fL[ii++] = "Efti Wall.flf";
998
+ fL[ii++] = "Efti Water.flf";
999
+ fL[ii++] = "Epic.flf";
1000
+
1001
+ fL[ii++] = "Fender.flf";
1002
+
1003
+ fL[ii++] = "Filter.flf";
1004
+ fL[ii++] = "Filth.aol";
1005
+ fL[ii++] = "Fire Font-k.flf";
1006
+ fL[ii++] = "Fire Font-s.flf";
1007
+ fL[ii++] = "Flipped.flf";
1008
+ fL[ii++] = "Flower Power.flf";
1009
+ fL[ii++] = "FoGG.aol";
1010
+ fL[ii++] = "Four Tops.flf";
1011
+ fL[ii++] = "Fraktur.flf";
1012
+ fL[ii++] = "Fun Face.flf";
1013
+ fL[ii++] = "Fun Faces.flf";
1014
+ fL[ii++] = "Fuzzy.flf";
1015
+
1016
+ fL[ii++] = "Galactus.aol";
1017
+ fL[ii++] = "Georgi16.flf";
1018
+ fL[ii++] = "Georgia11.flf";
1019
+ fL[ii++] = "Ghost.flf";
1020
+ fL[ii++] = "Ghoulish.flf";
1021
+ fL[ii++] = "Glenyn.flf";
1022
+ fL[ii++] = "Glue.aol";
1023
+ fL[ii++] = "Goofy.flf";
1024
+ fL[ii++] = "Gothic.flf";
1025
+ fL[ii++] = "Graceful.flf";
1026
+ fL[ii++] = "Gradient.flf";
1027
+ fL[ii++] = "Graffiti.flf";
1028
+ fL[ii++] = "Greek.flf";
1029
+
1030
+ fL[ii++] = "HeX's Font.aol";
1031
+ fL[ii++] = "Heart Left.flf";
1032
+ fL[ii++] = "Heart Right.flf";
1033
+ fL[ii++] = "Hellfire.aol";
1034
+ fL[ii++] = "Henry 3D.flf";
1035
+ fL[ii++] = "Hex.flf";
1036
+ fL[ii++] = "Hieroglyphs.flf";
1037
+ fL[ii++] = "Hollywood.flf";
1038
+ fL[ii++] = "Horizontal Left.flf";
1039
+ fL[ii++] = "Horizontal Right.flf";
1040
+
1041
+ fL[ii++] = "ICL-1900.flf";
1042
+ fL[ii++] = "Impossible.flf";
1043
+ fL[ii++] = "Invita.flf";
1044
+ fL[ii++] = "Isometric1.flf";
1045
+ fL[ii++] = "Isometric2.flf";
1046
+ fL[ii++] = "Isometric3.flf";
1047
+ fL[ii++] = "Isometric4.flf";
1048
+ fL[ii++] = "Italic.flf";
1049
+ fL[ii++] = "Ivrit.flf";
1050
+ fL[ii++] = "JS Block Letters.flf";
1051
+ fL[ii++] = "JS Bracket Letters.flf";
1052
+ fL[ii++] = "JS Capital Curves.flf";
1053
+ fL[ii++] = "JS Cursive.flf";
1054
+ fL[ii++] = "JS Stick Letters.flf";
1055
+ fL[ii++] = "Jacky.flf";
1056
+ fL[ii++] = "Jazmine.flf";
1057
+ fL[ii++] = "Jerusalem.flf";
1058
+
1059
+ fL[ii++] = "Katakana.flf";
1060
+ fL[ii++] = "Kban.flf";
1061
+ fL[ii++] = "Keyboard.flf";
1062
+ fL[ii++] = "Knob.flf";
1063
+ fL[ii++] = "Konto Slant.flf";
1064
+ fL[ii++] = "Konto.flf";
1065
+ fL[ii++] = "LCD.flf";
1066
+ fL[ii++] = "Larry 3D.flf";
1067
+ fL[ii++] = "Lean.flf";
1068
+ fL[ii++] = "Letters.flf";
1069
+ fL[ii++] = "Lil Devil.flf";
1070
+ fL[ii++] = "Line Blocks.flf";
1071
+ fL[ii++] = "Linux.flf";
1072
+ fL[ii++] = "Lockergnome.flf";
1073
+
1074
+ fL[ii++] = "Madrid.flf";
1075
+ fL[ii++] = "Marquee.flf";
1076
+ fL[ii++] = "Maxfour.flf";
1077
+ fL[ii++] = "MeDi.aol";
1078
+ fL[ii++] = "Mer.aol";
1079
+ fL[ii++] = "Merlin1.flf";
1080
+ fL[ii++] = "Merlin2.flf";
1081
+ fL[ii++] = "Mike.flf";
1082
+ fL[ii++] = "Mini.flf";
1083
+ fL[ii++] = "Mirror.flf";
1084
+ fL[ii++] = "Mnemonic.flf";
1085
+ fL[ii++] = "Modular.flf";
1086
+ fL[ii++] = "Morse.flf";
1087
+ fL[ii++] = "Morse2.flf";
1088
+ fL[ii++] = "Moscow.flf";
1089
+ fL[ii++] = "Mshebrew210.flf";
1090
+ fL[ii++] = "Muzzle.flf";
1091
+
1092
+ fL[ii++] = "NScript.flf";
1093
+ fL[ii++] = "NT Greek.flf";
1094
+ fL[ii++] = "NV Script.flf";
1095
+ fL[ii++] = "Nancyj-Fancy.flf";
1096
+ fL[ii++] = "Nancyj-Improved.flf";
1097
+ fL[ii++] = "Nancyj-Underlined.flf";
1098
+ fL[ii++] = "Nancyj.flf";
1099
+ fL[ii++] = "Nipples.flf";
1100
+
1101
+ fL[ii++] = "O8.flf";
1102
+ fL[ii++] = "OS2.flf";
1103
+ fL[ii++] = "Octal.flf";
1104
+ fL[ii++] = "Ogre.flf";
1105
+ fL[ii++] = "Old Banner.flf";
1106
+
1107
+ fL[ii++] = "Pawp.flf";
1108
+ fL[ii++] = "Peaks Slant.flf";
1109
+ fL[ii++] = "Peaks.flf";
1110
+ fL[ii++] = "Pebbles.flf";
1111
+ fL[ii++] = "Pepper.flf";
1112
+ fL[ii++] = "Poison.flf";
1113
+ fL[ii++] = "PsY.aol";
1114
+ fL[ii++] = "PsY2.aol";
1115
+ fL[ii++] = "Puffy.flf";
1116
+ fL[ii++] = "Puzzle.flf";
1117
+ fL[ii++] = "Pyramid.flf";
1118
+
1119
+ fL[ii++] = "Rammstein.flf";
1120
+ fL[ii++] = "Rectangles.flf";
1121
+ fL[ii++] = "Red Phoenix.flf";
1122
+ fL[ii++] = "Reeko Font 1.aol";
1123
+ fL[ii++] = "Relief.flf";
1124
+ fL[ii++] = "Relief2.flf";
1125
+ fL[ii++] = "Reverse.flf";
1126
+ fL[ii++] = "Ribbit.aol";
1127
+ fL[ii++] = "Ribbit2.aol";
1128
+ fL[ii++] = "Ribbit3.aol";
1129
+ fL[ii++] = "Roman.flf";
1130
+ fL[ii++] = "Rot13.flf";
1131
+ fL[ii++] = "Rotated.flf";
1132
+ fL[ii++] = "Rounded.flf";
1133
+ fL[ii++] = "Rowan Cap.flf";
1134
+ fL[ii++] = "Rozzo.flf";
1135
+ fL[ii++] = "Runic.flf";
1136
+ fL[ii++] = "Runyc.flf";
1137
+
1138
+ fL[ii++] = "S Blood.flf";
1139
+ fL[ii++] = "SL Script.flf";
1140
+ fL[ii++] = "Santa Clara.flf";
1141
+ fL[ii++] = "Script.flf";
1142
+ fL[ii++] = "Serifcap.flf";
1143
+ fL[ii++] = "Shadow.flf";
1144
+ fL[ii++] = "Shimrod.flf";
1145
+ fL[ii++] = "Short.flf";
1146
+ fL[ii++] = "Slant Relief.flf";
1147
+ fL[ii++] = "Slant.flf";
1148
+ fL[ii++] = "Slide.flf";
1149
+ fL[ii++] = "Small Caps.flf";
1150
+ fL[ii++] = "Small Isometric1.flf";
1151
+ fL[ii++] = "Small Keyboard.flf";
1152
+ fL[ii++] = "Small Poison.flf";
1153
+ fL[ii++] = "Small Script.flf";
1154
+ fL[ii++] = "Small Shadow.flf";
1155
+ fL[ii++] = "Small Slant.flf";
1156
+ fL[ii++] = "Small Tengwar.flf";
1157
+ fL[ii++] = "Small.flf";
1158
+ fL[ii++] = "Soft.flf";
1159
+ fL[ii++] = "Sony.aol";
1160
+ fL[ii++] = "Speed.flf";
1161
+ fL[ii++] = "Spliff.flf";
1162
+ fL[ii++] = "Stacey.flf";
1163
+ fL[ii++] = "Stampate.flf";
1164
+ fL[ii++] = "Stampatello.flf";
1165
+ fL[ii++] = "Standard.flf";
1166
+ fL[ii++] = "Star Strips.flf";
1167
+ fL[ii++] = "Star Wars.flf";
1168
+ fL[ii++] = "Stellar.flf";
1169
+ fL[ii++] = "Stforek.flf";
1170
+ fL[ii++] = "Stick Letters.flf";
1171
+ fL[ii++] = "Stop.flf";
1172
+ fL[ii++] = "Straight.flf";
1173
+ fL[ii++] = "Sub-Zero.flf";
1174
+ fL[ii++] = "Swamp Land.flf";
1175
+ fL[ii++] = "Swan.flf";
1176
+ fL[ii++] = "Sweet.flf";
1177
+
1178
+ fL[ii++] = "TRaC Mini.aol";
1179
+ fL[ii++] = "TRaC Tiny.aol";
1180
+ fL[ii++] = "TRaC's Old School Font.aol";
1181
+ fL[ii++] = "TRaC.aol";
1182
+ fL[ii++] = "Tanja.flf";
1183
+ fL[ii++] = "Tengwar.flf";
1184
+ fL[ii++] = "Term.flf";
1185
+ fL[ii++] = "Test1.flf";
1186
+ fL[ii++] = "Thick.flf";
1187
+ fL[ii++] = "Thin.flf";
1188
+ fL[ii++] = "Thorned.flf";
1189
+ fL[ii++] = "Three Point.flf";
1190
+ fL[ii++] = "Ticks Slant.flf";
1191
+ fL[ii++] = "Ticks.flf";
1192
+ fL[ii++] = "Tiles.flf";
1193
+ fL[ii++] = "Tinker-Toy.flf";
1194
+ fL[ii++] = "Tombstone.flf";
1195
+ fL[ii++] = "Train.flf";
1196
+ fL[ii++] = "Trek.flf";
1197
+ fL[ii++] = "Tsalagi.flf";
1198
+ fL[ii++] = "Tubular.flf";
1199
+ fL[ii++] = "Twiggy.aol";
1200
+ fL[ii++] = "Twisted.flf";
1201
+ fL[ii++] = "Two Point.flf";
1202
+
1203
+ fL[ii++] = "USA Flag.flf";
1204
+ fL[ii++] = "Univers.flf";
1205
+
1206
+ fL[ii++] = "Varsity.flf";
1207
+
1208
+ fL[ii++] = "Wavy.flf";
1209
+ fL[ii++] = "Weird.flf";
1210
+ fL[ii++] = "Wet Letter.flf";
1211
+ fL[ii++] = "Whimsy.flf";
1212
+ fL[ii++] = "Wow.flf";
1213
+
1214
+ fL[ii++] = "X-Pose.aol";
1215
+ fL[ii++] = "X99.aol";
1216
+ fL[ii++] = "X992.aol";
1217
+
1218
+ fL[ii++] = "Zodi.aol";
1219
+
1220
+ /**
1221
+ * Function: overlapCompare(str1, str2)
1222
+ *
1223
+ * About: This function compares two lines from a the text array to see at what point they differ
1224
+ * when the two letters are placed next to each other.
1225
+ *
1226
+ **/
1227
+ function overlapCompare(inputTxt1, inputTxt2)
1228
+ {
1229
+ var str1 = inputTxt1.reverse(); // the character that comes before
1230
+ var str2 = inputTxt2; // the character that comes after
1231
+ var theOverlap = 0;
1232
+ var shouldBreak = false;
1233
+
1234
+ if (hFullWidth == true)
1235
+ {
1236
+ return 0;
1237
+ }
1238
+
1239
+ var str1CompIndex = 0;
1240
+ var shouldSmush = true;
1241
+ for (var i = 0; i < str1.length; i++)
1242
+ {
1243
+ if (str1.substr(i, 1) == " ")
1244
+ {
1245
+ str1CompIndex++;
1246
+ theOverlap++;
1247
+ }
1248
+ else
1249
+ {
1250
+ // for control smushing, see if this character can be smushed
1251
+ if (smushChar_GetClassVal(str1.substr(i, 1)) == -1)
1252
+ {
1253
+ shouldSmush = false;
1254
+ }
1255
+ break;
1256
+ }
1257
+ }
1258
+
1259
+ //alert("start overlap: " + str1CompIndex + "," + "'" + str1 + "'");
1260
+
1261
+ if (str1CompIndex == str1.length)
1262
+ {
1263
+ return Math.min(str1.length, str2.length);
1264
+ }
1265
+
1266
+ for (var i = 0; i < Math.min(str1.length, str2.length); i++)
1267
+ {
1268
+ if (str2.substr(i, 1) == hardblank)
1269
+ {
1270
+ // smush rule 6 + hFitting fix
1271
+ if ((hSmush6 == true && str1.substr(str1CompIndex, 1) == hardblank) )
1272
+ {
1273
+ theOverlap++;
1274
+ }
1275
+ break;
1276
+ }
1277
+ else if (str2.substr(i, 1) != " " && str1.substr(str1CompIndex, 1) == hardblank)
1278
+ {
1279
+ break;
1280
+ }
1281
+ else if (str2.substr(i, 1) != " ")
1282
+ {
1283
+ if ( smushChar_GetClassVal(str2.substr(i, 1)) == -1 )
1284
+ {
1285
+ shouldSmush = false;
1286
+ }
1287
+
1288
+ if (shouldSmush == true && (hFitting == false && defaultHorizontalSmush == true))
1289
+ {
1290
+ theOverlap++;
1291
+ }
1292
+ break;
1293
+ }
1294
+
1295
+ theOverlap++;
1296
+ }
1297
+
1298
+ return theOverlap;
1299
+ }
1300
+
1301
+ /**
1302
+ * Function: smushAmount(s1, currPos)
1303
+ *
1304
+ * About: This function looks at two letters and seeing how much they should be "smushed".
1305
+ *
1306
+ **/
1307
+ function smushAmount(prevPos, currPos)
1308
+ {
1309
+ if (prevPos == -1)
1310
+ {
1311
+ return 0;
1312
+ }
1313
+
1314
+ var smushed = false;
1315
+ var smushedAmount = 10000; // a value so big, it will be replaced with the first return of overlapCompare
1316
+
1317
+ for (var i = 0; i < charHeight; i++)
1318
+ {
1319
+ val = overlapCompare(fontChars[prevPos][i], fontChars[currPos][i]);
1320
+
1321
+ if (val < smushedAmount)
1322
+ {
1323
+ smushedAmount = val;
1324
+ }
1325
+ }
1326
+
1327
+ return smushedAmount;
1328
+ }
1329
+
1330
+
1331
+ /**
1332
+ * Function: smushChar_GetClassVal(inputVal)
1333
+ *
1334
+ * About: Gets class of given char.
1335
+ *
1336
+ **/
1337
+ function smushChar_GetClassVal(inputVal)
1338
+ {
1339
+ var ret = -1;
1340
+
1341
+ switch( inputVal )
1342
+ {
1343
+ case ("|"):
1344
+ ret = 1;
1345
+ break;
1346
+ case (String.fromCharCode(92)):
1347
+ ret = 2;
1348
+ break;
1349
+ case ("/"):
1350
+ ret = 2;
1351
+ break;
1352
+ case ("["):
1353
+ ret = 3;
1354
+ break;
1355
+ case ("]"):
1356
+ ret = 3;
1357
+ break;
1358
+ case ("{"):
1359
+ ret = 4;
1360
+ break;
1361
+ case ("}"):
1362
+ ret = 4;
1363
+ break;
1364
+ case ("("):
1365
+ ret = 5;
1366
+ break;
1367
+ case (")"):
1368
+ ret = 5;
1369
+ break;
1370
+ case ("<"):
1371
+ ret = 6;
1372
+ break;
1373
+ case (">"):
1374
+ ret = 6;
1375
+ break;
1376
+ }
1377
+ return ret;
1378
+ }
1379
+
1380
+ /**
1381
+ * Function: smushTxt(txt1, txt2)
1382
+ *
1383
+ * About: This function "smushes" two strings together
1384
+ *
1385
+ **/
1386
+ function smushTxt(txt1, txt2, theSmushAmount)
1387
+ {
1388
+ var txt1Offset = txt1.length - theSmushAmount;
1389
+ var ret = txt1.substr(0, txt1Offset);
1390
+
1391
+ for (var i = 0; i < theSmushAmount; i++)
1392
+ {
1393
+
1394
+ var txt1_char = txt1.substr(txt1Offset + i, 1);
1395
+ var txt2_char = txt2.substr(i, 1);
1396
+ var txt1_smushClass = smushChar_GetClassVal(txt1_char);
1397
+ var txt2_smushClass = smushChar_GetClassVal(txt2_char);
1398
+
1399
+ if (hSmush1 == true && txt2_char == txt1_char)
1400
+ {
1401
+ ret = ret + txt1_char;
1402
+ }
1403
+ else if (hSmush2 == true && txt1_char == "_" && txt2_smushClass != -1)
1404
+ {
1405
+ ret = ret + txt2_char;
1406
+ }
1407
+ else if (hSmush2 == true && txt2_char == "_" && txt1_smushClass != -1)
1408
+ {
1409
+ ret = ret + txt1_char;
1410
+ }
1411
+ else if (hSmush3 == true && txt1_smushClass != -1 && txt2_smushClass != -1 && txt2_smushClass != txt1_smushClass)
1412
+ {
1413
+ if (txt1_smushClass > txt2_smushClass)
1414
+ {
1415
+ ret = ret + txt1_char;
1416
+ }
1417
+ else
1418
+ {
1419
+ ret = ret + txt2_char;
1420
+ }
1421
+ }
1422
+
1423
+ // rule 5 needs to come before rule 4, because of how rule 4 is written here
1424
+
1425
+ else if (hSmush5 == true && txt2_char == String.fromCharCode(92) && txt1_char == "/" )
1426
+ {
1427
+ ret = ret + "|";
1428
+ }
1429
+ else if (hSmush5 == true && txt2_char == "/" && txt1_char == String.fromCharCode(92) )
1430
+ {
1431
+ ret = ret + "Y";
1432
+ }
1433
+ else if (hSmush5 == true && txt2_char == "<" && txt1_char == ">")
1434
+ {
1435
+ ret = ret + "X";
1436
+ }
1437
+ else if (hSmush4 == true && txt2_smushClass != -1 && txt2_smushClass == txt1_smushClass && txt2_char != txt1_char)
1438
+ {
1439
+ ret = ret + "|";
1440
+ }
1441
+
1442
+ // for smush rule 6, see the overlapCompare function
1443
+
1444
+ else if (txt1_char == " ")
1445
+ {
1446
+ ret = ret + txt2_char;
1447
+ }
1448
+ else
1449
+ {
1450
+ ret = ret + txt1_char;
1451
+ }
1452
+ }
1453
+
1454
+ ret = ret + txt2.substr(theSmushAmount);
1455
+
1456
+ return ret;
1457
+ }
1458
+
1459
+ function simpleEncrypt(txt)
1460
+ {
1461
+ var encryptedText="", charSet1, charSet2, i, pos, encryptedChar;
1462
+
1463
+ charSet1 = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
1464
+ charSet2 = " nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM";
1465
+
1466
+ for(i = 0; i < txt.length; i++)
1467
+ {
1468
+ pos = charSet1.indexOf(txt.substring(i, i+1), 0);
1469
+
1470
+ if (pos >= 0)
1471
+ {
1472
+ encryptedChar = charSet2.substring(pos, pos+1);
1473
+ encryptedText = encryptedText + encryptedChar;
1474
+ } else {
1475
+ encryptedText = encryptedText + txt.substring(i, i+1);
1476
+ }
1477
+ }
1478
+ return encryptedText
1479
+ }
1480
+
1481
+
1482
+
1483
+ function createLargeText(txt)
1484
+ {
1485
+ var largeText = "";
1486
+
1487
+ // now lets handle creating the ascii art text
1488
+ var filteredTxt = txt; // filterText( txt );
1489
+
1490
+ // direction is important for fonts like Mirror
1491
+ if (printDirection == 1)
1492
+ {
1493
+ filteredTxt = filteredTxt.reverse();
1494
+ }
1495
+ var filteredTxtLines = filteredTxt.split("\n"); // ß
1496
+
1497
+ for (lines = 0; lines < filteredTxtLines.length; lines++)
1498
+ {
1499
+ var alphabet = null;
1500
+ if (fontFileExt == "aol" || fontFileExt == "txt")
1501
+ {
1502
+ alphabet = " abcdefghijklmnopqrstuvwxyz";
1503
+ filteredTxtLines[lines] = filteredTxtLines[lines].toLowerCase();
1504
+ }
1505
+ else if (fontFileExt == "flf")
1506
+ {
1507
+ alphabet = " !" + String.fromCharCode(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[" + String.fromCharCode(92) + "]^_`abcdefghijklmnopqrstuvwxyz{|}~";
1508
+ }
1509
+
1510
+ var outputString = "";
1511
+ var finalText = "";
1512
+ var prevPos = -1;
1513
+
1514
+ var smushAmountArray;
1515
+ if (fontFileExt == "flf")
1516
+ {
1517
+ // find the smush amount for each character in the line
1518
+ smushAmountArray = new Array();
1519
+ for (var i = 0; i < filteredTxtLines[lines].length; i++)
1520
+ {
1521
+ var pos = alphabet.indexOf(filteredTxtLines[lines].substr(i,1));
1522
+ if (pos != -1)
1523
+ {
1524
+ var theSmushAmount = smushAmount(prevPos, pos);
1525
+ smushAmountArray[i] = theSmushAmount;
1526
+ }
1527
+ prevPos = pos;
1528
+ }
1529
+ }
1530
+
1531
+ prePos = -1;
1532
+
1533
+ for (var height = 0; height < charHeight; height++)
1534
+ {
1535
+ for (var i = 0; i < filteredTxtLines[lines].length; i++)
1536
+ {
1537
+ var pos = alphabet.indexOf(filteredTxtLines[lines].substr(i,1));
1538
+ if (pos != -1)
1539
+ {
1540
+
1541
+ if (fontFileExt == "aol" || fontFileExt == "txt")
1542
+ {
1543
+ outputString = outputString + fontChars[pos][height];
1544
+ }
1545
+ else if (fontFileExt == "flf")
1546
+ {
1547
+ var theSmushAmount = smushAmountArray[i]; //smushAmount(prevPos, pos);
1548
+ outputString = smushTxt(outputString, fontChars[pos][height], theSmushAmount);
1549
+ }
1550
+ }
1551
+ prevPos = pos;
1552
+ }
1553
+ if ((lines < (filteredTxtLines.length-1)) || (height < (charHeight-1)))
1554
+ {
1555
+ finalText = finalText + outputString + "\n";
1556
+ }
1557
+ else
1558
+ {
1559
+ finalText = finalText + outputString;
1560
+ }
1561
+
1562
+ prevPos = -1;
1563
+ outputString = "";
1564
+ }
1565
+
1566
+ if (fontFileExt == "flf")
1567
+ {
1568
+ // remove the hardblanks
1569
+ finalText = finalText.split(hardblank).join(" "); // replace all, we have to do it this way since hardblank could be a special character (for reg expressions)
1570
+ }
1571
+
1572
+ // print the final text
1573
+ largeText = largeText + finalText;
1574
+
1575
+ if (lines != (filteredTxtLines.length-1))
1576
+ {
1577
+ largeText = largeText + "\n";
1578
+ }
1579
+ }
1580
+ return largeText;
1581
+ }
1582
+
1583
+ // ---------------------------------------------------------- Above is code for generation
1584
+
1585
+ /**
1586
+ * Function: displayAuthorInfo()
1587
+ *
1588
+ * About: This function displays the comments inside of the flf font file.
1589
+ *
1590
+ **/
1591
+ function displayAuthorInfo()
1592
+ {
1593
+ // if we're on the "test all" page, just return
1594
+ if (userLastClicked == 2)
1595
+ {
1596
+ return;
1597
+ }
1598
+
1599
+ noteThatFooterIsNotVisible();
1600
+
1601
+ // the last thing the user did was click for info on the author
1602
+ userLastClicked = 1;
1603
+
1604
+ var hyperlinkedComments = authorComments.urlsToHyperlinks();
1605
+
1606
+ // figure out how to align the text
1607
+ var aIndex = 0;
1608
+ for (var i = 0; i < 3; i++)
1609
+ {
1610
+ if (document.fontSettings.tAlignment[i].checked == true)
1611
+ {
1612
+ aIndex = i;
1613
+ }
1614
+ }
1615
+ var textAlignment = document.fontSettings.tAlignment[aIndex].value;
1616
+
1617
+ }
1618
+
1619
+ function text_decode(str)
1620
+ {
1621
+ var strChars = str.split("%");
1622
+ var retStr = "";
1623
+ var decNum = "";
1624
+
1625
+ // first index in the array will be blank since input strings have the format:
1626
+ // "%XX%XX%XX"
1627
+ for (var i = 1; i < strChars.length; i++)
1628
+ {
1629
+ if (strChars[i] == "GG")
1630
+ {
1631
+ retStr = retStr + "‘";
1632
+ }
1633
+ else if (strChars[i] == "II")
1634
+ {
1635
+ retStr = retStr + "‚";
1636
+ }
1637
+ else if (strChars[i] == "JJ")
1638
+ {
1639
+ retStr = retStr + "˜";
1640
+ }
1641
+ else if (strChars[i] == "LL")
1642
+ {
1643
+ retStr = retStr + "—";
1644
+ }
1645
+ else if (strChars[i] == "MM")
1646
+ {
1647
+ retStr = retStr + "–";
1648
+ }
1649
+ else if (strChars[i] == "NN")
1650
+ {
1651
+ retStr = retStr + "“";
1652
+ }
1653
+ else if (strChars[i] == "PP")
1654
+ {
1655
+ retStr = retStr + "™";
1656
+ }
1657
+ else if (strChars[i] == "QQ")
1658
+ {
1659
+ retStr = retStr + "›";
1660
+ }
1661
+ else if (strChars[i] == "RR")
1662
+ {
1663
+ retStr = retStr + "‹";
1664
+ }
1665
+ else if (strChars[i] == "SS")
1666
+ {
1667
+ retStr = retStr + "’";
1668
+ }
1669
+ else if (strChars[i] == "TT")
1670
+ {
1671
+ retStr = retStr + "”";
1672
+ }
1673
+ else if (strChars[i] == "UU")
1674
+ {
1675
+ retStr = retStr + "”";
1676
+ }
1677
+ else
1678
+ {
1679
+ decNum = parseInt(strChars[i], 16);
1680
+ retStr = retStr + String.fromCharCode(decNum);
1681
+ }
1682
+ }
1683
+
1684
+ return retStr;
1685
+ }