Closed flossy83 closed 11 months ago
It appears the issue is that SubTitle(align=5) doesn't try to align the whole string vertically whereas Text(align=5) does.
Perhaps it could be argued that SubTitle should behave like Text instead of vice versa, if the intention of align=5 is to align the entire string in the center of the screen. Although the documentation says "Note there is no Y-center alignment setting".
https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/subtitle.html
Text is a totally different filter from the existing SubTitle and was written to somehow mimic some SubTitle functionality on Linux, where no Windows GDI exists. But yes, it should work in a consistent way. As for the documentation, I don't get it either: "Note there is no Y-center alignment setting.". (Subtitle's documentation must be rewritten, there are many additions and fixes there)
edit: The multiline (lsp is defined) vertical alignment in Text was intended to do a proper and fine vertical alignment: it would center the whole text block vertically. E.g. for 3 lines it would position at the 1.5 line position. But due to rounding issues it did not perform this task properly. In this regard it is (and was) different from SubTitle, which seems to ignore the multilineness of the text and calculates the vertical center position as if it was a one line text. Second, third, etc.. lines are displayed below the center positioned first line.
Check fix ver: https://forum.doom9.org/showthread.php?p=1993152#post1993152
I'm closing this as the feature was partly fixed and the rest is (hopefully) consistently implemented.
There is a small issue which is making it difficult for me to align my debug text vertically on screen due to some quirk of Text(align=5) where if I concatenate another "\n" to the string being displayed, it shifts the whole string up by 1 line.
SubTitle() doesn't exhibit this behaviour, but is too CPU intensive for my needs. Example below:
The workaround I'm using currently is to add another "\n" to the beginning of line 1, but I have no idea why that works.