Skip to content

Conversation

@adamjack
Copy link

@adamjack adamjack commented Jun 10, 2023

More carefully inspect the font for "character width" for each character (rune) and do not crash if the font does not have a width for the character.

I was receiving this crash on line 28 when the string contained a single right apostrophe:

       panic: runtime error: index out of range [8217] with length 256

P.S. I am no expert but as I was looking around the utf8File seemed a reasonable place to look for more widths.

If it cannot find a width for the character it uses a placeholder, using underscore 'cos "wider seemed safer".

adamjack added 2 commits June 9, 2023 20:40
More careful insect the font for "character width" for each character (rune) and do not crash if the font does not have a width for the character.
Renaming
@slaboure
Copy link

Could this please be merged and released? Thank you!

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

Successfully merging this pull request may close these issues.

2 participants