fix: fix setting font family for table render

This commit is contained in:
vicanso 2022-11-12 10:48:24 +08:00
parent 6f6d6c3447
commit 2ed86a81d0

View file

@ -384,6 +384,9 @@ func TableOptionRender(opt TableChartOption) (*Painter, error) {
if opt.Width <= 0 {
opt.Width = defaultChartWidth
}
if opt.FontFamily != "" {
opt.Font, _ = GetFont(opt.FontFamily)
}
if opt.Font == nil {
opt.Font, _ = chart.GetDefaultFont()
}