-
Notifications
You must be signed in to change notification settings - Fork 4
Add mkvfontvalidator #82
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
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
==========================================
- Coverage 94.57% 94.10% -0.47%
==========================================
Files 35 42 +7
Lines 1640 1798 +158
==========================================
+ Hits 1551 1692 +141
- Misses 89 106 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
774c18e to
795cf3a
Compare
cf400f1 to
1c9a16f
Compare
d524ffe to
9681bf4
Compare
| if ( | ||
| attachment["content_type"] in MKVUtils.FONT_MIME_TYPE or | ||
| ( | ||
| attachment["content_type"] == "application/octet-stream" and | ||
| attachment["file_name"].lower().endswith((".ttf", ".otf", ".ttc", ".otc")) | ||
| ) | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- VLC check if the attachment mime type is
application/x-truetype-fontor if the file extension isttf,otforttc: https://code.videolan.org/videolan/vlc/-/blob/77b3f7cdeb61c7b0194ca029badafa4647b7d9fb/modules/codec/libass.c#L170-180 - MPV c is in this list or if the file extension is
ttf,otf,ttcorotc: https://github.com/mpv-player/mpv/blob/c438732b239bf4e7f3d574f8fcc141f92366018a/sub/sd_ass.c#L149-L169 - The mastroska spec check if the attachment mime type is in this list:
- application/x-truetype-font
- application/x-font-ttf
- application/vnd.ms-opentype
- application/font-sfnt
- application/font-woff (ignore because we don't support these)
- font/ttf
- font/otf
- font/sfnt
- font/woff (ignore because we don't support these)
- font/collection
or if the attachment mime type is application/octet-stream and the file extension is ttf, otf, ttc or otc.
- MPC-HC only check the attachment mime type: https://github.com/clsid2/mpc-hc/blob/fb9f5dd48969d81e9ad9f80048258b0c4ad8094d/src/Subtitles/LibassContext.cpp#L841-L852
So in brief, no one does the same things.
I decided to respect the spec + to add application/x-font-otf which isn't in the spec, but will be one day
82c9601 to
17b75c7
Compare
17b75c7 to
2bbab28
Compare
Close #49 Breaking changes: - Mkvpropedit.delete_fonts_of_mkv have been renamed Mkvpropedit.delete_all_fonts_of_mkv - Mkvpropedit.path doesn't exist anymore. Now, use MKVUtils.MKVTOOLNIX_FOLDER to set the folder of mkvtoolnix. - Mkvpropedit class have been renamed MKVPropedit.
2bbab28 to
ec656db
Compare
Close #49
Breaking changes: