-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow users to define a variable number of lines in font_config (#59)
* Parser now correctly breaks at 3 lines * Change maxLineWidth for RSE fonts * Updated originalMaxLineLength to stop cutoffs https://i.imgur.com/URmIl4u.png * Create a modular version that takes a number of lines from font_config.json and formats text accordingly * Simplified block to use two statements as suggested in #59 (comment) * renamed isMaxLineOrGreater to shouldUseLineFeed #59 (comment) * renamed lineNumber to curLineNum #59 (comment) * zero-indexed curLineNum #59 (comment) * Added numLines, maxLineLength, fontId as named parameters * renamed numLines * Added maxLineLength as unnamed paramter * Added cursorOverlapWidth as a named parameter * Fixed typo with cursorOverlapWidth Added support for unnamed fontId parameter * Reset curLineNum to zero when the user enters their own paragraph break https://github.com/huderlem/poryscript/pull/59\#discussion_r1436539600 * Changed isFirstLine to use bang operator instead of checking for false https://github.com/huderlem/poryscript/pull/59\#discussion_r1436539772 * Removed redundant parenthesis in shouldUseLineFeed https://github.com/huderlem/poryscript/pull/59\#discussion_r1436539985 * Created setEmptyParametersToDefault to warn users and handle unset values #59 (comment) #59 (comment) * Reworked high-level logic and created isNamedParameter, handleUnnamedParameter, handleNamedParameter #59 (comment) * Created reportDuplicateParameterError #59 (comment) * Fixup format() named parameters parsing and tests * Update README * Improve format() error message and disallow duplicated named parameters --------- Co-authored-by: Marcus Huderle <huderlem@gmail.com>
- Loading branch information
Showing
6 changed files
with
249 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.