-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backports from Cyberbeing + negative Encoding #46
Merged
pinterf
merged 8 commits into
pinterf:xy_sub_filter_rc5
from
TheOneric:pinterf_backport+encoding
Dec 13, 2023
Merged
Backports from Cyberbeing + negative Encoding #46
pinterf
merged 8 commits into
pinterf:xy_sub_filter_rc5
from
TheOneric:pinterf_backport+encoding
Dec 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The GUI settings only define the default behaviour for files without LayoutRes{X,Y} headers. Backported from: Cyberbeing/xy-VSFilter@1ca5e4b
Backported from: Cyberbeing/xy-VSFilter@532b756
Backported from: Cyberbeing/xy-VSFilter@04afcbd
Backported from: Cyberbeing/xy-VSFilter@0d64ad7 (2014-10-19)
Similar to the preceeding commit backported from Cyberbeing/xy-VSFilter, let’s adjust the name so users can distinguish Cyberbeing/xy-VSFilter from pinterf/xy-VSFilter if say builds from both are placed into Aegisub’s csri directory. Latest releases are numbered 3.2.x.x, so update the version advertised in CSRI to match.
Back in 2012 libass added a custom Encoding=-1 extension to enable automatic BiDi base direction instead of the usual LTR default. The assumption/hope presumably was that since all valid font encodings are positive VSFilter would just gracefully ignore them. However, this is unfortuantely not the case. When passed to GDI the charSet is cast to a byte and will wrap around to a valid value, severely restricting which fonts can be used. Searching through a large pile of subtitles the only hits for negative values in the Encoding field were from generally corrupted files. It thus appears so far fortunately nobody used the extension in released fiels (only transient conversion from other formats during playback) and also nobody is relying on the wraparound in VSFilter. To minimise future problems treat all negative Encodings as the default charset. This matches how libass does fontselection for -1 albeit it doesn't reproduce the BiDi base direction. It also conveniently carves out the [-2, INT_MIN] range for potential future extensions common to VSFilters and libass, e.g. Encoding=-2 for a RTL base direction (which should be easier to implement in VSFilter than auto base direction)
Great work, thanks. Then these changes can safely be merged and this PR will not get further modifications? |
Yes, no further modifications to the PR are planned and everything should be good to merge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports recently merged changes from Cyberbeing/xy-VSFilter and the CSRI name change mentioned in #38:
@Masaiki: Cyberbeing/xy-VSFilter#20 and Cyberbeing/xy-VSFilter#22 di not apply cleanly. The former has a large swath of conflicts, for the latter exactly the edited section changed between Cyberbeing and pinterf. Not only were comments moved, but one version uses plain
Div
the otherNormalizedDiv
versions in their respective calculations. Are those patches also needed in pinterf/xy-VSFilter and if yes, can you take a look?I omitted the not-yet-merged VapourSynth PR by Masaiki due to having no experience with the code they touch Cyberbeing/xy-VSFilter#24
@pinterf: with this and potentially the remaining PRs by Masaiki merged, it should presumably be in good shape for a new release such that people can actually use
LayoutRes
etc