From 52ab08f667555d81009b3309735977cbc1258981 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 7 Feb 2015 18:22:15 +0100 Subject: [PATCH] Created Embedded fonts dont work (markdown) --- Embedded-fonts-dont-work.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Embedded-fonts-dont-work.md diff --git a/Embedded-fonts-dont-work.md b/Embedded-fonts-dont-work.md new file mode 100644 index 0000000..d71fa5c --- /dev/null +++ b/Embedded-fonts-dont-work.md @@ -0,0 +1,27 @@ +# Players don't use embedded fonts for subtitle playack + +## The problem + +I've attached a TrueType font for use in my subtitles. It is referred to from the subtitles correctly, but the player doesn't show it anymore. This used to work with prior versions of MKVToolNix. + +## The answer + +This can occur if a MIME type for a font is used that the player doesn't support. mkvmerge used to do this a while ago but doesn't anymore, so the problem should not occur. + +Some people have noticed that their players (both hardware and software ones) might not use TrueType fonts attached to Matroska for subtitle playback while they used to do it earlier. Here's why. + +Matroska files can contain attachments. Each attachment is identified by both a name and a UID. Its type, however, is specified via a [MIME type](http://www.iana.org/assignments/media-types/index.html). + +Each time the user adds an attachment to mmg the MIME type will be detected automatically. While the user can override this choice easily most don't bother. + +The system used for automatic MIME type recognition is the well-known `libmagic` library which is part of the [`file`](http://darwinsys.com/file/) utility. It is the standard library for MIME type detection on non-Unix systems and is also used in a wide variety of Windows programs. + +A couple of versions ago `libmagic` returned a different MIME type than it does today. Earlier it was `application/x-truetype-font`, today it is `application/x-font-ttf`. Most Linux users noticed this change some time ago while Windows users didn't. This is due to me not updating the `libmagic` library I was using for creating the Windows build of MKVToolNix. + +See [this mailing list post](http://mx.gw.com/pipermail/file/2009/000400.html) for the rationale behind the change. + +Starting with v5.1.0 I did finally update said library for the Windows builds as well. If a player doesn't recognize `application/x-font-ttf` as a MIME type for TrueType fonts then it will most likely not use the attached font for playback. + +As this causes major headaches for a lot of people I have added a manual mapping in release v5.2.0 so that the older MIME tpe `application/x-truetype-font` is used even if `libmagic` returns `application/x-font-ttf`. + +Categories: [playback](Category-playback)