On Mon, Dec 28, 2015 at 02:50:24PM +0100, Theo Buehler wrote:
> On Mon, Dec 28, 2015 at 08:23:32AM +0100, Matthieu Herrb wrote:
> > On Sun, Dec 27, 2015 at 10:05:24PM +0000, Stuart Henderson wrote:
> > > On 2015/12/26 19:11, Michael McConville wrote:
> > > > Is there a reason why Firefox often has ugly typography in PDFs
> > > > generated by LaTeX and the like? Most specifically, the t's are often
> > > > very fat.
> > > > 
> > > > Here's an example:
> > > > 
> > > > http://www.sccs.swarthmore.edu/~mmcconv1/dump/firefox-pdf.png
> > > > 
> > > > IIRC, it's this way on some Linux distros too, so maybe it's
> > > > unavoidable. Is there any way around it?
> > > > 
> > > 
> > > I think this may happen if you have ghostscript-fonts installed.
> > 
> > To my eyes this screenshot looks more like a document that used the
> > old bitmapped CM fonts rather than some PDF compatible ones. It may be
> > possible that it's the firefox PDF viewer that picks them from you
> > system, but more probalby it's at the PDF generation stage that the
> > damage was done.
> > 
> > Michael, is the original PDF document available somewhere to check
> > that.
> > 
> > Hint for (La)TeX document writers : use the lmodern package with
> > pdftex/pdflatex. 
> > -- 
> > Matthieu Herrb
> 
> It doesn't seem that \uspackage{lmodern} fixes this issue:
> Consider these two examples:
> https://people.math.ethz.ch/~thbuehle/fa_i/lorem-lmodern.pdf
> https://people.math.ethz.ch/~thbuehle/fa_i/lorem-nolmodern.pdf
> both have the same fat t that Mike described.  Both were created with
> pdflatex, source code below.
> 
> As I told Mike in private, setting "pdfjs.disableFontFace" to true
> in about:config apparently fixes this issue, but I don't know if there
> are other undesirable side-effects of doing this.

The problem are the Type1 fonts commonly used in the PDFs generated by
pdflatex. Firefox tries to convert the Type1 fonts to OTF but the
conversion is very buggy.

Firefox extracts the fonts embedded within the PDF files and load them
with @font-face. If you disable @font-face, Firefox will use (i guess)
the PDF standard fonts which will break the metrics of the document.

https://wiki.mozilla.org/PDF.js/fonts

-- 
Juan Francisco Cantero Hurtado http://juanfra.info

Reply via email to