Bug 695690

Summary: Embedded TrueType fonts without hmtx tables are rejected
Product: MuPDF Reporter: zeniko
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: info, ismail, robin.watts, tor.andersson
Priority: P4    
Version: master   
Hardware: PC   
OS: Windows 7   
URL: https://code.google.com/p/sumatrapdf/issues/detail?id=2778
Customer: Word Size: ---
Attachments: demonstration

Description zeniko 2014-11-18 13:45:36 UTC
Created attachment 11327 [details]
demonstration

The attached document fails to render as expected because MuPDF doesn't provide metrics of embedded fonts to FreeType when they're missing in the font itself. Ghostscript seems to be able to handle this case as expected.
Comment 1 zeniko 2014-11-25 04:34:52 UTC
We've got another report of this at https://code.google.com/p/sumatrapdf/issues/detail?id=2790 .
Comment 2 Aleksei Volkov 2015-02-03 03:09:20 UTC
In MS specification TTF in https://www.microsoft.com/typography/tt/ttf_spec/ttch02.doc clean write: table 'hmtx(horizontal metrics)' is required. And in https://www.microsoft.com/typography/tt/ttf_spec/ttch03.doc this required too.
But font without hmtx exist (mostly as embedded font in pdf).  	
Your example is indicative ( i have same pdf too) - on Windows they open without any problems but in linux - font is adsent.

I create bug in "FreeType Project" https://savannah.nongnu.org/bugs/index.php?44169

, but after (if it will be fixed) pdf anyway not opening correct.

With patch poppler from https://bugs.freedesktop.org/show_bug.cgi?id=88939
 pdf be opening correctly and font visible and readable.

(mostly clean - wrong codepage - view be in xpdf, another viewers sometime show blank gliph instead wrong)
Comment 3 Aleksei Volkov 2015-02-04 02:08:56 UTC
In freetype bug reopened from https://savannah.nongnu.org/bugs/?44169
to whishlist
https://savannah.nongnu.org/bugs/?44184
Comment 4 Aleksei Volkov 2015-02-07 09:32:44 UTC
Freetype commit for fix font load is http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=92359bd8851448ba40167affdf5663659a7b28f0

That commit can bee included in freetype 2.6.0 version.

With that commit all opened and showed OK in mupdf.
(In poppler that problem remains
https://bugs.freedesktop.org/show_bug.cgi?id=88939
)

That bug can bee closed.
Comment 5 Robin Watts 2015-03-25 17:33:27 UTC
We have adopted freetype 2.5.5, but this bugfix isn't in that release. We'll keep this bug around until the next release is available.
Comment 6 Ismail Donmez 2015-08-18 09:57:29 UTC
FWIW Freetype 2.6.0 is now available.
Comment 7 Tor Andersson 2015-10-19 02:34:19 UTC
Fixed in commit 70ed309e1c69ab8cd7e107f27d101f9a13416333
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Tue Oct 6 13:55:14 2015 +0200

    Update freetype submodule to version 2.6.1.