pop-os / cosmic-text

Pure Rust multi-line text handling
https://pop-os.github.io/cosmic-text/cosmic_text/
Apache License 2.0
1.61k stars 103 forks source link

`editor-libcosmic` example crashes on changing font size #105

Closed ales-tsurko closed 1 year ago

ales-tsurko commented 1 year ago

I'm on macOS 13.2.1, with M1. When I run the example and open sample/hello.txt and trying to change the font size to Title 4 the application panics with:

thread 'main' panicked at 'attempt to subtract with overflow', src/shape.rs:711:37

The issue appears only on debug build.

nicoburns commented 1 year ago

I think this is fixed by https://github.com/pop-os/cosmic-text/pull/98

geieredgar commented 1 year ago

98 was superseded by #108, which is already merged, so the example shouldn't crash anymore.