Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FIGlet layoutmodes and smushing #1448

Open
OliverRC opened this issue Feb 2, 2024 · 0 comments
Open

Support FIGlet layoutmodes and smushing #1448

OliverRC opened this issue Feb 2, 2024 · 0 comments

Comments

@OliverRC
Copy link

OliverRC commented Feb 2, 2024

It looks like FigletText currently supports a rudimentary implementation of the FIGlet renderer.
A missing feature would be that of the layoutmodes / smushing.

These must "smush" the text together for a slightly more attractive aesthetic.
Text examples using "standard.flf" for example look like this:

    _    ____   ____ ____  _____ _____ ____ 
   / \  | __ ) / ___|  _ \| ____|  ___/ ___|
  / _ \ |  _ \| |   | | | |  _| | |_ | |  _ 
 / ___ \| |_) | |___| |_| | |___|  _|| |_| |
/_/   \_\____/ \____|____/|_____|_|   \____|
                                            

       _             _       __       
  __ _| |__   ___ __| | ___ / _| __ _ 
 / _` | '_ \ / __/ _` |/ _ \ |_ / _` |
| (_| | |_) | (_| (_| |  __/  _| (_| |
 \__,_|_.__/ \___\__,_|\___|_|  \__, |
                                |___/ 

 _ ____  _____ _  _  ____   __ _____ 
/ |___ \|___ /| || || ___| / /|___  |
| | __) | |_ \| || ||___ \| '_ \ / / 
| |/ __/ ___) |__   _|__) | (_) / /  
|_|_____|____/   |_||____/ \___/_/

However, they land up looking like this

  ____                   _             _      ____                                               _                 
 |  _ \    ___    _ __  | |_    __ _  | |    / ___|   ___    _ __ ___    _ __     __ _   _ __   (_)   ___    _ __  
 | |_) |  / _ \  | '__| | __|  / _` | | |   | |      / _ \  | '_ ` _ \  | '_ \   / _` | | '_ \  | |  / _ \  | '_ \ 
 |  __/  | (_) | | |    | |_  | (_| | | |   | |___  | (_) | | | | | | | | |_) | | (_| | | | | | | | | (_) | | | | |
 |_|      \___/  |_|     \__|  \__,_| |_|    \____|  \___/  |_| |_| |_| | .__/   \__,_| |_| |_| |_|  \___/  |_| |_|
                                                                        |_|                                        

When rendered using:

var font = FigletFont.Load("standard.flf");
AnsiConsole.Write(new FigletText(font, "Portal Companion")

The man page describes:
http://www.figlet.org/figlet-man.html

-m layoutmode
Specifies an explicit layoutmode between 1 and 63. Smushmodes
are explained in figfont.txt, which also provides complete
information on the format of a FIGlet font.

From details of the layout modes can be found in the figlet.txt
https://github.com/cmatsuoka/figlet/blob/master/figfont.txt#L167


Please upvote 👍 this issue if you are interested in it.

@OliverRC OliverRC changed the title Support FIGlet layoutmodes / smushing Support FIGlet layoutmodes and smushing Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕑
Development

No branches or pull requests

1 participant