goreport icon indicating copy to clipboard operation
goreport copied to clipboard

panic: not found font family

Open dxdns opened this issue 3 years ago • 2 comments

Good job, this package looks good, but i can't use it. Trying the simple example from the documentation. How to solve this problem?

dxdns avatar Sep 29 '22 17:09 dxdns

font setting is as follows

font1 := gr.FontMap{ FontName: "IPAex", FileName: "ttf//ipaexg.ttf", }

do you have file ipaexg.ttf in ttf directory? if you use Font other than IPAex, you should add your own font file and set in FontMap.

mikeshimura avatar Sep 29 '22 22:09 mikeshimura

yes, I downloaded the source from your repository and declared it as in the example. https://github.com/mikeshimura/goreport/blob/master/example/simple1.go just switched to main package to run

font setting is as follows

font1 := gr.FontMap{ FontName: "IPAex", FileName: "ttf//ipaexg.ttf", }

do you have file ipaexg.ttf in ttf directory? if you use Font other than IPAex, you should add your own font file and set in FontMap.

dxdns avatar Sep 30 '22 00:09 dxdns