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 for font layout parameters (kerning and "smooshing") #2

Open
broofa opened this issue Sep 17, 2023 · 2 comments
Open

Support for font layout parameters (kerning and "smooshing") #2

broofa opened this issue Sep 17, 2023 · 2 comments

Comments

@broofa
Copy link

broofa commented Sep 17, 2023

Per the FIFFont and FIGDriver standard, font authors may provide layout parameters to control kerning and "smushing". It appears these are not honored by this module.

Expected:
Over on https://www.askapache.com/online-tools/figlet-ascii/, if we render the string, "Testing" using the "small" font, we get this:

 _____       _   _           
|_   _|__ __| |_(_)_ _  __ _ 
  | |/ -_|_-<  _| | ' \/ _` |
  |_|\___/__/\__|_|_||_\__, |
                       |___/ 

Actual
If we render the same string in the same font with this package, we get this:

 _____              _     _
|_   _|  ___   ___ | |_  (_)  _ _    __ _
  | |   / -_) (_-< |  _| | | | ' \  / _` |
  |_|   \___| /__/  \__| |_| |_||_| \__, |
                                    |___/ 
@mbndr
Copy link
Owner

mbndr commented Sep 28, 2023

Hey there,
I wanted to implement this a while ago but atm have hardly time to work on my hobby projects because of life happening, feel free to implement it and open a pull request.
Kind regards

@broofa
Copy link
Author

broofa commented Sep 28, 2023

Alas, I'm in a similar boat.

As a breadcrumb for others who may land here, https://github.com/patorjk/figlet.js appears to have a pretty feature-complete implementation. It might act as a reference point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants