rrtf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -7
  3. data/documentation/RRTF/CharacterFormatting.html +1002 -0
  4. data/documentation/RRTF/CharacterStyle.html +1058 -0
  5. data/documentation/RRTF/Colour.html +813 -0
  6. data/documentation/RRTF/ColourTable.html +770 -0
  7. data/documentation/RRTF/CommandNode.html +2372 -0
  8. data/documentation/RRTF/ContainerNode.html +826 -0
  9. data/documentation/RRTF/Converters/HTML/Helpers.html +272 -0
  10. data/documentation/RRTF/Converters/HTML/Node.html +364 -0
  11. data/documentation/RRTF/Converters/HTML/NodeSet.html +265 -0
  12. data/documentation/RRTF/Converters/HTML.html +337 -0
  13. data/documentation/RRTF/Converters.html +117 -0
  14. data/documentation/RRTF/Document.html +2405 -0
  15. data/documentation/RRTF/DocumentStyle.html +1367 -0
  16. data/documentation/RRTF/Font.html +790 -0
  17. data/documentation/RRTF/FontTable.html +763 -0
  18. data/documentation/RRTF/FooterNode.html +515 -0
  19. data/documentation/RRTF/HeaderNode.html +515 -0
  20. data/documentation/RRTF/ImageNode.html +1374 -0
  21. data/documentation/RRTF/Information.html +809 -0
  22. data/documentation/RRTF/LinkNode.html +264 -0
  23. data/documentation/RRTF/ListLevel.html +799 -0
  24. data/documentation/RRTF/ListLevelNode.html +612 -0
  25. data/documentation/RRTF/ListMarker.html +595 -0
  26. data/documentation/RRTF/ListNode.html +368 -0
  27. data/documentation/RRTF/ListTable.html +343 -0
  28. data/documentation/RRTF/ListTemplate.html +433 -0
  29. data/documentation/RRTF/ListTextNode.html +285 -0
  30. data/documentation/RRTF/Node.html +616 -0
  31. data/documentation/RRTF/Paper.html +624 -0
  32. data/documentation/RRTF/ParagraphFormatting.html +749 -0
  33. data/documentation/RRTF/ParagraphNode.html +275 -0
  34. data/documentation/RRTF/ParagraphStyle.html +1319 -0
  35. data/documentation/RRTF/RTFError.html +295 -0
  36. data/documentation/RRTF/Style.html +1767 -0
  37. data/documentation/RRTF/Stylesheet.html +1768 -0
  38. data/documentation/RRTF/TableCellNode.html +1704 -0
  39. data/documentation/RRTF/TableNode.html +1025 -0
  40. data/documentation/RRTF/TableRowNode.html +675 -0
  41. data/documentation/RRTF/TextNode.html +600 -0
  42. data/documentation/RRTF/Utilities.html +201 -0
  43. data/documentation/RRTF.html +129 -0
  44. data/documentation/_index.html +478 -0
  45. data/documentation/class_list.html +51 -0
  46. data/documentation/css/common.css +1 -0
  47. data/documentation/css/full_list.css +58 -0
  48. data/documentation/css/style.css +492 -0
  49. data/documentation/file.README.html +223 -0
  50. data/documentation/file_list.html +56 -0
  51. data/documentation/frames.html +17 -0
  52. data/documentation/index.html +223 -0
  53. data/documentation/js/app.js +248 -0
  54. data/documentation/js/full_list.js +216 -0
  55. data/documentation/js/jquery.js +4 -0
  56. data/documentation/method_list.html +2203 -0
  57. data/documentation/top-level-namespace.html +110 -0
  58. data/examples/01.rtf +14 -17
  59. data/examples/01_mac_word15_36.png +0 -0
  60. data/examples/01_styles_and_paragraphs.rb +3 -4
  61. data/examples/resources/json/redshirt_styles.json +4 -2
  62. data/lib/rrtf/node.rb +86 -167
  63. data/lib/rrtf/style/character_style.rb +4 -3
  64. data/lib/rrtf/style/formatting.rb +55 -11
  65. data/lib/rrtf/style/paragraph_style.rb +19 -4
  66. data/lib/rrtf/style/style.rb +15 -15
  67. data/lib/rrtf/stylesheet.rb +57 -16
  68. data/lib/rrtf/version.rb +1 -1
  69. data/rrtf.gemspec +1 -0
  70. metadata +70 -1
@@ -0,0 +1,790 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RRTF::Font
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "RRTF::Font";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (F)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../RRTF.html" title="RRTF (module)">RRTF</a></span></span>
41
+ &raquo;
42
+ <span class="title">Font</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RRTF::Font
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">RRTF::Font</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/rrtf/font.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>This class represents a font for use with some RTF content.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+ <h2>Constant Summary</h2>
115
+ <dl class="constants">
116
+
117
+ <dt id="MODERN-constant" class="">MODERN =
118
+ <div class="docstring">
119
+ <div class="discussion">
120
+
121
+ <p>A declaration for a font family. This family is used for monospaced fonts
122
+ (e.g. Courier New).</p>
123
+
124
+
125
+ </div>
126
+ </div>
127
+ <div class="tags">
128
+
129
+
130
+ </div>
131
+ </dt>
132
+ <dd><pre class="code"><span class='symbol'>:modern</span></pre></dd>
133
+
134
+ <dt id="ROMAN-constant" class="">ROMAN =
135
+ <div class="docstring">
136
+ <div class="discussion">
137
+
138
+ <p>A declaration for a font family. This family is used for proportionally
139
+ spaced serif fonts (e.g. Arial, Times New Roman).</p>
140
+
141
+
142
+ </div>
143
+ </div>
144
+ <div class="tags">
145
+
146
+
147
+ </div>
148
+ </dt>
149
+ <dd><pre class="code"><span class='symbol'>:roman</span></pre></dd>
150
+
151
+ <dt id="SWISS-constant" class="">SWISS =
152
+ <div class="docstring">
153
+ <div class="discussion">
154
+
155
+ <p>A declaration for a font family. This family is used for proportionally
156
+ spaced sans serif fonts (e.g. Tahoma, Lucida Sans).</p>
157
+
158
+
159
+ </div>
160
+ </div>
161
+ <div class="tags">
162
+
163
+
164
+ </div>
165
+ </dt>
166
+ <dd><pre class="code"><span class='symbol'>:swiss</span></pre></dd>
167
+
168
+ <dt id="NIL-constant" class="">NIL =
169
+ <div class="docstring">
170
+ <div class="discussion">
171
+
172
+ <p>A declaration for a font family. This family is used where none of the
173
+ other families apply.</p>
174
+
175
+
176
+ </div>
177
+ </div>
178
+ <div class="tags">
179
+
180
+
181
+ </div>
182
+ </dt>
183
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nil</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span></pre></dd>
184
+
185
+ </dl>
186
+
187
+
188
+
189
+
190
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
191
+ <ul class="summary">
192
+
193
+ <li class="public ">
194
+ <span class="summary_signature">
195
+
196
+ <a href="#family-instance_method" title="#family (instance method)">#<strong>family</strong> &#x21d2; Object </a>
197
+
198
+
199
+
200
+ </span>
201
+
202
+
203
+
204
+
205
+ <span class="note title readonly">readonly</span>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ <span class="summary_desc"><div class='inline'>
216
+ <p>Attribute accessor.</p>
217
+ </div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Object </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+ <span class="note title readonly">readonly</span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'>
245
+ <p>Attribute accessor.</p>
246
+ </div></span>
247
+
248
+ </li>
249
+
250
+
251
+ </ul>
252
+
253
+
254
+
255
+
256
+
257
+ <h2>
258
+ Class Method Summary
259
+ <small><a href="#" class="summary_toggle">collapse</a></small>
260
+ </h2>
261
+
262
+ <ul class="summary">
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#from_string-class_method" title="from_string (class method)">.<strong>from_string</strong>(str) &#x21d2; Object </a>
268
+
269
+
270
+
271
+ </span>
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+ <span class="summary_desc"><div class='inline'>
282
+ <p>Format: “&lt;FAMILY_CONSTANT&gt;:&lt;Name&gt;”.</p>
283
+ </div></span>
284
+
285
+ </li>
286
+
287
+
288
+ </ul>
289
+
290
+ <h2>
291
+ Instance Method Summary
292
+ <small><a href="#" class="summary_toggle">collapse</a></small>
293
+ </h2>
294
+
295
+ <ul class="summary">
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#==-instance_method" title="#== (instance method)">#<strong>==</strong>(object) &#x21d2; Object </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+ <span class="summary_desc"><div class='inline'>
315
+ <p>This method overloads the equivalence test operator for the Font class to
316
+ allow for Font comparisons.</p>
317
+ </div></span>
318
+
319
+ </li>
320
+
321
+
322
+ <li class="public ">
323
+ <span class="summary_signature">
324
+
325
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(family, name) &#x21d2; Font </a>
326
+
327
+
328
+
329
+ </span>
330
+
331
+
332
+ <span class="note title constructor">constructor</span>
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+ <span class="summary_desc"><div class='inline'>
342
+ <p>This is the constructor for the Font class.</p>
343
+ </div></span>
344
+
345
+ </li>
346
+
347
+
348
+ <li class="public ">
349
+ <span class="summary_signature">
350
+
351
+ <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>(indent = 0) &#x21d2; Object </a>
352
+
353
+
354
+
355
+ </span>
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ <span class="summary_desc"><div class='inline'>
366
+ <p>This method generates the RTF representation for a Font object as it would
367
+ appear within a document font table.</p>
368
+ </div></span>
369
+
370
+ </li>
371
+
372
+
373
+ <li class="public ">
374
+ <span class="summary_signature">
375
+
376
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong>(indent = 0) &#x21d2; Object </a>
377
+
378
+
379
+
380
+ </span>
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+ <span class="summary_desc"><div class='inline'>
391
+ <p>This method fetches a textual description for a Font object.</p>
392
+ </div></span>
393
+
394
+ </li>
395
+
396
+
397
+ </ul>
398
+
399
+
400
+ <div id="constructor_details" class="method_details_list">
401
+ <h2>Constructor Details</h2>
402
+
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="initialize-instance_method">
405
+
406
+ #<strong>initialize</strong>(family, name) &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::Font (class)">Font</a></span></tt>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><div class="docstring">
413
+ <div class="discussion">
414
+
415
+ <p>This is the constructor for the Font class.</p>
416
+
417
+ <h4 id="label-Parameters">Parameters</h4>
418
+ <dl class="rdoc-list note-list"><dt>family
419
+ <dd>
420
+ <p>The font family for the new font. This should be one of Font::MODERN,
421
+ Font::ROMAN, Font::SWISS or Font::NIL.</p>
422
+ </dd><dt>name
423
+ <dd>
424
+ <p>A string containing the font name.</p>
425
+ </dd></dl>
426
+
427
+ <h4 id="label-Exceptions">Exceptions</h4>
428
+ <dl class="rdoc-list note-list"><dt>RTFError
429
+ <dd>
430
+ <p>Generated whenever an invalid font family is specified.</p>
431
+ </dd></dl>
432
+
433
+
434
+ </div>
435
+ </div>
436
+ <div class="tags">
437
+
438
+
439
+ </div><table class="source_code">
440
+ <tr>
441
+ <td>
442
+ <pre class="lines">
443
+
444
+
445
+ 48
446
+ 49
447
+ 50
448
+ 51
449
+ 52
450
+ 53
451
+ 54
452
+ 55</pre>
453
+ </td>
454
+ <td>
455
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 48</span>
456
+
457
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_family'>family</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
458
+ <span class='comment'># Check that a valid family has been provided.
459
+ </span> <span class='kw'>if</span> <span class='op'>!</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#MODERN-constant" title="RRTF::Font::MODERN (constant)">MODERN</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#ROMAN-constant" title="RRTF::Font::ROMAN (constant)">ROMAN</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#SWISS-constant" title="RRTF::Font::SWISS (constant)">SWISS</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#NIL-constant" title="RRTF::Font::NIL (constant)">NIL</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_family'>family</span><span class='rparen'>)</span>
460
+ <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='op'>::</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown font family specified for Font object.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
461
+ <span class='kw'>end</span>
462
+ <span class='ivar'>@family</span> <span class='op'>=</span> <span class='id identifier rubyid_family'>family</span>
463
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
464
+ <span class='kw'>end</span></pre>
465
+ </td>
466
+ </tr>
467
+ </table>
468
+ </div>
469
+
470
+ </div>
471
+
472
+ <div id="instance_attr_details" class="attr_details">
473
+ <h2>Instance Attribute Details</h2>
474
+
475
+
476
+ <span id=""></span>
477
+ <div class="method_details first">
478
+ <h3 class="signature first" id="family-instance_method">
479
+
480
+ #<strong>family</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
481
+
482
+
483
+
484
+
485
+
486
+ </h3><div class="docstring">
487
+ <div class="discussion">
488
+
489
+ <p>Attribute accessor.</p>
490
+
491
+
492
+ </div>
493
+ </div>
494
+ <div class="tags">
495
+
496
+
497
+ </div><table class="source_code">
498
+ <tr>
499
+ <td>
500
+ <pre class="lines">
501
+
502
+
503
+ 24
504
+ 25
505
+ 26</pre>
506
+ </td>
507
+ <td>
508
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 24</span>
509
+
510
+ <span class='kw'>def</span> <span class='id identifier rubyid_family'>family</span>
511
+ <span class='ivar'>@family</span>
512
+ <span class='kw'>end</span></pre>
513
+ </td>
514
+ </tr>
515
+ </table>
516
+ </div>
517
+
518
+
519
+ <span id=""></span>
520
+ <div class="method_details ">
521
+ <h3 class="signature " id="name-instance_method">
522
+
523
+ #<strong>name</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
524
+
525
+
526
+
527
+
528
+
529
+ </h3><div class="docstring">
530
+ <div class="discussion">
531
+
532
+ <p>Attribute accessor.</p>
533
+
534
+
535
+ </div>
536
+ </div>
537
+ <div class="tags">
538
+
539
+
540
+ </div><table class="source_code">
541
+ <tr>
542
+ <td>
543
+ <pre class="lines">
544
+
545
+
546
+ 24
547
+ 25
548
+ 26</pre>
549
+ </td>
550
+ <td>
551
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 24</span>
552
+
553
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
554
+ <span class='ivar'>@name</span>
555
+ <span class='kw'>end</span></pre>
556
+ </td>
557
+ </tr>
558
+ </table>
559
+ </div>
560
+
561
+ </div>
562
+
563
+
564
+ <div id="class_method_details" class="method_details_list">
565
+ <h2>Class Method Details</h2>
566
+
567
+
568
+ <div class="method_details first">
569
+ <h3 class="signature first" id="from_string-class_method">
570
+
571
+ .<strong>from_string</strong>(str) &#x21d2; <tt>Object</tt>
572
+
573
+
574
+
575
+
576
+
577
+ </h3><div class="docstring">
578
+ <div class="discussion">
579
+
580
+ <p>Format: “&lt;FAMILY_CONSTANT&gt;:&lt;Name&gt;”</p>
581
+
582
+
583
+ </div>
584
+ </div>
585
+ <div class="tags">
586
+
587
+
588
+ </div><table class="source_code">
589
+ <tr>
590
+ <td>
591
+ <pre class="lines">
592
+
593
+
594
+ 28
595
+ 29
596
+ 30
597
+ 31
598
+ 32
599
+ 33
600
+ 34
601
+ 35</pre>
602
+ </td>
603
+ <td>
604
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 28</span>
605
+
606
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_string'>from_string</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
607
+ <span class='kw'>if</span> <span class='id identifier rubyid_str'>str</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>([a-z]+):(.+)</span><span class='regexp_end'>/i</span></span>
608
+ <span class='id identifier rubyid_parts'>parts</span> <span class='op'>=</span> <span class='id identifier rubyid_str'>str</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
609
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../RRTF.html" title="RRTF (module)">RRTF</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Utilities.html" title="RRTF::Utilities (class)">Utilities</a></span></span><span class='period'>.</span><span class='id identifier rubyid_constantize'><span class='object_link'><a href="Utilities.html#constantize-class_method" title="RRTF::Utilities.constantize (method)">constantize</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RRTF::Font::</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parts'>parts</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_parts'>parts</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='rparen'>)</span>
610
+ <span class='kw'>else</span>
611
+ <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unreconized string font format &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_str'>str</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39;.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
612
+ <span class='kw'>end</span>
613
+ <span class='kw'>end</span></pre>
614
+ </td>
615
+ </tr>
616
+ </table>
617
+ </div>
618
+
619
+ </div>
620
+
621
+ <div id="instance_method_details" class="method_details_list">
622
+ <h2>Instance Method Details</h2>
623
+
624
+
625
+ <div class="method_details first">
626
+ <h3 class="signature first" id="==-instance_method">
627
+
628
+ #<strong>==</strong>(object) &#x21d2; <tt>Object</tt>
629
+
630
+
631
+
632
+
633
+
634
+ </h3><div class="docstring">
635
+ <div class="discussion">
636
+
637
+ <p>This method overloads the equivalence test operator for the Font class to
638
+ allow for Font comparisons.</p>
639
+
640
+ <h4 id="label-Parameters">Parameters</h4>
641
+ <dl class="rdoc-list note-list"><dt>object
642
+ <dd>
643
+ <p>A reference to the object to be compared with.</p>
644
+ </dd></dl>
645
+
646
+
647
+ </div>
648
+ </div>
649
+ <div class="tags">
650
+
651
+
652
+ </div><table class="source_code">
653
+ <tr>
654
+ <td>
655
+ <pre class="lines">
656
+
657
+
658
+ 62
659
+ 63
660
+ 64
661
+ 65
662
+ 66</pre>
663
+ </td>
664
+ <td>
665
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 62</span>
666
+
667
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span>
668
+ <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_instance_of?'>instance_of?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="RRTF::Font (class)">Font</a></span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
669
+ <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_family'>family</span> <span class='op'>==</span> <span class='ivar'>@family</span> <span class='op'>&amp;&amp;</span>
670
+ <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='ivar'>@name</span>
671
+ <span class='kw'>end</span></pre>
672
+ </td>
673
+ </tr>
674
+ </table>
675
+ </div>
676
+
677
+ <div class="method_details ">
678
+ <h3 class="signature " id="to_rtf-instance_method">
679
+
680
+ #<strong>to_rtf</strong>(indent = 0) &#x21d2; <tt>Object</tt>
681
+
682
+
683
+
684
+
685
+
686
+ </h3><div class="docstring">
687
+ <div class="discussion">
688
+
689
+ <p>This method generates the RTF representation for a Font object as it would
690
+ appear within a document font table.</p>
691
+
692
+ <h4 id="label-Parameters">Parameters</h4>
693
+ <dl class="rdoc-list note-list"><dt>indent
694
+ <dd>
695
+ <p>The number of spaces to prefix to the lines generated by the method.
696
+ Defaults to zero.</p>
697
+ </dd></dl>
698
+
699
+
700
+ </div>
701
+ </div>
702
+ <div class="tags">
703
+
704
+
705
+ </div><table class="source_code">
706
+ <tr>
707
+ <td>
708
+ <pre class="lines">
709
+
710
+
711
+ 84
712
+ 85
713
+ 86
714
+ 87</pre>
715
+ </td>
716
+ <td>
717
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 84</span>
718
+
719
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
720
+ <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
721
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>\\f</span><span class='embexpr_beg'>#{</span><span class='ivar'>@family</span><span class='period'>.</span><span class='id identifier rubyid_id2name'>id2name</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='embexpr_end'>}</span><span class='tstring_content'>;</span><span class='tstring_end'>&quot;</span></span>
722
+ <span class='kw'>end</span></pre>
723
+ </td>
724
+ </tr>
725
+ </table>
726
+ </div>
727
+
728
+ <div class="method_details ">
729
+ <h3 class="signature " id="to_s-instance_method">
730
+
731
+ #<strong>to_s</strong>(indent = 0) &#x21d2; <tt>Object</tt>
732
+
733
+
734
+
735
+
736
+
737
+ </h3><div class="docstring">
738
+ <div class="discussion">
739
+
740
+ <p>This method fetches a textual description for a Font object.</p>
741
+
742
+ <h4 id="label-Parameters">Parameters</h4>
743
+ <dl class="rdoc-list note-list"><dt>indent
744
+ <dd>
745
+ <p>The number of spaces to prefix to the lines generated by the method.
746
+ Defaults to zero.</p>
747
+ </dd></dl>
748
+
749
+
750
+ </div>
751
+ </div>
752
+ <div class="tags">
753
+
754
+
755
+ </div><table class="source_code">
756
+ <tr>
757
+ <td>
758
+ <pre class="lines">
759
+
760
+
761
+ 73
762
+ 74
763
+ 75
764
+ 76</pre>
765
+ </td>
766
+ <td>
767
+ <pre class="code"><span class="info file"># File 'lib/rrtf/font.rb', line 73</span>
768
+
769
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_indent'>indent</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span>
770
+ <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>*</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
771
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_prefix'>prefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>Family: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@family</span><span class='period'>.</span><span class='id identifier rubyid_id2name'>id2name</span><span class='embexpr_end'>}</span><span class='tstring_content'>, Name: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
772
+ <span class='kw'>end</span></pre>
773
+ </td>
774
+ </tr>
775
+ </table>
776
+ </div>
777
+
778
+ </div>
779
+
780
+ </div>
781
+
782
+ <div id="footer">
783
+ Generated on Mon Jul 24 15:48:59 2017 by
784
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
785
+ 0.9.9 (ruby-2.3.3).
786
+ </div>
787
+
788
+ </div>
789
+ </body>
790
+ </html>