mirror of
https://github.com/KevinMidboe/motdGOi.git
synced 2025-10-29 17:50:24 +00:00
update
This commit is contained in:
@@ -27,14 +27,21 @@ func NewAsciiRender() *AsciiRender {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// walk through the path, load all the *.flf font file
|
||||||
func (this *AsciiRender) LoadFont(fontPath string) error {
|
func (this *AsciiRender) LoadFont(fontPath string) error {
|
||||||
return this.fontMgr.loadFont(fontPath)
|
return this.fontMgr.loadFont(fontPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// render with default options
|
||||||
func (this *AsciiRender) Render(asciiStr string) (string, error) {
|
func (this *AsciiRender) Render(asciiStr string) (string, error) {
|
||||||
return this.render(asciiStr, NewRenderOptions())
|
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) {
|
func (this *AsciiRender) convertChar(font *font, char rune) ([]string, error) {
|
||||||
|
|
||||||
if char < 0 || char > 127 {
|
if char < 0 || char > 127 {
|
||||||
|
|||||||
Reference in New Issue
Block a user