Bug 48046 - ttc<->ttf fallback is expected for CJK font list in GlobalParamsWin.cc
Summary: ttc<->ttf fallback is expected for CJK font list in GlobalParamsWin.cc
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 04:45 UTC by suzuki toshiya
Modified: 2012-04-06 06:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
preliminary implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback (13.35 KB, patch)
2012-04-01 10:40 UTC, suzuki toshiya
Details | Splinter Review
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback (13.08 KB, patch)
2012-04-02 05:20 UTC, suzuki toshiya
Details | Splinter Review
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback (613 bytes, patch)
2012-04-02 05:30 UTC, suzuki toshiya
Details | Splinter Review
revised implementation of "ttc"<=>"ttf", "pfb"<=>"pfa" fallback (13.08 KB, patch)
2012-04-02 05:36 UTC, suzuki toshiya
Details | Splinter Review

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.