docs: add API reference for Figlet/figlet_format/print_figlet - #162
Open
mmaxjr wants to merge 1 commit into
Open
docs: add API reference for Figlet/figlet_format/print_figlet#162mmaxjr wants to merge 1 commit into
mmaxjr wants to merge 1 commit into
Conversation
The Quickstart only showed the two ways to render text but never explained the Figlet class's constructor options, where color belongs (print_figlet, not renderText), or the "foreground:background" format print_figlet expects for its colors argument. Add a short API reference section covering Figlet(), figlet_format(), print_figlet(), and the colors argument format, with a runnable example. Addresses pwaller#78 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pwaller
reviewed
Aug 2, 2026
| default to whatever the chosen font specifies; `width` sets the column | ||
| width used for wrapping/justification. | ||
| - `.renderText(text)` - returns a `FigletString` (a `str` subclass) with | ||
| the rendered ASCII art. This is where you print your text; **color is |
Owner
There was a problem hiding this comment.
"This is where you print your text" -> but renderText doesn't print?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #78
Problem
The Quickstart only shows two code snippets for rendering text but doesn't explain:
Figletclass's constructor options (font,direction,justify,width)renderText()handles it, but color is actually applied byprint_figlet(), notFiglet/figlet_format()colorsargument format expected byprint_figlet("foreground:background", color names vsR;G;B)As requested by the maintainer in the issue: keeping this small and doc-only.
Change
Added a short "API reference" section to the README covering:
Figlet(font, direction, justify, width)and its.renderText()/.getFonts()methodsfiglet_format(text, font, **kwargs)print_figlet(text, font, colors, **kwargs)and thecolorsformat, with a runnable exampleTesting
figlet_format,print_figletwith a color,COLOR_CODES,getFonts())