add a public interface to load bindata fonts in addition to the built in ones

This commit is contained in:
sqshq
2019-02-24 00:57:01 -05:00
parent 47ded4d170
commit 32e4469538
2 changed files with 21 additions and 4 deletions

View File

@@ -39,6 +39,11 @@ func (ar *AsciiRender) LoadFont(fontPath string) error {
return ar.fontMgr.loadFontList(fontPath)
}
// LoadBinDataFont loads provided bindata font string
func (ar *AsciiRender) LoadBinDataFont(fontStr string, fontName string) error {
return ar.fontMgr.loadBinDataFont(fontStr, fontName)
}
// Render renders a string with the default options
// Calls the RenderOpts method with a new RenderOptions object
func (ar *AsciiRender) Render(str string) (string, error) {