Open qgustavor opened 3 years ago
Sounds like a reasonable feature. I'll look into it, but it will probably take me a few days before I get to it.
I tried implementing it myself but as I have zero experience with C I'm sure I made a mess. A snippet:
// inside emitf
r = emit( "%s ", ftoa( buf, config.ass_fprec, v.x * pow(2, config.ass_scale - 1) ) );
r = emit( "%s", ftoa( buf, config.ass_fprec, v.y * pow(2, config.ass_scale - 1) ) );
I will update svg2ass-gui with this feature as an experimental feature then, when you implement it, I will update it again.
Edit: it's already implemented in the website.
I added two experimental options: -p n only affects the \p# tag -s n additionally scales up the coordinates by 2^(n-1) This is not thoroughly tested, please give it a try.
Seems it works fine. For some reason when I was testing Aegisub was rendering \p3
and \p4
drawings larger, but when I changed subtitles provider it returned to normal. I think that happened because I used an old Aegisub build, when I tried it again with a new build (from a fork) it worked fine.
I already updated the GUI with the new code. Your code was way better than mine: using 1U << (config.ass_scale_exp - 1)
and vec_scal
is way cleaner, easier to understand, safer and performant.
Good to hear it works in general. I wonder about the Aegisub build. Do you happen to have some version numbers to share, working vs. not working?
Aegisub r8942 is the one that had issues. Aegisub 9212 Daydream Cafe was the one that worked fine.
Thank you for the info. For the record: r8982 (to be exact commit 293673fef in the official sources plus an unrelated pulseaudio patch) works fine on Linux.
One of the features of svg2ssa is allowing changing the size of coordinate system to improve precision. This feature is documented here changes
\p1
to\p#
where # is a integer.Checking the current code scaling mode is fixed at
\p1
. From my experiments seems implementing such a feature is just a matter of adding a setting for it, changing the line linked above to return\p#
and scaling values as needed (positionsand stroke widths).