/home/lindsay/xeolabs/xeogl-next/xeogl/examples/js/geometry/vectorTextGeometry.js
API Docs for:

File: /home/lindsay/xeolabs/xeogl-next/xeogl/examples/js/geometry/vectorTextGeometry.js

  1. /**
  2. A **VectorTextGeometry** extends {{#crossLink "Geometry"}}{{/crossLink}} to define vector text geometry for attached {{#crossLink "Mesh"}}Meshes{{/crossLink}}.
  3.  
  4. <a href="../../examples/#geometry_primitives_vectorText"><img src="../../assets/images/screenshots/VectorTextGeometry.png"></img></a>
  5.  
  6. ## Overview
  7.  
  8. * A VectorTextGeometry is a mesh of line segments in the X-Y plane that is generated from the value of
  9. its {{#crossLink "VectorTextGeometry/text:property"}}{{/crossLink}} property.
  10. * Text is monospaced and each character occupies a square cell.
  11. * Set its {{#crossLink "VectorTextGeometry/origin:property"}}{{/crossLink}}, {{#crossLink "VectorTextGeometry/size:property"}}{{/crossLink}} or {{#crossLink "VectorTextGeometry/text:property"}}{{/crossLink}} properties to new values at any time to dynamically regenerate it.
  12.  
  13. ## Example
  14.  
  15. ````javascript
  16. new xeogl.Mesh({
  17. geometry: new xeogl.VectorTextGeometry({
  18. text: "Attack ships on fire off the Shoulder of Orion",
  19. origin: [0,0,0],
  20. size: 2 // Size of each square character cell
  21. }),
  22. material: new xeogl.PhongMaterial({
  23. emissive: [0.5, 1.0, 1.0],
  24. lineWidth: 2
  25. }),
  26. transform: new xeogl.Translate({
  27. xyz: [0, 40, 0]
  28. })
  29. });
  30. ````
  31.  
  32. @class VectorTextGeometry
  33. @module xeogl
  34. @submodule geometry
  35. @constructor
  36. @param [scene] {Scene} Parent {{#crossLink "Scene"}}Scene{{/crossLink}} - creates this VectorTextGeometry in the default
  37. {{#crossLink "Scene"}}Scene{{/crossLink}} when omitted.
  38. @param [cfg] {*} Configs
  39. @param [cfg.id] {String} Optional ID, unique among all components in the parent {{#crossLink "Scene"}}Scene{{/crossLink}},
  40. generated automatically when omitted.
  41. @param [cfg.meta] {String:Object} Optional map of user-defined metadata to attach to this VectorTextGeometry.
  42. @param [cfg.origin] {Float32Array} 3D point indicating the top left corner of the VectorTextGeometry.
  43. @param [cfg.size=1] {Number} Size of each character.
  44. @param [cfg.text=""] {String} The text.
  45. @extends Geometry
  46. */
  47. {
  48.  
  49. var letters;
  50.  
  51. xeogl.VectorTextGeometry = class xeoVertexGeometry extends xeogl.Geometry {
  52.  
  53. init(cfg) {
  54.  
  55. if (!letters) {
  56. letters = buildStrokeData();
  57. }
  58.  
  59. var origin = cfg.origin || [0, 0, 0];
  60. var xOrigin = origin[0];
  61. var yOrigin = origin[1];
  62. var zOrigin = origin[2];
  63. var size = cfg.size || 1;
  64.  
  65. var positions = [];
  66. var indices = [];
  67. var text = cfg.text;
  68. if (xeogl._isNumeric(text)) {
  69. text = "" + text;
  70. }
  71. var lines = (text || "").split("\n");
  72. var countVerts = 0;
  73. var y = 0;
  74. var x;
  75. var str;
  76. var len;
  77. var c;
  78. var mag = 1.0 / 25.0;
  79. var penUp;
  80. var p1;
  81. var p2;
  82. var needLine;
  83. var pointsLen;
  84. var a;
  85.  
  86. for (var iLine = 0; iLine < lines.length; iLine++) {
  87.  
  88. x = 0;
  89. str = lines[iLine];
  90. len = str.length;
  91.  
  92. for (var i = 0; i < len; i++) {
  93.  
  94. c = letters[str.charAt(i)];
  95.  
  96. if (c == '\n') {
  97. //alert("newline");
  98. }
  99.  
  100. if (!c) {
  101. continue;
  102. }
  103.  
  104. penUp = 1;
  105. p1 = -1;
  106. p2 = -1;
  107. needLine = false;
  108.  
  109. pointsLen = c.points.length;
  110.  
  111. for (var j = 0; j < pointsLen; j++) {
  112. a = c.points[j];
  113.  
  114. if (a[0] == -1 && a[1] == -1) {
  115. penUp = 1;
  116. needLine = false;
  117. continue;
  118. }
  119.  
  120. positions.push((x + (a[0] * size) * mag) + xOrigin);
  121. positions.push((y + (a[1] * size) * mag) + yOrigin);
  122. positions.push(0 + zOrigin);
  123.  
  124. if (p1 == -1) {
  125. p1 = countVerts;
  126. } else if (p2 == -1) {
  127. p2 = countVerts;
  128. } else {
  129. p1 = p2;
  130. p2 = countVerts;
  131. }
  132. countVerts++;
  133.  
  134. if (penUp) {
  135. penUp = false;
  136.  
  137. } else {
  138. indices.push(p1);
  139. indices.push(p2);
  140. }
  141.  
  142. needLine = true;
  143. }
  144. x += c.width * mag * size;
  145.  
  146. }
  147. y -= 35 * mag * size;
  148. }
  149.  
  150. super.init(xeogl._apply(cfg, {
  151. primitive: "lines",
  152. positions: positions,
  153. indices: indices
  154. }));
  155. }
  156. };
  157.  
  158. function buildStrokeData() {
  159. return {
  160. ' ': {width: 16, points: []},
  161. '!': {
  162. width: 10, points: [
  163. [5, 21],
  164. [5, 7],
  165. [-1, -1],
  166. [5, 2],
  167. [4, 1],
  168. [5, 0],
  169. [6, 1],
  170. [5, 2]
  171. ]
  172. },
  173. '"': {
  174. width: 16, points: [
  175. [4, 21],
  176. [4, 14],
  177. [-1, -1],
  178. [12, 21],
  179. [12, 14]
  180. ]
  181. },
  182. '#': {
  183. width: 21, points: [
  184. [11, 25],
  185. [4, -7],
  186. [-1, -1],
  187. [17, 25],
  188. [10, -7],
  189. [-1, -1],
  190. [4, 12],
  191. [18, 12],
  192. [-1, -1],
  193. [3, 6],
  194. [17, 6]
  195. ]
  196. },
  197. '$': {
  198. width: 20, points: [
  199. [8, 25],
  200. [8, -4],
  201. [-1, -1],
  202. [12, 25],
  203. [12, -4],
  204. [-1, -1],
  205. [17, 18],
  206. [15, 20],
  207. [12, 21],
  208. [8, 21],
  209. [5, 20],
  210. [3, 18],
  211. [3, 16],
  212. [4, 14],
  213. [5, 13],
  214. [7, 12],
  215. [13, 10],
  216. [15, 9],
  217. [16, 8],
  218. [17, 6],
  219. [17, 3],
  220. [15, 1],
  221. [12, 0],
  222. [8, 0],
  223. [5, 1],
  224. [3, 3]
  225. ]
  226. },
  227. '%': {
  228. width: 24, points: [
  229. [21, 21],
  230. [3, 0],
  231. [-1, -1],
  232. [8, 21],
  233. [10, 19],
  234. [10, 17],
  235. [9, 15],
  236. [7, 14],
  237. [5, 14],
  238. [3, 16],
  239. [3, 18],
  240. [4, 20],
  241. [6, 21],
  242. [8, 21],
  243. [10, 20],
  244. [13, 19],
  245. [16, 19],
  246. [19, 20],
  247. [21, 21],
  248. [-1, -1],
  249. [17, 7],
  250. [15, 6],
  251. [14, 4],
  252. [14, 2],
  253. [16, 0],
  254. [18, 0],
  255. [20, 1],
  256. [21, 3],
  257. [21, 5],
  258. [19, 7],
  259. [17, 7]
  260. ]
  261. },
  262. '&': {
  263. width: 26, points: [
  264. [23, 12],
  265. [23, 13],
  266. [22, 14],
  267. [21, 14],
  268. [20, 13],
  269. [19, 11],
  270. [17, 6],
  271. [15, 3],
  272. [13, 1],
  273. [11, 0],
  274. [7, 0],
  275. [5, 1],
  276. [4, 2],
  277. [3, 4],
  278. [3, 6],
  279. [4, 8],
  280. [5, 9],
  281. [12, 13],
  282. [13, 14],
  283. [14, 16],
  284. [14, 18],
  285. [13, 20],
  286. [11, 21],
  287. [9, 20],
  288. [8, 18],
  289. [8, 16],
  290. [9, 13],
  291. [11, 10],
  292. [16, 3],
  293. [18, 1],
  294. [20, 0],
  295. [22, 0],
  296. [23, 1],
  297. [23, 2]
  298. ]
  299. },
  300. '\'': {
  301. width: 10, points: [
  302. [5, 19],
  303. [4, 20],
  304. [5, 21],
  305. [6, 20],
  306. [6, 18],
  307. [5, 16],
  308. [4, 15]
  309. ]
  310. },
  311. '(': {
  312. width: 14, points: [
  313. [11, 25],
  314. [9, 23],
  315. [7, 20],
  316. [5, 16],
  317. [4, 11],
  318. [4, 7],
  319. [5, 2],
  320. [7, -2],
  321. [9, -5],
  322. [11, -7]
  323. ]
  324. },
  325. ')': {
  326. width: 14, points: [
  327. [3, 25],
  328. [5, 23],
  329. [7, 20],
  330. [9, 16],
  331. [10, 11],
  332. [10, 7],
  333. [9, 2],
  334. [7, -2],
  335. [5, -5],
  336. [3, -7]
  337. ]
  338. },
  339. '*': {
  340. width: 16, points: [
  341. [8, 21],
  342. [8, 9],
  343. [-1, -1],
  344. [3, 18],
  345. [13, 12],
  346. [-1, -1],
  347. [13, 18],
  348. [3, 12]
  349. ]
  350. },
  351. '+': {
  352. width: 26, points: [
  353. [13, 18],
  354. [13, 0],
  355. [-1, -1],
  356. [4, 9],
  357. [22, 9]
  358. ]
  359. },
  360. ',': {
  361. width: 10, points: [
  362. [6, 1],
  363. [5, 0],
  364. [4, 1],
  365. [5, 2],
  366. [6, 1],
  367. [6, -1],
  368. [5, -3],
  369. [4, -4]
  370. ]
  371. },
  372. '-': {
  373. width: 26, points: [
  374. [4, 9],
  375. [22, 9]
  376. ]
  377. },
  378. '.': {
  379. width: 10, points: [
  380. [5, 2],
  381. [4, 1],
  382. [5, 0],
  383. [6, 1],
  384. [5, 2]
  385. ]
  386. },
  387. '/': {
  388. width: 22, points: [
  389. [20, 25],
  390. [2, -7]
  391. ]
  392. },
  393. '0': {
  394. width: 20, points: [
  395. [9, 21],
  396. [6, 20],
  397. [4, 17],
  398. [3, 12],
  399. [3, 9],
  400. [4, 4],
  401. [6, 1],
  402. [9, 0],
  403. [11, 0],
  404. [14, 1],
  405. [16, 4],
  406. [17, 9],
  407. [17, 12],
  408. [16, 17],
  409. [14, 20],
  410. [11, 21],
  411. [9, 21]
  412. ]
  413. },
  414. '1': {
  415. width: 20, points: [
  416. [6, 17],
  417. [8, 18],
  418. [11, 21],
  419. [11, 0]
  420. ]
  421. },
  422. '2': {
  423. width: 20, points: [
  424. [4, 16],
  425. [4, 17],
  426. [5, 19],
  427. [6, 20],
  428. [8, 21],
  429. [12, 21],
  430. [14, 20],
  431. [15, 19],
  432. [16, 17],
  433. [16, 15],
  434. [15, 13],
  435. [13, 10],
  436. [3, 0],
  437. [17, 0]
  438. ]
  439. },
  440. '3': {
  441. width: 20, points: [
  442. [5, 21],
  443. [16, 21],
  444. [10, 13],
  445. [13, 13],
  446. [15, 12],
  447. [16, 11],
  448. [17, 8],
  449. [17, 6],
  450. [16, 3],
  451. [14, 1],
  452. [11, 0],
  453. [8, 0],
  454. [5, 1],
  455. [4, 2],
  456. [3, 4]
  457. ]
  458. },
  459. '4': {
  460. width: 20, points: [
  461. [13, 21],
  462. [3, 7],
  463. [18, 7],
  464. [-1, -1],
  465. [13, 21],
  466. [13, 0]
  467. ]
  468. },
  469. '5': {
  470. width: 20, points: [
  471. [15, 21],
  472. [5, 21],
  473. [4, 12],
  474. [5, 13],
  475. [8, 14],
  476. [11, 14],
  477. [14, 13],
  478. [16, 11],
  479. [17, 8],
  480. [17, 6],
  481. [16, 3],
  482. [14, 1],
  483. [11, 0],
  484. [8, 0],
  485. [5, 1],
  486. [4, 2],
  487. [3, 4]
  488. ]
  489. },
  490. '6': {
  491. width: 20, points: [
  492. [16, 18],
  493. [15, 20],
  494. [12, 21],
  495. [10, 21],
  496. [7, 20],
  497. [5, 17],
  498. [4, 12],
  499. [4, 7],
  500. [5, 3],
  501. [7, 1],
  502. [10, 0],
  503. [11, 0],
  504. [14, 1],
  505. [16, 3],
  506. [17, 6],
  507. [17, 7],
  508. [16, 10],
  509. [14, 12],
  510. [11, 13],
  511. [10, 13],
  512. [7, 12],
  513. [5, 10],
  514. [4, 7]
  515. ]
  516. },
  517. '7': {
  518. width: 20, points: [
  519. [17, 21],
  520. [7, 0],
  521. [-1, -1],
  522. [3, 21],
  523. [17, 21]
  524. ]
  525. },
  526. '8': {
  527. width: 20, points: [
  528. [8, 21],
  529. [5, 20],
  530. [4, 18],
  531. [4, 16],
  532. [5, 14],
  533. [7, 13],
  534. [11, 12],
  535. [14, 11],
  536. [16, 9],
  537. [17, 7],
  538. [17, 4],
  539. [16, 2],
  540. [15, 1],
  541. [12, 0],
  542. [8, 0],
  543. [5, 1],
  544. [4, 2],
  545. [3, 4],
  546. [3, 7],
  547. [4, 9],
  548. [6, 11],
  549. [9, 12],
  550. [13, 13],
  551. [15, 14],
  552. [16, 16],
  553. [16, 18],
  554. [15, 20],
  555. [12, 21],
  556. [8, 21]
  557. ]
  558. },
  559. '9': {
  560. width: 20, points: [
  561. [16, 14],
  562. [15, 11],
  563. [13, 9],
  564. [10, 8],
  565. [9, 8],
  566. [6, 9],
  567. [4, 11],
  568. [3, 14],
  569. [3, 15],
  570. [4, 18],
  571. [6, 20],
  572. [9, 21],
  573. [10, 21],
  574. [13, 20],
  575. [15, 18],
  576. [16, 14],
  577. [16, 9],
  578. [15, 4],
  579. [13, 1],
  580. [10, 0],
  581. [8, 0],
  582. [5, 1],
  583. [4, 3]
  584. ]
  585. },
  586. ':': {
  587. width: 10, points: [
  588. [5, 14],
  589. [4, 13],
  590. [5, 12],
  591. [6, 13],
  592. [5, 14],
  593. [-1, -1],
  594. [5, 2],
  595. [4, 1],
  596. [5, 0],
  597. [6, 1],
  598. [5, 2]
  599. ]
  600. },
  601. ';': {
  602. width: 10, points: [
  603. [5, 14],
  604. [4, 13],
  605. [5, 12],
  606. [6, 13],
  607. [5, 14],
  608. [-1, -1],
  609. [6, 1],
  610. [5, 0],
  611. [4, 1],
  612. [5, 2],
  613. [6, 1],
  614. [6, -1],
  615. [5, -3],
  616. [4, -4]
  617. ]
  618. },
  619. '<': {
  620. width: 24, points: [
  621. [20, 18],
  622. [4, 9],
  623. [20, 0]
  624. ]
  625. },
  626. '=': {
  627. width: 26, points: [
  628. [4, 12],
  629. [22, 12],
  630. [-1, -1],
  631. [4, 6],
  632. [22, 6]
  633. ]
  634. },
  635. '>': {
  636. width: 24, points: [
  637. [4, 18],
  638. [20, 9],
  639. [4, 0]
  640. ]
  641. },
  642. '?': {
  643. width: 18, points: [
  644. [3, 16],
  645. [3, 17],
  646. [4, 19],
  647. [5, 20],
  648. [7, 21],
  649. [11, 21],
  650. [13, 20],
  651. [14, 19],
  652. [15, 17],
  653. [15, 15],
  654. [14, 13],
  655. [13, 12],
  656. [9, 10],
  657. [9, 7],
  658. [-1, -1],
  659. [9, 2],
  660. [8, 1],
  661. [9, 0],
  662. [10, 1],
  663. [9, 2]
  664. ]
  665. },
  666. '@': {
  667. width: 27, points: [
  668. [18, 13],
  669. [17, 15],
  670. [15, 16],
  671. [12, 16],
  672. [10, 15],
  673. [9, 14],
  674. [8, 11],
  675. [8, 8],
  676. [9, 6],
  677. [11, 5],
  678. [14, 5],
  679. [16, 6],
  680. [17, 8],
  681. [-1, -1],
  682. [12, 16],
  683. [10, 14],
  684. [9, 11],
  685. [9, 8],
  686. [10, 6],
  687. [11, 5],
  688. [-1, -1],
  689. [18, 16],
  690. [17, 8],
  691. [17, 6],
  692. [19, 5],
  693. [21, 5],
  694. [23, 7],
  695. [24, 10],
  696. [24, 12],
  697. [23, 15],
  698. [22, 17],
  699. [20, 19],
  700. [18, 20],
  701. [15, 21],
  702. [12, 21],
  703. [9, 20],
  704. [7, 19],
  705. [5, 17],
  706. [4, 15],
  707. [3, 12],
  708. [3, 9],
  709. [4, 6],
  710. [5, 4],
  711. [7, 2],
  712. [9, 1],
  713. [12, 0],
  714. [15, 0],
  715. [18, 1],
  716. [20, 2],
  717. [21, 3],
  718. [-1, -1],
  719. [19, 16],
  720. [18, 8],
  721. [18, 6],
  722. [19, 5]
  723. ]
  724. },
  725. 'A': {
  726. width: 18, points: [
  727. [9, 21],
  728. [1, 0],
  729. [-1, -1],
  730. [9, 21],
  731. [17, 0],
  732. [-1, -1],
  733. [4, 7],
  734. [14, 7]
  735. ]
  736. },
  737. 'B': {
  738. width: 21, points: [
  739. [4, 21],
  740. [4, 0],
  741. [-1, -1],
  742. [4, 21],
  743. [13, 21],
  744. [16, 20],
  745. [17, 19],
  746. [18, 17],
  747. [18, 15],
  748. [17, 13],
  749. [16, 12],
  750. [13, 11],
  751. [-1, -1],
  752. [4, 11],
  753. [13, 11],
  754. [16, 10],
  755. [17, 9],
  756. [18, 7],
  757. [18, 4],
  758. [17, 2],
  759. [16, 1],
  760. [13, 0],
  761. [4, 0]
  762. ]
  763. },
  764. 'C': {
  765. width: 21, points: [
  766. [18, 16],
  767. [17, 18],
  768. [15, 20],
  769. [13, 21],
  770. [9, 21],
  771. [7, 20],
  772. [5, 18],
  773. [4, 16],
  774. [3, 13],
  775. [3, 8],
  776. [4, 5],
  777. [5, 3],
  778. [7, 1],
  779. [9, 0],
  780. [13, 0],
  781. [15, 1],
  782. [17, 3],
  783. [18, 5]
  784. ]
  785. },
  786. 'D': {
  787. width: 21, points: [
  788. [4, 21],
  789. [4, 0],
  790. [-1, -1],
  791. [4, 21],
  792. [11, 21],
  793. [14, 20],
  794. [16, 18],
  795. [17, 16],
  796. [18, 13],
  797. [18, 8],
  798. [17, 5],
  799. [16, 3],
  800. [14, 1],
  801. [11, 0],
  802. [4, 0]
  803. ]
  804. },
  805. 'E': {
  806. width: 19, points: [
  807. [4, 21],
  808. [4, 0],
  809. [-1, -1],
  810. [4, 21],
  811. [17, 21],
  812. [-1, -1],
  813. [4, 11],
  814. [12, 11],
  815. [-1, -1],
  816. [4, 0],
  817. [17, 0]
  818. ]
  819. },
  820. 'F': {
  821. width: 18, points: [
  822. [4, 21],
  823. [4, 0],
  824. [-1, -1],
  825. [4, 21],
  826. [17, 21],
  827. [-1, -1],
  828. [4, 11],
  829. [12, 11]
  830. ]
  831. },
  832. 'G': {
  833. width: 21, points: [
  834. [18, 16],
  835. [17, 18],
  836. [15, 20],
  837. [13, 21],
  838. [9, 21],
  839. [7, 20],
  840. [5, 18],
  841. [4, 16],
  842. [3, 13],
  843. [3, 8],
  844. [4, 5],
  845. [5, 3],
  846. [7, 1],
  847. [9, 0],
  848. [13, 0],
  849. [15, 1],
  850. [17, 3],
  851. [18, 5],
  852. [18, 8],
  853. [-1, -1],
  854. [13, 8],
  855. [18, 8]
  856. ]
  857. },
  858. 'H': {
  859. width: 22, points: [
  860. [4, 21],
  861. [4, 0],
  862. [-1, -1],
  863. [18, 21],
  864. [18, 0],
  865. [-1, -1],
  866. [4, 11],
  867. [18, 11]
  868. ]
  869. },
  870. 'I': {
  871. width: 8, points: [
  872. [4, 21],
  873. [4, 0]
  874. ]
  875. },
  876. 'J': {
  877. width: 16, points: [
  878. [12, 21],
  879. [12, 5],
  880. [11, 2],
  881. [10, 1],
  882. [8, 0],
  883. [6, 0],
  884. [4, 1],
  885. [3, 2],
  886. [2, 5],
  887. [2, 7]
  888. ]
  889. },
  890. 'K': {
  891. width: 21, points: [
  892. [4, 21],
  893. [4, 0],
  894. [-1, -1],
  895. [18, 21],
  896. [4, 7],
  897. [-1, -1],
  898. [9, 12],
  899. [18, 0]
  900. ]
  901. },
  902. 'L': {
  903. width: 17, points: [
  904. [4, 21],
  905. [4, 0],
  906. [-1, -1],
  907. [4, 0],
  908. [16, 0]
  909. ]
  910. },
  911. 'M': {
  912. width: 24, points: [
  913. [4, 21],
  914. [4, 0],
  915. [-1, -1],
  916. [4, 21],
  917. [12, 0],
  918. [-1, -1],
  919. [20, 21],
  920. [12, 0],
  921. [-1, -1],
  922. [20, 21],
  923. [20, 0]
  924. ]
  925. },
  926. 'N': {
  927. width: 22, points: [
  928. [4, 21],
  929. [4, 0],
  930. [-1, -1],
  931. [4, 21],
  932. [18, 0],
  933. [-1, -1],
  934. [18, 21],
  935. [18, 0]
  936. ]
  937. },
  938. 'O': {
  939. width: 22, points: [
  940. [9, 21],
  941. [7, 20],
  942. [5, 18],
  943. [4, 16],
  944. [3, 13],
  945. [3, 8],
  946. [4, 5],
  947. [5, 3],
  948. [7, 1],
  949. [9, 0],
  950. [13, 0],
  951. [15, 1],
  952. [17, 3],
  953. [18, 5],
  954. [19, 8],
  955. [19, 13],
  956. [18, 16],
  957. [17, 18],
  958. [15, 20],
  959. [13, 21],
  960. [9, 21]
  961. ]
  962. },
  963. 'P': {
  964. width: 21, points: [
  965. [4, 21],
  966. [4, 0],
  967. [-1, -1],
  968. [4, 21],
  969. [13, 21],
  970. [16, 20],
  971. [17, 19],
  972. [18, 17],
  973. [18, 14],
  974. [17, 12],
  975. [16, 11],
  976. [13, 10],
  977. [4, 10]
  978. ]
  979. },
  980. 'Q': {
  981. width: 22, points: [
  982. [9, 21],
  983. [7, 20],
  984. [5, 18],
  985. [4, 16],
  986. [3, 13],
  987. [3, 8],
  988. [4, 5],
  989. [5, 3],
  990. [7, 1],
  991. [9, 0],
  992. [13, 0],
  993. [15, 1],
  994. [17, 3],
  995. [18, 5],
  996. [19, 8],
  997. [19, 13],
  998. [18, 16],
  999. [17, 18],
  1000. [15, 20],
  1001. [13, 21],
  1002. [9, 21],
  1003. [-1, -1],
  1004. [12, 4],
  1005. [18, -2]
  1006. ]
  1007. },
  1008. 'R': {
  1009. width: 21, points: [
  1010. [4, 21],
  1011. [4, 0],
  1012. [-1, -1],
  1013. [4, 21],
  1014. [13, 21],
  1015. [16, 20],
  1016. [17, 19],
  1017. [18, 17],
  1018. [18, 15],
  1019. [17, 13],
  1020. [16, 12],
  1021. [13, 11],
  1022. [4, 11],
  1023. [-1, -1],
  1024. [11, 11],
  1025. [18, 0]
  1026. ]
  1027. },
  1028. 'S': {
  1029. width: 20, points: [
  1030. [17, 18],
  1031. [15, 20],
  1032. [12, 21],
  1033. [8, 21],
  1034. [5, 20],
  1035. [3, 18],
  1036. [3, 16],
  1037. [4, 14],
  1038. [5, 13],
  1039. [7, 12],
  1040. [13, 10],
  1041. [15, 9],
  1042. [16, 8],
  1043. [17, 6],
  1044. [17, 3],
  1045. [15, 1],
  1046. [12, 0],
  1047. [8, 0],
  1048. [5, 1],
  1049. [3, 3]
  1050. ]
  1051. },
  1052. 'T': {
  1053. width: 16, points: [
  1054. [8, 21],
  1055. [8, 0],
  1056. [-1, -1],
  1057. [1, 21],
  1058. [15, 21]
  1059. ]
  1060. },
  1061. 'U': {
  1062. width: 22, points: [
  1063. [4, 21],
  1064. [4, 6],
  1065. [5, 3],
  1066. [7, 1],
  1067. [10, 0],
  1068. [12, 0],
  1069. [15, 1],
  1070. [17, 3],
  1071. [18, 6],
  1072. [18, 21]
  1073. ]
  1074. },
  1075. 'V': {
  1076. width: 18, points: [
  1077. [1, 21],
  1078. [9, 0],
  1079. [-1, -1],
  1080. [17, 21],
  1081. [9, 0]
  1082. ]
  1083. },
  1084. 'W': {
  1085. width: 24, points: [
  1086. [2, 21],
  1087. [7, 0],
  1088. [-1, -1],
  1089. [12, 21],
  1090. [7, 0],
  1091. [-1, -1],
  1092. [12, 21],
  1093. [17, 0],
  1094. [-1, -1],
  1095. [22, 21],
  1096. [17, 0]
  1097. ]
  1098. },
  1099. 'X': {
  1100. width: 20, points: [
  1101. [3, 21],
  1102. [17, 0],
  1103. [-1, -1],
  1104. [17, 21],
  1105. [3, 0]
  1106. ]
  1107. },
  1108. 'Y': {
  1109. width: 18, points: [
  1110. [1, 21],
  1111. [9, 11],
  1112. [9, 0],
  1113. [-1, -1],
  1114. [17, 21],
  1115. [9, 11]
  1116. ]
  1117. },
  1118. 'Z': {
  1119. width: 20, points: [
  1120. [17, 21],
  1121. [3, 0],
  1122. [-1, -1],
  1123. [3, 21],
  1124. [17, 21],
  1125. [-1, -1],
  1126. [3, 0],
  1127. [17, 0]
  1128. ]
  1129. },
  1130. '[': {
  1131. width: 14, points: [
  1132. [4, 25],
  1133. [4, -7],
  1134. [-1, -1],
  1135. [5, 25],
  1136. [5, -7],
  1137. [-1, -1],
  1138. [4, 25],
  1139. [11, 25],
  1140. [-1, -1],
  1141. [4, -7],
  1142. [11, -7]
  1143. ]
  1144. },
  1145. '\\': {
  1146. width: 14, points: [
  1147. [0, 21],
  1148. [14, -3]
  1149. ]
  1150. },
  1151. ']': {
  1152. width: 14, points: [
  1153. [9, 25],
  1154. [9, -7],
  1155. [-1, -1],
  1156. [10, 25],
  1157. [10, -7],
  1158. [-1, -1],
  1159. [3, 25],
  1160. [10, 25],
  1161. [-1, -1],
  1162. [3, -7],
  1163. [10, -7]
  1164. ]
  1165. },
  1166. '^': {
  1167. width: 16, points: [
  1168. [6, 15],
  1169. [8, 18],
  1170. [10, 15],
  1171. [-1, -1],
  1172. [3, 12],
  1173. [8, 17],
  1174. [13, 12],
  1175. [-1, -1],
  1176. [8, 17],
  1177. [8, 0]
  1178. ]
  1179. },
  1180. '_': {
  1181. width: 16, points: [
  1182. [0, -2],
  1183. [16, -2]
  1184. ]
  1185. },
  1186. '`': {
  1187. width: 10, points: [
  1188. [6, 21],
  1189. [5, 20],
  1190. [4, 18],
  1191. [4, 16],
  1192. [5, 15],
  1193. [6, 16],
  1194. [5, 17]
  1195. ]
  1196. },
  1197. 'a': {
  1198. width: 19, points: [
  1199. [15, 14],
  1200. [15, 0],
  1201. [-1, -1],
  1202. [15, 11],
  1203. [13, 13],
  1204. [11, 14],
  1205. [8, 14],
  1206. [6, 13],
  1207. [4, 11],
  1208. [3, 8],
  1209. [3, 6],
  1210. [4, 3],
  1211. [6, 1],
  1212. [8, 0],
  1213. [11, 0],
  1214. [13, 1],
  1215. [15, 3]
  1216. ]
  1217. },
  1218. 'b': {
  1219. width: 19, points: [
  1220. [4, 21],
  1221. [4, 0],
  1222. [-1, -1],
  1223. [4, 11],
  1224. [6, 13],
  1225. [8, 14],
  1226. [11, 14],
  1227. [13, 13],
  1228. [15, 11],
  1229. [16, 8],
  1230. [16, 6],
  1231. [15, 3],
  1232. [13, 1],
  1233. [11, 0],
  1234. [8, 0],
  1235. [6, 1],
  1236. [4, 3]
  1237. ]
  1238. },
  1239. 'c': {
  1240. width: 18, points: [
  1241. [15, 11],
  1242. [13, 13],
  1243. [11, 14],
  1244. [8, 14],
  1245. [6, 13],
  1246. [4, 11],
  1247. [3, 8],
  1248. [3, 6],
  1249. [4, 3],
  1250. [6, 1],
  1251. [8, 0],
  1252. [11, 0],
  1253. [13, 1],
  1254. [15, 3]
  1255. ]
  1256. },
  1257. 'd': {
  1258. width: 19, points: [
  1259. [15, 21],
  1260. [15, 0],
  1261. [-1, -1],
  1262. [15, 11],
  1263. [13, 13],
  1264. [11, 14],
  1265. [8, 14],
  1266. [6, 13],
  1267. [4, 11],
  1268. [3, 8],
  1269. [3, 6],
  1270. [4, 3],
  1271. [6, 1],
  1272. [8, 0],
  1273. [11, 0],
  1274. [13, 1],
  1275. [15, 3]
  1276. ]
  1277. },
  1278. 'e': {
  1279. width: 18, points: [
  1280. [3, 8],
  1281. [15, 8],
  1282. [15, 10],
  1283. [14, 12],
  1284. [13, 13],
  1285. [11, 14],
  1286. [8, 14],
  1287. [6, 13],
  1288. [4, 11],
  1289. [3, 8],
  1290. [3, 6],
  1291. [4, 3],
  1292. [6, 1],
  1293. [8, 0],
  1294. [11, 0],
  1295. [13, 1],
  1296. [15, 3]
  1297. ]
  1298. },
  1299. 'f': {
  1300. width: 12, points: [
  1301. [10, 21],
  1302. [8, 21],
  1303. [6, 20],
  1304. [5, 17],
  1305. [5, 0],
  1306. [-1, -1],
  1307. [2, 14],
  1308. [9, 14]
  1309. ]
  1310. },
  1311. 'g': {
  1312. width: 19, points: [
  1313. [15, 14],
  1314. [15, -2],
  1315. [14, -5],
  1316. [13, -6],
  1317. [11, -7],
  1318. [8, -7],
  1319. [6, -6],
  1320. [-1, -1],
  1321. [15, 11],
  1322. [13, 13],
  1323. [11, 14],
  1324. [8, 14],
  1325. [6, 13],
  1326. [4, 11],
  1327. [3, 8],
  1328. [3, 6],
  1329. [4, 3],
  1330. [6, 1],
  1331. [8, 0],
  1332. [11, 0],
  1333. [13, 1],
  1334. [15, 3]
  1335. ]
  1336. },
  1337. 'h': {
  1338. width: 19, points: [
  1339. [4, 21],
  1340. [4, 0],
  1341. [-1, -1],
  1342. [4, 10],
  1343. [7, 13],
  1344. [9, 14],
  1345. [12, 14],
  1346. [14, 13],
  1347. [15, 10],
  1348. [15, 0]
  1349. ]
  1350. },
  1351. 'i': {
  1352. width: 8, points: [
  1353. [3, 21],
  1354. [4, 20],
  1355. [5, 21],
  1356. [4, 22],
  1357. [3, 21],
  1358. [-1, -1],
  1359. [4, 14],
  1360. [4, 0]
  1361. ]
  1362. },
  1363. 'j': {
  1364. width: 10, points: [
  1365. [5, 21],
  1366. [6, 20],
  1367. [7, 21],
  1368. [6, 22],
  1369. [5, 21],
  1370. [-1, -1],
  1371. [6, 14],
  1372. [6, -3],
  1373. [5, -6],
  1374. [3, -7],
  1375. [1, -7]
  1376. ]
  1377. },
  1378. 'k': {
  1379. width: 17, points: [
  1380. [4, 21],
  1381. [4, 0],
  1382. [-1, -1],
  1383. [14, 14],
  1384. [4, 4],
  1385. [-1, -1],
  1386. [8, 8],
  1387. [15, 0]
  1388. ]
  1389. },
  1390. 'l': {
  1391. width: 8, points: [
  1392. [4, 21],
  1393. [4, 0]
  1394. ]
  1395. },
  1396. 'm': {
  1397. width: 30, points: [
  1398. [4, 14],
  1399. [4, 0],
  1400. [-1, -1],
  1401. [4, 10],
  1402. [7, 13],
  1403. [9, 14],
  1404. [12, 14],
  1405. [14, 13],
  1406. [15, 10],
  1407. [15, 0],
  1408. [-1, -1],
  1409. [15, 10],
  1410. [18, 13],
  1411. [20, 14],
  1412. [23, 14],
  1413. [25, 13],
  1414. [26, 10],
  1415. [26, 0]
  1416. ]
  1417. },
  1418. 'n': {
  1419. width: 19, points: [
  1420. [4, 14],
  1421. [4, 0],
  1422. [-1, -1],
  1423. [4, 10],
  1424. [7, 13],
  1425. [9, 14],
  1426. [12, 14],
  1427. [14, 13],
  1428. [15, 10],
  1429. [15, 0]
  1430. ]
  1431. },
  1432. 'o': {
  1433. width: 19, points: [
  1434. [8, 14],
  1435. [6, 13],
  1436. [4, 11],
  1437. [3, 8],
  1438. [3, 6],
  1439. [4, 3],
  1440. [6, 1],
  1441. [8, 0],
  1442. [11, 0],
  1443. [13, 1],
  1444. [15, 3],
  1445. [16, 6],
  1446. [16, 8],
  1447. [15, 11],
  1448. [13, 13],
  1449. [11, 14],
  1450. [8, 14]
  1451. ]
  1452. },
  1453. 'p': {
  1454. width: 19, points: [
  1455. [4, 14],
  1456. [4, -7],
  1457. [-1, -1],
  1458. [4, 11],
  1459. [6, 13],
  1460. [8, 14],
  1461. [11, 14],
  1462. [13, 13],
  1463. [15, 11],
  1464. [16, 8],
  1465. [16, 6],
  1466. [15, 3],
  1467. [13, 1],
  1468. [11, 0],
  1469. [8, 0],
  1470. [6, 1],
  1471. [4, 3]
  1472. ]
  1473. },
  1474. 'q': {
  1475. width: 19, points: [
  1476. [15, 14],
  1477. [15, -7],
  1478. [-1, -1],
  1479. [15, 11],
  1480. [13, 13],
  1481. [11, 14],
  1482. [8, 14],
  1483. [6, 13],
  1484. [4, 11],
  1485. [3, 8],
  1486. [3, 6],
  1487. [4, 3],
  1488. [6, 1],
  1489. [8, 0],
  1490. [11, 0],
  1491. [13, 1],
  1492. [15, 3]
  1493. ]
  1494. },
  1495. 'r': {
  1496. width: 13, points: [
  1497. [4, 14],
  1498. [4, 0],
  1499. [-1, -1],
  1500. [4, 8],
  1501. [5, 11],
  1502. [7, 13],
  1503. [9, 14],
  1504. [12, 14]
  1505. ]
  1506. },
  1507. 's': {
  1508. width: 17, points: [
  1509. [14, 11],
  1510. [13, 13],
  1511. [10, 14],
  1512. [7, 14],
  1513. [4, 13],
  1514. [3, 11],
  1515. [4, 9],
  1516. [6, 8],
  1517. [11, 7],
  1518. [13, 6],
  1519. [14, 4],
  1520. [14, 3],
  1521. [13, 1],
  1522. [10, 0],
  1523. [7, 0],
  1524. [4, 1],
  1525. [3, 3]
  1526. ]
  1527. },
  1528. 't': {
  1529. width: 12, points: [
  1530. [5, 21],
  1531. [5, 4],
  1532. [6, 1],
  1533. [8, 0],
  1534. [10, 0],
  1535. [-1, -1],
  1536. [2, 14],
  1537. [9, 14]
  1538. ]
  1539. },
  1540. 'u': {
  1541. width: 19, points: [
  1542. [4, 14],
  1543. [4, 4],
  1544. [5, 1],
  1545. [7, 0],
  1546. [10, 0],
  1547. [12, 1],
  1548. [15, 4],
  1549. [-1, -1],
  1550. [15, 14],
  1551. [15, 0]
  1552. ]
  1553. },
  1554. 'v': {
  1555. width: 16, points: [
  1556. [2, 14],
  1557. [8, 0],
  1558. [-1, -1],
  1559. [14, 14],
  1560. [8, 0]
  1561. ]
  1562. },
  1563. 'w': {
  1564. width: 22, points: [
  1565. [3, 14],
  1566. [7, 0],
  1567. [-1, -1],
  1568. [11, 14],
  1569. [7, 0],
  1570. [-1, -1],
  1571. [11, 14],
  1572. [15, 0],
  1573. [-1, -1],
  1574. [19, 14],
  1575. [15, 0]
  1576. ]
  1577. },
  1578. 'x': {
  1579. width: 17, points: [
  1580. [3, 14],
  1581. [14, 0],
  1582. [-1, -1],
  1583. [14, 14],
  1584. [3, 0]
  1585. ]
  1586. },
  1587. 'y': {
  1588. width: 16, points: [
  1589. [2, 14],
  1590. [8, 0],
  1591. [-1, -1],
  1592. [14, 14],
  1593. [8, 0],
  1594. [6, -4],
  1595. [4, -6],
  1596. [2, -7],
  1597. [1, -7]
  1598. ]
  1599. },
  1600. 'z': {
  1601. width: 17, points: [
  1602. [14, 14],
  1603. [3, 0],
  1604. [-1, -1],
  1605. [3, 14],
  1606. [14, 14],
  1607. [-1, -1],
  1608. [3, 0],
  1609. [14, 0]
  1610. ]
  1611. },
  1612. '{': {
  1613. width: 14, points: [
  1614. [9, 25],
  1615. [7, 24],
  1616. [6, 23],
  1617. [5, 21],
  1618. [5, 19],
  1619. [6, 17],
  1620. [7, 16],
  1621. [8, 14],
  1622. [8, 12],
  1623. [6, 10],
  1624. [-1, -1],
  1625. [7, 24],
  1626. [6, 22],
  1627. [6, 20],
  1628. [7, 18],
  1629. [8, 17],
  1630. [9, 15],
  1631. [9, 13],
  1632. [8, 11],
  1633. [4, 9],
  1634. [8, 7],
  1635. [9, 5],
  1636. [9, 3],
  1637. [8, 1],
  1638. [7, 0],
  1639. [6, -2],
  1640. [6, -4],
  1641. [7, -6],
  1642. [-1, -1],
  1643. [6, 8],
  1644. [8, 6],
  1645. [8, 4],
  1646. [7, 2],
  1647. [6, 1],
  1648. [5, -1],
  1649. [5, -3],
  1650. [6, -5],
  1651. [7, -6],
  1652. [9, -7]
  1653. ]
  1654. },
  1655. '|': {
  1656. width: 8, points: [
  1657. [4, 25],
  1658. [4, -7]
  1659. ]
  1660. },
  1661. '}': {
  1662. width: 14, points: [
  1663. [5, 25],
  1664. [7, 24],
  1665. [8, 23],
  1666. [9, 21],
  1667. [9, 19],
  1668. [8, 17],
  1669. [7, 16],
  1670. [6, 14],
  1671. [6, 12],
  1672. [8, 10],
  1673. [-1, -1],
  1674. [7, 24],
  1675. [8, 22],
  1676. [8, 20],
  1677. [7, 18],
  1678. [6, 17],
  1679. [5, 15],
  1680. [5, 13],
  1681. [6, 11],
  1682. [10, 9],
  1683. [6, 7],
  1684. [5, 5],
  1685. [5, 3],
  1686. [6, 1],
  1687. [7, 0],
  1688. [8, -2],
  1689. [8, -4],
  1690. [7, -6],
  1691. [-1, -1],
  1692. [8, 8],
  1693. [6, 6],
  1694. [6, 4],
  1695. [7, 2],
  1696. [8, 1],
  1697. [9, -1],
  1698. [9, -3],
  1699. [8, -5],
  1700. [7, -6],
  1701. [5, -7]
  1702. ]
  1703. },
  1704. '~': {
  1705. width: 24, points: [
  1706. [3, 6],
  1707. [3, 8],
  1708. [4, 11],
  1709. [6, 12],
  1710. [8, 12],
  1711. [10, 11],
  1712. [14, 8],
  1713. [16, 7],
  1714. [18, 7],
  1715. [20, 8],
  1716. [21, 10],
  1717. [-1, -1],
  1718. [3, 8],
  1719. [4, 10],
  1720. [6, 11],
  1721. [8, 11],
  1722. [10, 10],
  1723. [14, 7],
  1724. [16, 6],
  1725. [18, 6],
  1726. [20, 7],
  1727. [21, 10],
  1728. [21, 12]
  1729. ]
  1730. }
  1731. };
  1732. }
  1733. }
  1734.