[texworks] Mac OS TeXworks + fontconfig

Charlie Sharpsteen chuck at sharpsteen.net
Sun Jun 5 21:56:45 CEST 2011

On Sun, Jun 5, 2011 at 12:22 AM, Stefan Löffler <st.loeffler at gmail.com>wrote:

>  Hi,
> finally, the pieces of the puzzle are starting to fit together :).

Indeed. It is amazing what a good backtrace can do :)

 Anyway, after getting TeXworks and Poppler to run through GDB, a backtrace
> from the error message indicates that the problem occurs in
> `SplashFTFont::makeGlyph` at `SplashFTFont.cc:244` which is a couple steps
> down the call chain from `SplashOutputDev::drawChar`.  I'll try to look over
> this later to see if I can figure anything out, but here is the full
> backtrace:
>      Formatted:
>     https://gist.github.com/1008336
>      Raw:
> https://gist.github.com/raw/1008336/1c01061723261e5d3b6d583ff059a82ac0f00482/texworks_gdb_log.mdown
>  Let me know if anything jumps out!
> Awesome work! In fact, I think the solution jumped out. From looking at the
> source code, it seems that bitmap->h (which is the number of rows to
> allocate) is 0, hence the warnings. My guess is it is caused by a
> zero-dimension "glyph" for the space character. Anyway, it should be fixed
> easily (see attached patch). So, hopefully this settles that once and for
> all.

The patch you attached handles things nicely! No more errors from gmallocn.

>  Just for the record (and for submitting the patches upstream): did this
> happen with an unpatched poppler as well? I.e., are those zero-height glyphs
> picked up by fontconfig as well, or do they require/use other font files
> that don't show this issue?

I never noticed it before, but this error *do* happen with the Fontconfig
build as well. Makes sense as Fontconfig is using the same Font file.  Your
patch also fixes the Fontconfig build.

I guess the last remaining issue that plagues (sort of) the Mac build of
Poppler are the .notdef glyphs that show up in the Symbol font:

One on Snow Leopard:


Two on Leopard:


I don't know if it is really worth hunting these down and eliminating them
as TeXworks is not a general-purpose PDF viewer.  It might help with getting
patches accepted upstream, but these issues are present in the Fontconfig
build as well so we're not really upsetting the status quo by leaving them


> Thanks again for the immense amount of work you've put into this!

You're welcome! Thanks for all of the great typesetting I have been able to
do using TeXworks!

> Cheers,
> Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20110605/21ee41b6/attachment.html>

More information about the texworks mailing list