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.

Attachment: 0001-implement-disable-fontconfig-and-enable-mac-font.patch
Description: Binary data





_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to