You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This was a bug I observed when building something with druid, but since the traceback led to this library I'm filing it here as that is likely where the issue lies.
When rendering the character U+3000 IDEOGRAPHIC SPACE ( ) at the end of a line or by itself, the program panics and this a message similar to this one is printed (this specific example is for a string containing the character alone):
thread 'main' panicked at 'byte index 2 is not a char boundary; it is inside '\u{3000}' (bytes 0..3) of ` `', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/piet-cairo-0.3.0/src/text.rs:313:45
I'm not sure if this is a bug in piet, cairo, or what have you, but I would appreciate it being looked into.
The text was updated successfully, but these errors were encountered:
Quick look through the code reveals the likely culprit: count_trailing_whitespace in text/lines.rs is returning count which is a number of code points, but it's being interpreted as utf-8 code units. The count should be replaced by something like a sum of len_utf8.
Note: This was a bug I observed when building something with druid, but since the traceback led to this library I'm filing it here as that is likely where the issue lies.
When rendering the character U+3000 IDEOGRAPHIC SPACE ( ) at the end of a line or by itself, the program panics and this a message similar to this one is printed (this specific example is for a string containing the character alone):
I'm not sure if this is a bug in piet, cairo, or what have you, but I would appreciate it being looked into.
The text was updated successfully, but these errors were encountered: