Code cleaning, update Readme

This commit is contained in:
probandula
2016-10-26 18:32:11 +02:00
parent 3f7f13785f
commit eef61fca27
9 changed files with 1165 additions and 66 deletions

View File

@@ -1,5 +1,27 @@
// Print a string with another font
package main
import (
"fmt"
"github.com/probandula/figlet4go"
)
const str string = "otherfont"
func main() {
}
ascii := figlet4go.NewAsciiRender()
// Add the font name to the options
options := figlet4go.NewRenderOptions()
// This font is included so you don't have to specify a path with 'ascii.LoadFont(/path/to/fonts/)'
options.FontName = "larry3d"
// Use the RenderOpts instead of the Render method
renderStr, err := ascii.RenderOpts(str, options)
if err != nil {
panic(err)
}
fmt.Print(renderStr)
}