ab-glyph
ab-glyph copied to clipboard
index out of bounds: the len is 4 but the index is 5
I encounter this error:
thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 5', /home/yatekii/.cargo/registry/src/github.com-1ecc6299db9ec823/ab_glyph_rasterizer-0.1.5/src/raster.rs:128:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
when running. I feel like this should not happen or if there are limitations, they should be outlined in the help text.
This looks like a bug, can you provide your font file / steps to reproduce?
Uff, that is happening incide iced
. It happens when you insert a very high number (1 billion upwards I think) for the position of your text. It happens for every font I tried. Including the default one. I can upload the repo of my app lateron.
I think maybe it's a conversion issue with large numbers, not sure.
Interesting could be a float issue then. We could probably avoid using the full position during rasterization, we only need the subpixel fractional offset :thinking:.
But I'll need to reproduce the panic itself & write a test case to properly fix the scenario.
If you could provide a short example iced app that panicked I should be able to trace the cause.
I'll close this as it was never reproduced, please reopen with repro steps