(I also tried your suggestion to use buffer-text-pixel-size in place of window-text-pixel-size in pixel-fill-region, and while that prevented the error, it resulted in irregular and very large indentation of the continuations of overlong headers, and I didn't immediately see an easy way to avoid that.) Steve Berman