[texworks] Call for Help: Mac builds

Jonathan Kew jfkthame at googlemail.com
Sat Feb 5 19:09:50 CET 2011

I haven't had the opportunity to do a fresh build recently with all the latest versions of libraries, etc. (hence this thread!), but I thought I should make a comment or two that might be useful to people looking into this.

First, I feel quite strongly that for the Mac version of texworks, it is important to build poppler *without* fontconfig. This may require a configure-time option, and may even require patching the source and/or the build files. I did this several versions ago (and even sent a patch to the poppler mailing list) -- I think the patches I used can be found in the texworks source tree -- but I'm not sure whether this will work out-of-the-box with current poppler, as I don't think the main poppler developers take much interest in the Mac.

I think you'll find that any poppler "port" that comes from MacPorts or Fink will *not* be suitable, as it will be linked against fontconfig; those projects are oriented more towards X11-based software and a "standard" *nix-ish environment than native Mac applications.

You may also need to patch poppler (again, I think there's a patch in the texworks sources, but it may be outdated) to enable it to use installed Mac fonts when necessary to render PDFs that do not have all the "base 13" fonts embedded.

And finally, IIRC there was also a patch to allow the application to specify the location of the poppler-data directory, needed for display of some CJK fonts; for texworks, this should be included within the application package, so that it does not need to be installed separately.

The other issue with all the libraries -- poppler, freetype (which poppler requires), and hunspell -- is that you'll need to do universal builds; that may not be the default behavior of their build systems, so passing appropriate configure options or setting environment variables may be needed.

If you do try using MacPorts or Fink tools to help in the build, it's essential that you verify (with "otool -L") that the final binary does NOT depend on the fontconfig library; if that shows up then poppler has not been built correctly, and the TeXworks app will probably end up polluting the user's Fonts folder(s) with fontconfig cache files.

(Aside: the same is true for the Windows build -- poppler should be built to use the Windows font APIs, and not the fontconfig library. There's a configure option, and code in GlobalParamsWin.cc in the poppler sources to support this, or at least there used to be; again, I haven't tried building the latest versions.)


More information about the texworks mailing list