Tietokilta / laskugeneraattori

MIT License
1 stars 2 forks source link

fix: prevent attachment filename from overflowing the table cell #34

Closed lajp closed 1 month ago

lajp commented 1 month ago

The filenames generally don't contain breakpoints and therefore if a filename is longer than (1/3) of the page width it will overflow and be displayed on top of the description.

This PR fixes the issue by inserting zero-width spaces between every character in the filename.

Before

image

After

image

PetrusAsikainen commented 1 month ago

I guess it works 😅 but I wonder if Typst rendering (s|w)ould have a better way to break words

https://github.com/typst/typst/issues/674 is open, so should :D

lajp commented 1 month ago

I asked the folks on the Typst Discord server and this is the solution I was given. Couldn't figure out a better way myself either.