diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-05-16 20:42:01 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-05-16 20:42:01 +0800 |
commit | 70f6328150aa954cd9721e90883f001ea005c1ee (patch) | |
tree | 6dbadfb4b1fe1306f7794295b904e5f30fd29bb7 /xmlStyles.go | |
parent | cf97118bfe48eb36b82c4a833b51d3ea4bfffa97 (diff) |
Support set font style of shape text. Relate issue #38.
Diffstat (limited to 'xmlStyles.go')
-rw-r--r-- | xmlStyles.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/xmlStyles.go b/xmlStyles.go index aa0c9c8..4e7a7d1 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -282,6 +282,16 @@ type xlsxStyleColors struct { Color string `xml:",innerxml"` } +// formatFont directly maps the styles settings of the fonts. +type formatFont struct { + Bold bool `json:"bold"` + Italic bool `json:"italic"` + Underline string `json:"underline"` + Family string `json:"family"` + Size int `json:"size"` + Color string `json:"color"` +} + // formatCellStyle directly maps the styles settings of the borders. type formatCellStyle struct { Border []struct { @@ -295,14 +305,7 @@ type formatCellStyle struct { Color []string `json:"color"` Shading int `json:"shading"` } `json:"fill"` - Font *struct { - Bold bool `json:"bold"` - Italic bool `json:"italic"` - Underline string `json:"underline"` - Family string `json:"family"` - Size int `json:"size"` - Color string `json:"color"` - } `json:"font"` + Font *formatFont `json:"font"` Alignment *struct { Horizontal string `json:"horizontal"` Indent int `json:"indent"` |