Browse Source

Default the font.

Geoffrey J. Teale 11 years ago
parent
commit
3decc10734
1 changed files with 5 additions and 1 deletions
  1. 5 1
      style.go

+ 5 - 1
style.go

@@ -15,7 +15,7 @@ type Style struct {
 
 // Return a new Style structure initialised with the default values.
 func NewStyle() *Style {
-	return &Style{Font: *NewFont(12, "Verdana")}
+	return &Style{Font: *DefaulFont()}
 }
 
 // Generate the underlying XLSX style elements that correspond to the Style.
@@ -86,3 +86,7 @@ type Font struct {
 func NewFont(size int, name string) *Font {
 	return &Font{Size: size, Name: name}
 }
+
+func DefaulFont() *Font {
+	return NewFont(12, "Verdana")
+}