mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

Fixes #143 There were multiple issues with the previous calculation. First, we expected dash width COULD be negative and protected against it, but our dash width calculation type was unsigned! With the proper font metrics, this led to an underflow safey panic. Second, as part of the dash width calculation, we are tryign to downstep the size of the gaps so we can try to fit dashes within a cell. But we were not using those adjusted gap sizes. With the proper font metrics, this could lead to an assertion failure seen in #143. This fixes the calculations. They produce the same numbers, but do so in a more Zig-idiomatic way while fixing the above two issues.