From e50906e50a365c104a313a76bdb363c49a8e2b57 Mon Sep 17 00:00:00 2001 From: honggengwei Date: Thu, 16 Oct 2014 13:08:05 +0800 Subject: [PATCH] update --- figlet/render.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/figlet/render.go b/figlet/render.go index cdfe55b..a647b3f 100644 --- a/figlet/render.go +++ b/figlet/render.go @@ -27,14 +27,21 @@ func NewAsciiRender() *AsciiRender { return this } +// walk through the path, load all the *.flf font file func (this *AsciiRender) LoadFont(fontPath string) error { return this.fontMgr.loadFont(fontPath) } +// render with default options func (this *AsciiRender) Render(asciiStr string) (string, error) { return this.render(asciiStr, NewRenderOptions()) } +// render with options +func (this *AsciiRender) RenderOpts(asciiStr string, opts *RenderOptions) (string, error) { + return this.render(asciiStr, opts) +} + func (this *AsciiRender) convertChar(font *font, char rune) ([]string, error) { if char < 0 || char > 127 {