Bug 48046

Summary: ttc<->ttf fallback is expected for CJK font list in GlobalParamsWin.cc
Product: poppler Reporter: suzuki toshiya <mpsuzuki>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: preliminary implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback

Description suzuki toshiya 2012-03-29 04:45:52 UTC
Since git dae29c6c201cd69cbf4f008de865cc19a36f29b3, there is a fallback
for missing CID-keyed fonts for CJK scripts. However, at present,
the fontlist in GlobalParamsWin.cc is designed to have fully specified
basename of the font file. Thus, if a platform has "msmincho.ttc" but
not "msmincho.ttf", the mechanism cannot find MS-Mincho to fallback.
The versions of Microsoft Windows sold in Japanese market have mainly
msmincho.ttc. To support both platforms having "have-msmincho.ttc-but-
no-msmincho.ttf" and "have-msmincho.ttf-but-no-msmincho.ttc", some
fallback (or listing multiple font files as "one of following candidates"
for a fallback item) is expected. I will try to improve.
Comment 1 suzuki toshiya 2012-04-01 10:40:19 UTC
Created attachment 59347 [details] [review]
preliminary implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback

Here is preliminary implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback.
This implementation is a reply to the post
http://lists.freedesktop.org/archives/poppler/2012-April/008949.html

In current framework of poppler, there is no distinction between
the expected fonts (the exist of the font is expected, but the lack of
the font is not irregular case) and the essential fonts (the lack of
the font may cause serious problem in the font substitution).
To reduce the warning to the lack of essential fonts, this patch
introduces "warnIfMissing" boolean flag to displayFontTable[].
Comment 2 suzuki toshiya 2012-04-02 05:20:06 UTC
Created attachment 59373 [details] [review]
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback

Tested and commented:
http://lists.freedesktop.org/archives/poppler/2012-April/008960.html
debug messages are removed.
Comment 3 suzuki toshiya 2012-04-02 05:30:33 UTC
Created attachment 59374 [details] [review]
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback

Previous patch is broken, here is corrected version.
Comment 4 suzuki toshiya 2012-04-02 05:36:55 UTC
Created attachment 59376 [details] [review]
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback
Comment 5 Albert Astals Cid 2012-04-06 06:23:03 UTC
Commited.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.