05-27-2025, 08:20 PM
Hello again,
It did take quite some time to get it to a working state, but Jean-François Moine (Jef) added a working version of the fit2box module in abc2svg!
If you update abc2svg to the latest version in fossil, you should get it as well.
No implementation needed on your part, it should all be done in the module fit2box-1.js.
Adding a "%%fit2box * *" directive to the file will get the values of %%pagewidth and %%pageheight, and will produce a score that maximizes its size to fit in the box.
I include here a link to the discussion thread with Jef https://groups.io/g/abcusers/topic/pages...054?page=2
It might contain useful information for debugging if you run into issues while testing the feature, I had one where %%fit2box didn't work if the directive was stated before the %%pageheight directive, but I don't think you'll run into this issue as your setup is different.
It did take quite some time to get it to a working state, but Jean-François Moine (Jef) added a working version of the fit2box module in abc2svg!
If you update abc2svg to the latest version in fossil, you should get it as well.
No implementation needed on your part, it should all be done in the module fit2box-1.js.
Adding a "%%fit2box * *" directive to the file will get the values of %%pagewidth and %%pageheight, and will produce a score that maximizes its size to fit in the box.
I include here a link to the discussion thread with Jef https://groups.io/g/abcusers/topic/pages...054?page=2
It might contain useful information for debugging if you run into issues while testing the feature, I had one where %%fit2box didn't work if the directive was stated before the %%pageheight directive, but I don't think you'll run into this issue as your setup is different.