17
17
*/
18
18
class Font extends AbstractStyle
19
19
{
20
+ /**
21
+ * Underline types
22
+ *
23
+ * @const string
24
+ */
20
25
const UNDERLINE_NONE = 'none ' ;
21
26
const UNDERLINE_DASH = 'dash ' ;
22
27
const UNDERLINE_DASHHEAVY = 'dashHeavy ' ;
@@ -35,6 +40,12 @@ class Font extends AbstractStyle
35
40
const UNDERLINE_WAVYDOUBLE = 'wavyDbl ' ;
36
41
const UNDERLINE_WAVYHEAVY = 'wavyHeavy ' ;
37
42
const UNDERLINE_WORDS = 'words ' ;
43
+
44
+ /**
45
+ * Foreground colors
46
+ *
47
+ * @const string
48
+ */
38
49
const FGCOLOR_YELLOW = 'yellow ' ;
39
50
const FGCOLOR_LIGHTGREEN = 'green ' ;
40
51
const FGCOLOR_CYAN = 'cyan ' ;
@@ -121,6 +132,13 @@ class Font extends AbstractStyle
121
132
*/
122
133
private $ strikethrough = false ;
123
134
135
+ /**
136
+ * Double strikethrough
137
+ *
138
+ * @var bool
139
+ */
140
+ private $ doubleStrikethrough = false ;
141
+
124
142
/**
125
143
* Font color
126
144
*
@@ -161,6 +179,22 @@ class Font extends AbstractStyle
161
179
*/
162
180
private $ hint = PhpWord::DEFAULT_FONT_CONTENT_TYPE ;
163
181
182
+ /**
183
+ * Small caps
184
+ *
185
+ * @var bool
186
+ * @link http://www.schemacentral.com/sc/ooxml/e-w_smallCaps-1.html
187
+ */
188
+ private $ smallCaps = false ;
189
+
190
+ /**
191
+ * All caps
192
+ *
193
+ * @var bool
194
+ * @link http://www.schemacentral.com/sc/ooxml/e-w_caps-1.html
195
+ */
196
+ private $ allCaps = false ;
197
+
164
198
/**
165
199
* Create new font style
166
200
*
@@ -387,6 +421,35 @@ public function getStrikethrough()
387
421
public function setStrikethrough ($ value = false )
388
422
{
389
423
$ this ->strikethrough = $ this ->setBoolVal ($ value , $ this ->strikethrough );
424
+ if ($ this ->strikethrough ) {
425
+ $ this ->doubleStrikethrough = false ;
426
+ }
427
+
428
+ return $ this ;
429
+ }
430
+
431
+ /**
432
+ * Get double strikethrough
433
+ *
434
+ * @return bool
435
+ */
436
+ public function getDoubleStrikethrough ()
437
+ {
438
+ return $ this ->doubleStrikethrough ;
439
+ }
440
+
441
+ /**
442
+ * Set double strikethrough
443
+ *
444
+ * @param bool $value
445
+ * @return self
446
+ */
447
+ public function setDoubleStrikethrough ($ value = false )
448
+ {
449
+ $ this ->doubleStrikethrough = $ this ->setBoolVal ($ value , $ this ->doubleStrikethrough );
450
+ if ($ this ->doubleStrikethrough ) {
451
+ $ this ->strikethrough = false ;
452
+ }
390
453
391
454
return $ this ;
392
455
}
@@ -534,4 +597,56 @@ public function setHint($value = PhpWord::DEFAULT_FONT_CONTENT_TYPE)
534
597
535
598
return $ this ;
536
599
}
600
+
601
+ /**
602
+ * Get small caps
603
+ *
604
+ * @return bool
605
+ */
606
+ public function getSmallCaps ()
607
+ {
608
+ return $ this ->smallCaps ;
609
+ }
610
+
611
+ /**
612
+ * Set small caps
613
+ *
614
+ * @param bool $value
615
+ * @return self
616
+ */
617
+ public function setSmallCaps ($ value = false )
618
+ {
619
+ $ this ->smallCaps = $ this ->setBoolVal ($ value , $ this ->smallCaps );
620
+ if ($ this ->smallCaps ) {
621
+ $ this ->allCaps = false ;
622
+ }
623
+
624
+ return $ this ;
625
+ }
626
+
627
+ /**
628
+ * Get all caps
629
+ *
630
+ * @return bool
631
+ */
632
+ public function getAllCaps ()
633
+ {
634
+ return $ this ->allCaps ;
635
+ }
636
+
637
+ /**
638
+ * Set all caps
639
+ *
640
+ * @param bool $value
641
+ * @return self
642
+ */
643
+ public function setAllCaps ($ value = false )
644
+ {
645
+ $ this ->allCaps = $ this ->setBoolVal ($ value , $ this ->allCaps );
646
+ if ($ this ->allCaps ) {
647
+ $ this ->smallCaps = false ;
648
+ }
649
+
650
+ return $ this ;
651
+ }
537
652
}
0 commit comments