figlet4go

package module
v0.0.0-...-a5232ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 8 Imported by: 1

README

A port of figlet to golang.

This is a fork of https://github.com/weberhong/figlet4go


 /$$$$$$$$ /$$$$$$  /$$$$$$  /$$       /$$$$$$$$ /$$$$$$$$ /$$   /$$  /$$$$$$   /$$$$$$
| $$_____/|_  $$_/ /$$__  $$| $$      | $$_____/|__  $$__/| $$  | $$ /$$__  $$ /$$__  $$
| $$        | $$  | $$  \__/| $$      | $$         | $$   | $$  | $$| $$  \__/| $$  \ $$
| $$$$$     | $$  | $$ /$$$$| $$      | $$$$$      | $$   | $$$$$$$$| $$ /$$$$| $$  | $$
| $$__/     | $$  | $$|_  $$| $$      | $$__/      | $$   |_____  $$| $$|_  $$| $$  | $$
| $$        | $$  | $$  \ $$| $$      | $$         | $$         | $$| $$  \ $$| $$  | $$
| $$       /$$$$$$|  $$$$$$/| $$$$$$$$| $$$$$$$$   | $$         | $$|  $$$$$$/|  $$$$$$/
|__/      |______/ \______/ |________/|________/   |__/         |__/ \______/  \______/


bigmoney-ne font (default)

Prints out to console in "bigmoney-ne" font

Can include more external fonts to use.

Get more fonts from here & here

Usage

cd test/

go build

./test -str="hello world"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsciiRender

type AsciiRender struct {
	// contains filtered or unexported fields
}

func NewAsciiRender

func NewAsciiRender() *AsciiRender

func (*AsciiRender) LoadFont

func (this *AsciiRender) LoadFont(fontPath string) error

walk through the path, load all the *.flf font file

func (*AsciiRender) Render

func (this *AsciiRender) Render(asciiStr string) (string, error)

render with default options

func (*AsciiRender) RenderOpts

func (this *AsciiRender) RenderOpts(asciiStr string, opts *RenderOptions) (string, error)

render with options

type RenderOptions

type RenderOptions struct {
	FontName  string            // font name
	FontColor []color.Attribute // every ascii byte's color
}

func NewRenderOptions

func NewRenderOptions() *RenderOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL