summaryrefslogtreecommitdiff
path: root/xmlStyles.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-04-25 18:43:10 +0800
committerRi Xu <xuri.me@gmail.com>2017-04-25 18:43:10 +0800
commit266d2c36e58ad1a53286ab2c01a2d41e3af883c7 (patch)
tree07fed55aad2d31be8e5104bf906881922bff18f9 /xmlStyles.go
parentd78ac4108c2fd8ccf4a0d150302a70031d6f889b (diff)
- Font bold, italic and underline style support. Relate issue #45;
- Function `GetRows()` doc updated, relate issue #43; - go test and embed template updated
Diffstat (limited to 'xmlStyles.go')
-rw-r--r--xmlStyles.go24
1 files changed, 22 insertions, 2 deletions
diff --git a/xmlStyles.go b/xmlStyles.go
index 14b5e4b..682c5d3 100644
--- a/xmlStyles.go
+++ b/xmlStyles.go
@@ -57,11 +57,23 @@ type xlsxColor struct {
Tint float64 `xml:"tint,attr,omitempty"`
}
-// xlsxFonts directly maps the fonts element. This element contains all font
+// xlsxFonts directly maps the font element. This element contains all font
// definitions for this workbook.
type xlsxFonts struct {
Count int `xml:"count,attr"`
- Font []*xlsxFont `xml:"font,omitempty"`
+ Font []*xlsxFont `xml:"font"`
+}
+
+// font directly maps the font element.
+type font struct {
+ B bool `xml:"b,omitempty"`
+ I bool `xml:"i,omitempty"`
+ U *attrValString `xml:"u"`
+ Sz *attrValInt `xml:"sz"`
+ Color *xlsxColor `xml:"color"`
+ Name *attrValString `xml:"name"`
+ Family *attrValInt `xml:"family"`
+ Scheme *attrValString `xml:"scheme"`
}
// xlsxFont directly maps the font element. This element defines the properties
@@ -283,6 +295,14 @@ 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"`
Alignment *struct {
Horizontal string `json:"horizontal"`
Indent int `json:"indent"`