Skip to content

Instantly share code, notes, and snippets.

@motoki317
Last active May 3, 2023 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motoki317/5637c7c1e70352fb6ada07585505ed5a to your computer and use it in GitHub Desktop.
Save motoki317/5637c7c1e70352fb6ada07585505ed5a to your computer and use it in GitHub Desktop.
figlet golang comparison
package main
import (
"fmt"
"io/fs"
"path/filepath"
"strings"
"github.com/lukesampson/figlet/figletlib"
"github.com/mbndr/figlet4go"
)
func main() {
const fontsDir = "fonts"
err := filepath.Walk(fontsDir, func(path string, info fs.FileInfo, err error) error {
if info.IsDir() {
return nil
}
relName, err := filepath.Rel(fontsDir, path)
if err != nil {
panic(err)
}
fmt.Println(relName, "lukesampson/figlet")
f, err := figletlib.GetFontByName(fontsDir, relName)
if err != nil {
panic(err)
}
figletlib.PrintMsg("Neo Showcase", f, 180, f.Settings(), "left")
fmt.Println(relName, "mbndr/figlet4go")
fig := figlet4go.NewAsciiRender()
err = fig.LoadFont(path)
if err != nil {
panic(err)
}
figOpt := figlet4go.NewRenderOptions()
figOpt.FontName = strings.TrimSuffix(relName, ".flf")
str, err := fig.RenderOpts("Neo Showcase", figOpt)
if err != nil {
panic(err)
}
fmt.Println(str)
return nil
})
if err != nil {
panic(err)
}
}
banner.flf lukesampson/figlet
# # #####
## # ###### #### # # # # #### # # #### ## #### ######
# # # # # # # # # # # # # # # # # # #
# # # ##### # # ##### ###### # # # # # # # #### #####
# # # # # # # # # # # # ## # # ###### # #
# ## # # # # # # # # # ## ## # # # # # # #
# # ###### #### ##### # # #### # # #### # # #### ######
banner.flf mbndr/figlet4go
# # #####
## # ###### #### # # # # #### # # #### ## #### ######
# # # # # # # # # # # # # # # # # # #
# # # ##### # # ##### ###### # # # # # # # #### #####
# # # # # # # # # # # # ## # # ###### # #
# ## # # # # # # # # # ## ## # # # # # # #
# # ###### #### ##### # # #### # # #### # # #### ######
big.flf lukesampson/figlet
_ _ _____ _
| \ | | / ____| |
| \| | ___ ___ | (___ | |__ _____ _____ __ _ ___ ___
| . ` |/ _ \/ _ \ \___ \| '_ \ / _ \ \ /\ / / __/ _` / __|/ _ \
| |\ | __/ (_) | ____) | | | | (_) \ V V / (_| (_| \__ \ __/
|_| \_|\___|\___/ |_____/|_| |_|\___/ \_/\_/ \___\__,_|___/\___|
big.flf mbndr/figlet4go
_ _ _____ _
| \ | | / ____| | |
| \| | ___ ___ | (___ | |__ ___ __ __ ___ __ _ ___ ___
| . ` | / _ \ / _ \ \___ \ | '_ \ / _ \ \ \ /\ / / / __| / _` | / __| / _ \
| |\ | | __/ | (_) | ____) | | | | | | (_) | \ V V / | (__ | (_| | \__ \ | __/
|_| \_| \___| \___/ |_____/ |_| |_| \___/ \_/\_/ \___| \__,_| |___/ \___|
block.flf lukesampson/figlet
_| _| _|_|_| _|
_|_| _| _|_| _|_| _| _|_|_| _|_| _| _| _| _|_|_| _|_|_| _|_|_| _|_|
_| _| _| _|_|_|_| _| _| _|_| _| _| _| _| _| _| _| _| _| _| _|_| _|_|_|_|
_| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _|
_| _| _|_|_| _|_| _|_|_| _| _| _|_| _| _| _|_|_| _|_|_| _|_|_| _|_|_|
block.flf mbndr/figlet4go
_| _| _|_|_| _|
_|_| _| _|_| _|_| _| _|_|_| _|_| _| _| _| _|_|_| _|_|_| _|_|_| _|_|
_| _| _| _|_|_|_| _| _| _|_| _| _| _| _| _| _| _| _| _| _| _|_| _|_|_|_|
_| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _|
_| _| _|_|_| _|_| _|_|_| _| _| _|_| _| _| _|_|_| _|_|_| _|_|_| _|_|_|
bubble.flf lukesampson/figlet
_ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( N | e | o ) ( S | h | o | w | c | a | s | e )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
bubble.flf mbndr/figlet4go
_ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( N ) ( e ) ( o ) ( S ) ( h ) ( o ) ( w ) ( c ) ( a ) ( s ) ( e )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
digital.flf lukesampson/figlet
+-+-+-+ +-+-+-+-+-+-+-+-+
|N|e|o| |S|h|o|w|c|a|s|e|
+-+-+-+ +-+-+-+-+-+-+-+-+
digital.flf mbndr/figlet4go
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
|N| |e| |o| |S| |h| |o| |w| |c| |a| |s| |e|
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
ivrit.flf lukesampson/figlet
_ ____ _ _
___ ___ __ _ _____ _____ | |__ / ___| ___ ___| \ | |
/ _ \/ __|/ _` |/ __\ \ /\ / / _ \| '_ \\___ \ / _ \ / _ \ \| |
| __/\__ \ (_| | (__ \ V V / (_) | | | |___) | | (_) | __/ |\ |
\___||___/\__,_|\___| \_/\_/ \___/|_| |_|____/ \___/ \___|_| \_|
ivrit.flf mbndr/figlet4go
_ _ ____ _
| \ | | ___ ___ / ___| | |__ ___ __ __ ___ __ _ ___ ___
| \| | / _ \ / _ \ \___ \ | '_ \ / _ \ \ \ /\ / / / __| / _` | / __| / _ \
| |\ | | __/ | (_) | ___) | | | | | | (_) | \ V V / | (__ | (_| | \__ \ | __/
|_| \_| \___| \___/ |____/ |_| |_| \___/ \_/\_/ \___| \__,_| |___/ \___|
larry3d.flf lukesampson/figlet
__ __ ____ __
/\ \/\ \ /\ _`\ /\ \
\ \ `\\ \ __ ___ \ \,\L\_\ \ \___ ___ __ __ __ ___ __ ____ __
\ \ , ` \ /'__`\ / __`\ \/_\__ \\ \ _ `\ / __`\/\ \/\ \/\ \ /'___\ /'__`\ /',__\ /'__`\
\ \ \`\ \/\ __//\ \L\ \ /\ \L\ \ \ \ \ \/\ \L\ \ \ \_/ \_/ \/\ \__//\ \L\.\_/\__, `\/\ __/
\ \_\ \_\ \____\ \____/ \ `\____\ \_\ \_\ \____/\ \___x___/'\ \____\ \__/.\_\/\____/\ \____\
\/_/\/_/\/____/\/___/ \/_____/\/_/\/_/\/___/ \/__//__/ \/____/\/__/\/_/\/___/ \/____/
larry3d.flf mbndr/figlet4go
__ __ ____ __
/\ \/\ \ /\ _`\ /\ \
\ \ `\\ \ __ ___ \ \,\L\_\ \ \ \___ ___ __ __ __ ___ __ ____ __
\ \ , ` \ /'__`\ / __`\ \/_\__ \ \ \ _ `\ / __`\ /\ \/\ \/\ \ /'___\ /'__`\ /',__\ /'__`\
\ \ \`\ \ /\ __/ /\ \L\ \ /\ \L\ \ \ \ \ \ \ /\ \L\ \\ \ \_/ \_/ \/\ \__/ /\ \L\.\_ /\__, `\/\ __/
\ \_\ \_\\ \____\\ \____/ \ `\____\ \ \_\ \_\\ \____/ \ \___x___/'\ \____\\ \__/.\_\\/\____/\ \____\
\/_/\/_/ \/____/ \/___/ \/_____/ \/_/\/_/ \/___/ \/__//__/ \/____/ \/__/\/_/ \/___/ \/____/
lean.flf lukesampson/figlet
_/ _/ _/_/_/ _/
_/_/ _/ _/_/ _/_/ _/ _/_/_/ _/_/ _/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/
_/ _/ _/ _/_/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/_/
_/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/
_/ _/ _/_/_/ _/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/_/
lean.flf mbndr/figlet4go
_/ _/ _/_/_/ _/
_/_/ _/ _/_/ _/_/ _/ _/_/_/ _/_/ _/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/
_/ _/ _/ _/_/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/_/
_/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/
_/ _/ _/_/_/ _/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/_/
mini.flf lukesampson/figlet
__
|\ | _ _ (_ |_ _ _ _. _ _
| \|(/_(_) __)| |(_)\/\/(_(_|_>(/_
mini.flf mbndr/figlet4go
__
|\ | _ _ (_ |_ _ _ _. _ _
| \| (/_ (_) __) | | (_) \/\/ (_ (_| _> (/_
mnemonic.flf lukesampson/figlet
Neo&SPShowcase
mnemonic.flf mbndr/figlet4go
Neo&SPShowcase
script.flf lukesampson/figlet
, _ _
/|/ \ () | |
| | _ __ /\ | | __ __ __, , _
| | |/ / \_ / \|/ \ / \_| | |_/ / | / \_|/
| |_/|__/\__/ /(__/| |_/\__/ \/ \/ \___/\_/|_/ \/ |__/
script.flf mbndr/figlet4go
, _ _
/|/ \ () | |
| | _ __ /\ | | __ __ __, , _
| | |/ / \_ / \ |/ \ / \_ | | |_ / / | / \_ |/
| |_/ |__/ \__/ /(__/ | |_/ \__/ \/ \/ \___/ \_/|_/ \/ |__/
shadow.flf lukesampson/figlet
\ | ___| |
\ | _ \ _ \ \___ \ __ \ _ \\ \ \ / __| _` | __| _ \
|\ | __/ ( | | | | | ( |\ \ \ / ( ( |\__ \ __/
_| \_|\___|\___/ _____/ _| |_|\___/ \_/\_/ \___|\__,_|____/\___|
shadow.flf mbndr/figlet4go
\ | ___| |
\ | _ \ _ \ \___ \ __ \ _ \ \ \ \ / __| _` | __| _ \
|\ | __/ ( | | | | | ( | \ \ \ / ( ( | \__ \ __/
_| \_| \___| \___/ _____/ _| |_| \___/ \_/\_/ \___| \__,_| ____/ \___|
slant.flf lukesampson/figlet
_ __ _____ __
/ | / /__ ____ / ___// /_ ____ _ ___________ _________
/ |/ / _ \/ __ \ \__ \/ __ \/ __ \ | /| / / ___/ __ `/ ___/ _ \
/ /| / __/ /_/ / ___/ / / / / /_/ / |/ |/ / /__/ /_/ (__ ) __/
/_/ |_/\___/\____/ /____/_/ /_/\____/|__/|__/\___/\__,_/____/\___/
slant.flf mbndr/figlet4go
_ __ _____ __
/ | / / ___ ____ / ___/ / /_ ____ _ __ _____ ____ _ _____ ___
/ |/ / / _ \ / __ \ \__ \ / __ \ / __ \| | /| / / / ___/ / __ `/ / ___/ / _ \
/ /| / / __// /_/ / ___/ / / / / // /_/ /| |/ |/ / / /__ / /_/ / (__ ) / __/
/_/ |_/ \___/ \____/ /____/ /_/ /_/ \____/ |__/|__/ \___/ \__,_/ /____/ \___/
small.flf lukesampson/figlet
_ _ ___ _
| \| |___ ___ / __| |_ _____ __ ____ __ _ ___ ___
| .` / -_) _ \ \__ \ ' \/ _ \ V V / _/ _` (_-</ -_)
|_|\_\___\___/ |___/_||_\___/\_/\_/\__\__,_/__/\___|
small.flf mbndr/figlet4go
_ _ ___ _
| \| | ___ ___ / __| | |_ ___ __ __ __ __ __ _ ___ ___
| .` | / -_) / _ \ \__ \ | ' \ / _ \ \ V V / / _| / _` | (_-< / -_)
|_|\_| \___| \___/ |___/ |_||_| \___/ \_/\_/ \__| \__,_| /__/ \___|
smscript.flf lukesampson/figlet
,
/|/\ _ _ () |) _ _ _, , _
| | |/ / \_ /\ |/\ / \_| | |_/ / | / \_|/
| |_/|_/\_/ /(_)| |/\_/ \/ \/ \__/\/|_/ \/ |_/
smscript.flf mbndr/figlet4go
,
/|/\ _ _ () |) _ _ _, , _
| | |/ / \_ /\ |/\ / \_ | | |_ / / | / \_ |/
| |_/ |_/ \_/ /(_) | |/ \_/ \/ \/ \__/ \/|_/ \/ |_/
smshadow.flf lukesampson/figlet
\ | __| |
. | -_) _ \ \__ \ \ _ \\ \ \ / _| _` |(_-< -_)
_|\_|\___|\___/ ____/_| _|\___/ \_/\_/\__|\__,_|___/\___|
smshadow.flf mbndr/figlet4go
\ | __| |
. | -_) _ \ \__ \ \ _ \ \ \ \ / _| _` | (_-< -_)
_|\_| \___| \___/ ____/ _| _| \___/ \_/\_/ \__| \__,_| ___/ \___|
smslant.flf lukesampson/figlet
_ __ ______
/ |/ /__ ___ / __/ / ___ _ _________ ____ ___
/ / -_) _ \ _\ \/ _ \/ _ \ |/|/ / __/ _ `(_-</ -_)
/_/|_/\__/\___/ /___/_//_/\___/__,__/\__/\_,_/___/\__/
smslant.flf mbndr/figlet4go
_ __ ____ __
/ |/ / ___ ___ / __/ / / ___ _ __ ____ ___ _ ___ ___
/ / / -_)/ _ \ _\ \ / _ \/ _ \| |/|/ // __// _ `/ (_-</ -_)
/_/|_/ \__/ \___/ /___/ /_//_/\___/|__,__/ \__/ \_,_/ /___/\__/
standard.flf lukesampson/figlet
_ _ ____ _
| \ | | ___ ___ / ___|| |__ _____ _____ __ _ ___ ___
| \| |/ _ \/ _ \ \___ \| '_ \ / _ \ \ /\ / / __/ _` / __|/ _ \
| |\ | __/ (_) | ___) | | | | (_) \ V V / (_| (_| \__ \ __/
|_| \_|\___|\___/ |____/|_| |_|\___/ \_/\_/ \___\__,_|___/\___|
standard.flf mbndr/figlet4go
_ _ ____ _
| \ | | ___ ___ / ___| | |__ ___ __ __ ___ __ _ ___ ___
| \| | / _ \ / _ \ \___ \ | '_ \ / _ \ \ \ /\ / / / __| / _` | / __| / _ \
| |\ | | __/ | (_) | ___) | | | | | | (_) | \ V V / | (__ | (_| | \__ \ | __/
|_| \_| \___| \___/ |____/ |_| |_| \___/ \_/\_/ \___| \__,_| |___/ \___|
term.flf lukesampson/figlet
Neo Showcase
term.flf mbndr/figlet4go
Neo Showcase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment