1717 */
1818class Font extends AbstractStyle
1919{
20+ /**
21+ * Underline types
22+ *
23+ * @const string
24+ */
2025 const UNDERLINE_NONE = 'none ' ;
2126 const UNDERLINE_DASH = 'dash ' ;
2227 const UNDERLINE_DASHHEAVY = 'dashHeavy ' ;
@@ -35,6 +40,12 @@ class Font extends AbstractStyle
3540 const UNDERLINE_WAVYDOUBLE = 'wavyDbl ' ;
3641 const UNDERLINE_WAVYHEAVY = 'wavyHeavy ' ;
3742 const UNDERLINE_WORDS = 'words ' ;
43+
44+ /**
45+ * Foreground colors
46+ *
47+ * @const string
48+ */
3849 const FGCOLOR_YELLOW = 'yellow ' ;
3950 const FGCOLOR_LIGHTGREEN = 'green ' ;
4051 const FGCOLOR_CYAN = 'cyan ' ;
@@ -121,6 +132,13 @@ class Font extends AbstractStyle
121132 */
122133 private $ strikethrough = false ;
123134
135+ /**
136+ * Double strikethrough
137+ *
138+ * @var bool
139+ */
140+ private $ doubleStrikethrough = false ;
141+
124142 /**
125143 * Font color
126144 *
@@ -161,6 +179,22 @@ class Font extends AbstractStyle
161179 */
162180 private $ hint = PhpWord::DEFAULT_FONT_CONTENT_TYPE ;
163181
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+
164198 /**
165199 * Create new font style
166200 *
@@ -387,6 +421,35 @@ public function getStrikethrough()
387421 public function setStrikethrough ($ value = false )
388422 {
389423 $ 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+ }
390453
391454 return $ this ;
392455 }
@@ -534,4 +597,56 @@ public function setHint($value = PhpWord::DEFAULT_FONT_CONTENT_TYPE)
534597
535598 return $ this ;
536599 }
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+ }
537652}
0 commit comments