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

fix the width detection for nidoran ♀/♂ #63

Merged
merged 3 commits into from
Apr 4, 2024
Merged

Conversation

tmck-code
Copy link
Owner

@tmck-code tmck-code commented Apr 4, 2024

Context

The width calculation function for the pokemon names detects and ord value above 128 as double-width as the characters are always Japanese.

The exception to this rule is the male/female chars that appear in Nidoran names ♀/♂ which are single width. I just added a dumb constant to account for this as opposed to actually solving the width detection properly

before after
image image
image image

found this sweet bool map trick, as non-existent keys return the "0
value" for the value type in the map (i.e. false when bool)
@tmck-code tmck-code merged commit b71d67b into master Apr 4, 2024
1 check passed
@tmck-code tmck-code deleted the nidoran-width-fix branch April 4, 2024 12:48
@tmck-code tmck-code added bug Something isn't working aesthetic Related to how pokesay looks labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aesthetic Related to how pokesay looks bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant