[poppler] [PATCH] per-collection fallback for missing CID-keyed fonts on Win32

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Fri Apr 6 08:55:43 PDT 2012

On Fri, 06 Apr 2012 16:29:59 +0200
Albert Astals Cid <aacid at kde.org> wrote:
>El Divendres, 6 d'abril de 2012, a les 22:59:17, mpsuzuki at hiroshima-u.ac.jp va 
>> ( https://bugs.freedesktop.org/show_bug.cgi?id=48040 ),
>> is inconsistent with the rasterization result of pdftoppm.
>> The "pdffonts -subst" on Windows is like following.

>> It looks like as if Courier and Times-Roman will be substituted
>> by Arial. It is unwanted result. But, as you can find by the pictures
>> (pdftoppm) on https://bugs.freedesktop.org/show_bug.cgi?id=48040 ,
>> Courier is substituted by Courier New, Times-Roman is substituted
>> by Timew New Roman (it is wanted result). I think pdffonts is
>> expected to return the font substititions that pdftoppm will do.
>Of course, what's the point otherwise?

I see. Please wait for my patch after 0.20.

>> >External configuration file to control font substitution is something we do
>> >*not* want.
>> Oh, thank you again for the clarification. I remember your
>> attitude about external configuration file when we discussed
>> about the hint control - I know you don't want it, and I will
>> follow your decision. But, the patch by Thomas for GlobalParamsWin.cc
>> includes a feature to use external font substitution mapping
>> table "cidfmap". It should be removed, or should be kept?
>That's true, I still can't believe Windows API does not have something similar 
>to fontconfig. Maybe we can lift/relax the no external font stuff for Windows?
>Anyone else has other opinions on that?

Now I'm doing some experiments to crawl all installed fonts on
Windows and configure the font database dynamically.
The automatic configuration cannot be the best solution for
the people who want to make a fine-tuned configuration file by
themselves, but I think it could be better than the configuration
file generated by Ghostscript automatically. Thus, I wish if
you postpone the enabling of cidfmap feature. Once it is enabled,
poppler will be expected to keep the backward compatibility.

One of the remarkable difference between fontconfig and Windows
GDI is that Windows GDI is not designed to make the client to
access the font file directly (as its basic usage).

Current GlobalParamsWin.cc makes a list of installed fonts by
checking the entries in the system registry, but it just gives
the facename of the font and the font file pathname. Other
informations, like, PostScript name, supported scripts, character
codepoint coverage, weight, etc etc are missing.

If we open all font files (listed by the registry) by FreeType2
and check PostScript names, their weights, theire character code
coverage, OpenType script tags, etc etc, something like fontconfig
DB can be made. But it is too heavy, because it is something like
a case that all applications kick fc-cache in everytime.
Although the memory consumation is not so huge, the huge disk I/O
is caused. Now I'm trying to make similar database by GDI functions,
because GDI may have some cache of font properties and retrieval
of them is expected to be light wait procedure.


More information about the poppler mailing list