From 2ed86a81d018bcf9d0105bf217a9c424aa42bf5e Mon Sep 17 00:00:00 2001 From: vicanso Date: Sat, 12 Nov 2022 10:48:24 +0800 Subject: [PATCH] fix: fix setting font family for table render --- chart_option.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chart_option.go b/chart_option.go index d4605a1..3c8ac4b 100644 --- a/chart_option.go +++ b/chart_option.go @@ -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() }