Class: Uniword::Wordprocessingml::CharacterStyle
- Inherits:
-
Object
- Object
- Uniword::Wordprocessingml::CharacterStyle
- Defined in:
- lib/uniword/wordprocessingml/character_style.rb
Overview
Factory class for creating character Style instances
Provides factory methods for common character styles like DefaultParagraphFont, Emphasis, Strong, etc.
Class Method Summary collapse
-
.book_title ⇒ Style
Create a Book Title character style.
-
.default_char ⇒ Style
Create the default character style.
-
.emphasis ⇒ Style
Create an Emphasis character style (italic).
-
.followed_hyperlink ⇒ Style
Create a Followed Hyperlink character style.
-
.hyperlink ⇒ Style
Create a Hyperlink character style.
-
.intense_emphasis ⇒ Style
Create an Intense Emphasis character style.
-
.intense_quote_char ⇒ Style
Create an Intense Quote character style.
-
.intense_reference ⇒ Style
Create an Intense Reference character style.
-
.quote_char ⇒ Style
Create a Quote character style.
-
.strong ⇒ Style
Create a Strong character style (bold).
-
.subtle_emphasis ⇒ Style
Create a Subtle Emphasis character style.
-
.subtle_reference ⇒ Style
Create a Subtle Reference character style.
Class Method Details
.book_title ⇒ Style
Create a Book Title character style
153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 153 def self.book_title Style.new( type: "character", styleId: "BookTitle", name: StyleName.new(val: "Book Title"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, fonts: Properties::RunFonts.new(ascii: "Constantia", h_ansi: "Constantia"), ), ) end |
.default_char ⇒ Style
Create the default character style
13 14 15 16 17 18 19 20 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 13 def self.default_char Style.new( type: "character", styleId: "DefaultParagraphFont", name: StyleName.new(val: "Default Paragraph Font"), default: true, ) end |
.emphasis ⇒ Style
Create an Emphasis character style (italic)
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 25 def self.emphasis Style.new( type: "character", styleId: "Emphasis", name: StyleName.new(val: "Emphasis"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, ), ) end |
.followed_hyperlink ⇒ Style
Create a Followed Hyperlink character style
186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 186 def self.followed_hyperlink Style.new( type: "character", styleId: "FollowedHyperlink", name: StyleName.new(val: "Followed Hyperlink"), customStyle: true, rPr: RunProperties.new( color: Properties::ColorValue.new(value: "800080"), underline: Properties::Underline.new(value: "single"), ), ) end |
.hyperlink ⇒ Style
Create a Hyperlink character style
170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 170 def self.hyperlink Style.new( type: "character", styleId: "Hyperlink", name: StyleName.new(val: "Hyperlink"), customStyle: true, rPr: RunProperties.new( color: Properties::ColorValue.new(value: "0000FF"), underline: Properties::Underline.new(value: "single"), ), ) end |
.intense_emphasis ⇒ Style
Create an Intense Emphasis character style
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 71 def self.intense_emphasis Style.new( type: "character", styleId: "IntenseEmphasis", name: StyleName.new(val: "Intense Emphasis"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, bold: Properties::Bold.new, color: Properties::ColorValue.new(value: "2E74B5"), ), ) end |
.intense_quote_char ⇒ Style
Create an Intense Quote character style
104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 104 def self.intense_quote_char Style.new( type: "character", styleId: "IntenseQuoteChar", name: StyleName.new(val: "Intense Quote Char"), basedOn: BasedOn.new(val: "DefaultParagraphFont"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, bold: Properties::Bold.new, ), ) end |
.intense_reference ⇒ Style
Create an Intense Reference character style
137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 137 def self.intense_reference Style.new( type: "character", styleId: "IntenseReference", name: StyleName.new(val: "Intense Reference"), customStyle: true, rPr: RunProperties.new( bold: Properties::Bold.new, color: Properties::ColorValue.new(value: "2E74B5"), ), ) end |
.quote_char ⇒ Style
Create a Quote character style
88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 88 def self.quote_char Style.new( type: "character", styleId: "QuoteChar", name: StyleName.new(val: "Quote Char"), basedOn: BasedOn.new(val: "DefaultParagraphFont"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, ), ) end |
.strong ⇒ Style
Create a Strong character style (bold)
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 40 def self.strong Style.new( type: "character", styleId: "Strong", name: StyleName.new(val: "Strong"), customStyle: true, rPr: RunProperties.new( bold: Properties::Bold.new, ), ) end |
.subtle_emphasis ⇒ Style
Create a Subtle Emphasis character style
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 55 def self.subtle_emphasis Style.new( type: "character", styleId: "SubtleEmphasis", name: StyleName.new(val: "Subtle Emphasis"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, color: Properties::ColorValue.new(value: "595959"), ), ) end |
.subtle_reference ⇒ Style
Create a Subtle Reference character style
121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/uniword/wordprocessingml/character_style.rb', line 121 def self.subtle_reference Style.new( type: "character", styleId: "SubtleReference", name: StyleName.new(val: "Subtle Reference"), customStyle: true, rPr: RunProperties.new( italic: Properties::Italic.new, color: Properties::ColorValue.new(value: "595959"), ), ) end |