[texworks] Mac OS TeXworks + fontconfig

Charlie Sharpsteen chuck at sharpsteen.net
Sat May 28 18:12:02 CEST 2011


On Sat, May 28, 2011 at 1:11 AM, Stefan Löffler <st.loeffler at gmail.com> wrote:
> So, I see 3 possibilities:
> 1) The Symbol and ZapfDingbats fonts are not found by
> ATSFontFindFromPostScriptName
> 2) They are only available in OpenType/CFF or other non-ttf formats and are
> thus not handled
> 3) Some other problem
>
> I've attached a symbol/zapf only version of the testcase so it's easier for
> you to debug (not so many other fonts that are loaded). I'd suggest adding
> some debug output lines to poppler (poppler/GlobalParamsMac.cc, the file the
> patch modifies) to check if possibilities 1 or 2 above apply.

Allright, I patched some debugging output int GlobalParamsMac.cc:

    https://github.com/Sharpie/TeXworks/blob/poppler-font-handling/lib-patches/poppler-debug.patch

The patch prints out the value of `fontName` which is sent into the
font loading function and the value of `fontPath` which is the font
file that will be loaded.  This is the resulting output when `loading
base-14-fonts.pdf`:


grendel:build sharpie$ ./TeXworks.app/Contents/MacOS/TeXworks
QFileSystemWatcher::removePaths: list is empty
Lookup font: Times-Roman found in file: /System/Library/Fonts/Times.dfont
Lookup font: Times-Bold found in file: /System/Library/Fonts/Times.dfont
Lookup font: Times-Italic found in file: /System/Library/Fonts/Times.dfont
Lookup font: Times-BoldItalic found in file: /System/Library/Fonts/Times.dfont
Lookup font: Helvetica found in file: /System/Library/Fonts/Helvetica.dfont
Lookup font: Helvetica-Bold found in file: /System/Library/Fonts/Helvetica.dfont
Lookup font: Helvetica-Oblique found in file:
/System/Library/Fonts/Helvetica.dfont
Lookup font: Helvetica-BoldOblique found in file:
/System/Library/Fonts/Helvetica.dfont
Lookup font: Courier found in file: /System/Library/Fonts/Courier.dfont
Lookup font: Courier-Bold found in file: /System/Library/Fonts/Courier.dfont
Lookup font: Courier-Oblique found in file: /System/Library/Fonts/Courier.dfont
Lookup font: Courier-BoldOblique found in file:
/System/Library/Fonts/Courier.dfont
Lookup font: Symbol found in file: /System/Library/Fonts/Symbol.ttf
"Error: Couldn't find a font for 'ZapfDingbats', subst is 'Helvetica'"
"Error: Couldn't find a font for 'ZapfDingbats', subst is 'Helvetica'"

This test was done on 10.6.7, while the other tests were done on
10.5.0. However the output is the same:

    http://i.imgur.com/yhp6s.png

The only difference is that Snow Leopard has a .ttf for the Symbol
font while Leopard has a .dfont file.

So, the problem appears to be that ZapfDingbats is not being
recognized.  However, the font files do exist

On 10.6.7:

    /System/Library/Fonts/ZapfDingbats.ttf

On 10.5.0:

    /System/Library/Fonts/ZapfDingbats.dfont

Perhaps there is something exceptional about the dingbat font that
keeps the logic in `GlobalParams::loadPlatformFont` from recognizing
it as valid?

-Charlie



More information about the texworks mailing list