Add mkvfontvalidator - #82
Merged
Merged
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:
|
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
3 times, most recently
from
October 12, 2025 19:41
774c18e to
795cf3a
Compare
moi15moi
commented
Oct 12, 2025
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
3 times, most recently
from
October 13, 2025 01:31
cf400f1 to
1c9a16f
Compare
moi15moi
commented
Oct 13, 2025
moi15moi
commented
Oct 13, 2025
moi15moi
commented
Oct 13, 2025
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
3 times, most recently
from
October 13, 2025 14:45
d524ffe to
9681bf4
Compare
moi15moi
commented
Oct 14, 2025
moi15moi
commented
Oct 14, 2025
Comment on lines
+79
to
+85
| 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")) | ||
| ) | ||
| ): |
Owner
Author
There was a problem hiding this comment.
- 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
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
2 times, most recently
from
October 15, 2025 00:34
82c9601 to
17b75c7
Compare
moi15moi
commented
Oct 15, 2025
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
from
October 16, 2025 23:14
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.
moi15moi
force-pushed
the
Add-mkvfontvalidator
branch
from
October 16, 2025 23:21
2bbab28 to
ec656db
Compare
moi15moi
marked this pull request as ready for review
October 17, 2025 00:02
This file contains hidden or 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
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.
Close #49
Breaking changes: