Skip to content

Commit 5bd9647

Browse files
authored
Skip fallback to default font size when create style if font size less than minimum size (#2143)
- Update comment for add form control function - Update README for minimum Go language required version
1 parent b65c16b commit 5bd9647

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## Introduction
1515

16-
Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.23 or later. The full docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2) and [docs reference](https://xuri.me/excelize/).
16+
Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.23.0 or later. The full docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2) and [docs reference](https://xuri.me/excelize/).
1717

1818
## Basic Usage
1919

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## 简介
1515

16-
Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLAM / XLSM / XLSX / XLTM / XLTX 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写函数,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.23 或更高版本。完整的使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2) 或查看 [参考文档](https://xuri.me/excelize/)
16+
Excelize 是 Go 语言编写的用于操作 Office Excel 文档基础库,基于 ECMA-376,ISO/IEC 29500 国际标准。可以使用它来读取、写入由 Microsoft Excel™ 2007 及以上版本创建的电子表格文档。支持 XLAM / XLSM / XLSX / XLTM / XLTX 等多种文档格式,高度兼容带有样式、图片(表)、透视表、切片器等复杂组件的文档,并提供流式读写函数,用于处理包含大规模数据的工作簿。可应用于各类报表平台、云计算、边缘计算等系统。使用本类库要求使用的 Go 语言为 1.23.0 或更高版本。完整的使用文档请访问 [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2) 或查看 [参考文档](https://xuri.me/excelize/)
1717

1818
## 快速上手
1919

styles.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,12 +1855,9 @@ func newFontColor(font *Font) *xlsxColor {
18551855
// newFont provides a function to add font style by given cell format
18561856
// settings.
18571857
func (fnt *Font) newFont() *xlsxFont {
1858-
if fnt.Size < MinFontSize {
1859-
fnt.Size = 11
1860-
}
1861-
font := xlsxFont{
1862-
Sz: &attrValFloat{Val: float64Ptr(fnt.Size)},
1863-
Family: &attrValInt{Val: intPtr(2)},
1858+
font := xlsxFont{Family: &attrValInt{Val: intPtr(2)}}
1859+
if fnt.Size >= MinFontSize {
1860+
font.Sz = &attrValFloat{Val: float64Ptr(fnt.Size)}
18641861
}
18651862
if fnt.Family != "" {
18661863
font.Name = &attrValString{Val: stringPtr(fnt.Family)}

vml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func (f *File) commentsWriter() {
368368
}
369369
}
370370

371-
// AddFormControl provides the method to add form control button in a worksheet
371+
// AddFormControl provides the method to add form control object in a worksheet
372372
// by given worksheet name and form control options. Supported form control
373373
// type: button, check box, group box, label, option button, scroll bar and
374374
// spinner. If set macro for the form control, the workbook extension should be

0 commit comments

Comments
 (0)