[poppler] [patch] support Mac OS X fonts without fontconfig

Albert Astals Cid aacid at kde.org
Fri Jul 31 14:53:41 PDT 2009

Hi, sorry for the late reply

A Diumenge, 12 de juliol de 2009, Jonathan Kew va escriure:
> In order to use poppler on OS X without depending on X11 or
> fontconfig, which is not a standard component on the Mac, I have
> implemented a configure option
>    --disable-fontconfig
> which removes the dependency (just like when building on Windows and
> using the Windows font support).
> By itself, this would mean that PDFs with non-embedded fonts cannot be
> rendered by such a Mac build; so to deal with this, I have added a new
> option
>    --enable-mac-fonts
> to locate platform fonts via Apple system APIs. Currently, the
> implementation is a bit ugly, because the standard fonts are not
> provided in .ttf form on the Mac, but packaged as families into .dfont
> files, which the poppler code doesn't directly support. So to handle
> these, the required face is extracted into a temporary .ttf file,
> which can then be handled by FoFiTrueType.
> A neater implementation would involve finding the file path and face
> index using FT_GetFilePath_From_Mac_ATS_Name, then passing these
> through to FT_New_Face when it needs to create the Freetype face, but
> this looks like it would require more invasive changes to deal with
> the fofi code that wants to read the .ttf font file directly; that
> won't work with .dfont-packaged fonts, but would have to be modified
> to read font tables via Freetype APIs or something along those lines.
> The attached patch is based on current git head.

So comments:
 * Is there any possibility of me convincing you to also add that switches to 
the CMake build system? If not i or someone else will have to do delaying the 
commiting of the patch
 * The license on mac-framework.m4 seems a bit weird to me, but i think we can 
live with it
 * You can not include config.h in GlobalParams.h, use the poppler-config.h 

Overall it looks okaish from the "i don't use Mac so i don't care much" POV


More information about the poppler mailing list