Fix for incorrect .ttf MIME type
authorRobert Błaut <listy@blaut.biz>
Wed, 15 Jan 2014 21:49:00 +0000 (22:49 +0100)
committerRobert Błaut <listy@blaut.biz>
Wed, 15 Jan 2014 21:49:00 +0000 (22:49 +0100)
librarian/epub.py

index 2da6b31..c92de3c 100644 (file)
@@ -549,7 +549,7 @@ def transform(wldoc, verbose=False,
                 subprocess.check_call(optimizer_call, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             zip.write(os.path.join(tmpdir, fname), os.path.join('OPS', fname))
             manifest.append(etree.fromstring(
                 subprocess.check_call(optimizer_call, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             zip.write(os.path.join(tmpdir, fname), os.path.join('OPS', fname))
             manifest.append(etree.fromstring(
-                '<item id="%s" href="%s" media-type="font/ttf" />' % (fname, fname)))
+                '<item id="%s" href="%s" media-type="application/x-font-truetype" />' % (fname, fname)))
         rmtree(tmpdir)
         if cwd is not None:
             os.chdir(cwd)
         rmtree(tmpdir)
         if cwd is not None:
             os.chdir(cwd)