[texworks] Mac OS TeXworks + fontconfig

Charlie Sharpsteen chuck at sharpsteen.net
Sun May 29 12:08:40 CEST 2011


On Sun, May 29, 2011 at 1:40 AM, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi,
>
> On 2011-05-28 18:12, Charlie Sharpsteen wrote:
>> 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`:
>
> Thanks for testing.
>
>> [snip]
>>
>> 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?
>
> Maybe. I sent you a pull request that adds more debug output (basically,
> around every point in the function where something can go wrong).
> Hopefully this will give a better indication where things fail.
>
> -Stefan

Allright, I applied the pull request and added one more log statement.
 Here's the results of loading base-14-fonts.pdf:

QFileSystemWatcher::removePaths: list is empty
Lookup font: Times-Roman
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/UNgvGH1x.ttf
Lookup font: Times-Bold
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/ArQD2Yg2.ttf
Lookup font: Times-Italic
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/rMHRifPr.ttf
Lookup font: Times-BoldItalic
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/fPrbPf68.ttf
Lookup font: Helvetica
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/K7MBFFu0.ttf
Lookup font: Helvetica-Bold
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/cqyjMmsP.ttf
Lookup font: Helvetica-Oblique
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/X6n6fEMm.ttf
Lookup font: Helvetica-BoldOblique
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/SZ9wIxwW.ttf
Lookup font: Courier
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/y1BE8igp.ttf
Lookup font: Courier-Bold
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/KqJlPdog.ttf
Lookup font: Courier-Oblique
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/bulPJZj8.ttf
Lookup font: Courier-BoldOblique
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   no TTF file found, checking for .dfont
   ATSFontGetTableDirectory succeeded
   font converted to /tmp/iDDzPKQP.ttf
Lookup font: Symbol
   ATSFontFindFromPostScriptName found fontRef
   found 'glyf' table
   found in file: /System/Library/Fonts/Symbol.ttf
Lookup font: ZapfDingbats
   ATSFontFindFromPostScriptName failed! Bailing out!
"Error: Couldn't find a font for 'ZapfDingbats', subst is 'Helvetica'"
Lookup font: ZapfDingbats
   ATSFontFindFromPostScriptName failed! Bailing out!
"Error: Couldn't find a font for 'ZapfDingbats', subst is 'Helvetica'"

So, looks like the problem with ZapfDingbats is that
ATSFontFindFromPostScriptName can't locate it using that name for some
reason.


> PS: phew, branching remote branches, cherry-picking commits, I'm
> learning a lot about git here :).



More information about the texworks mailing list