ugly fonts in printed web pages

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

Lucio Chiappetti
Fanatic
Fanatic
Posts: 207
Joined: Mon, 01 Sep 2014, 15:11
Location: Milan Italy

ugly fonts in printed web pages

Unread postby Lucio Chiappetti » Wed, 03 Jun 2015, 13:36

I occasionally make a hardcopy of a web page, and in the past I noticed that some pages come out nicely, while a few other occasionally come out with ugly fonts. I presume I observed this behaviour in the past with FF and now with PM. Now today, since the hardcopy was lost, I tried to re-print some pages of my own (which are plain HTML, no CSS, no font declaration) and PM (25.0.2 x64 for Linux,under Suse 11.3) gave me a rather ugly font. This did not happen with the FF version I used before I switched to PM.

In general I do not print directly but use the browser dialogue (see screenshot) to generate a pdf file (then from acrobat I print it four pages on a page, two side by side and double-sided printing). I tried again with the old FF and the pdf comes out nicer. I tried to inspect the pdf file Properties->Font and I noticed that PM uses in general some funny numbered T3Font_0, T3Font_1 ... except for <tt> where it uses a Courier 10 Pitch, while FF uses some Arial fonts for normal text (while <tt> comes out ugly).

Is there a dummy guide to configure the font resources used for print (as opposed to the fonts on the screen, which look fine) ? I assume this is a browser issue and not a system issue, since FF and PM produced pdf are different.
Attachments
dump.png

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1449
Joined: Mon, 20 May 2013, 18:19
Location: Earth
Contact:

Re: ugly fonts in printed web pages

Unread postby trava90 » Sun, 07 Jun 2015, 05:08

I can't reproduce with Pale Moon 25.4.1 (I strongly suggest you upgrade, btw) on Manjaro. All the pages I've printed to PDF look fine. In the PDF file properties, it shows DejaVu fonts being used.

I'm not sure what could be causing the problem, but based on my previous experience when using the system "Print to file" option producing garbled documents (never using Pale Moon though), it's possible it is related to that. Perhaps you could try an add-on such as Print Paged to PDF that would bypass the system PDF printer?

Lucio Chiappetti
Fanatic
Fanatic
Posts: 207
Joined: Mon, 01 Sep 2014, 15:11
Location: Milan Italy

Re: ugly fonts in printed web pages

Unread postby Lucio Chiappetti » Mon, 08 Jun 2015, 10:20

I am confused about which piece of software is ultimately doing the HTML to PDF conversion. Will it be Pale Moon ? Will it be CUPS ? or something else ?
The behaviour of CUPS is somewhat strange and depends on the configuration of the cups server of which my machine is client.
I verified that print-to-file or print directly to a printer produce the same result.

Anyhow aren't there separate resources in about:config to control the fonts for the printed version w.r.t. the X fonts used by the browser to display a web page on the screen in absence of a CSS ?

Apparently the resources in the menu Preferences->Content->Advanced apply to both !
I report here in the first column the resource name in the form, in the second column the settings I had on Pale Moon and which were satisfactory on the screen (size 18) but print badly, in the fourth column the old settings used on FF (with smaller size 14, and 12 for monospace). In the third column it is an attempt to "reset defaults". This one produces a very legible printout (the only thing I do not like is that "monospace" is an helvetica-like font not a <tt> font.

A pdf properties shows TimesNewRoman and AndaleMono are the fonts used for the third column.

Obviously some of the fonts used in the preferences (the ones marked in colour) are not found during the pdf conversion.

Proportional Serif Serif Sans-serif
Serif Adobe Times Serif Adobe times
Sans-Serif Adobe Helvetica Sans-serif Sans-serif
Monospaced Courier 10 Pitch Monospaced Adobe Courier

squarefractal

Re: ugly fonts in printed web pages

Unread postby squarefractal » Mon, 08 Jun 2015, 10:49

Lucio Chiappetti wrote:I am confused about which piece of software is ultimately doing the HTML to PDF conversion

A package named cups-pdf.

I verified that print-to-file or print directly to a printer produce the same result.

Obviously, all Pale Moon knows that "print to file" is also a printing device, however, this is a special one provided by cups-pdf that produces a PDF file out of it.

Apparently the resources in the menu Preferences->Content->Advanced apply to both !

All CSS, whether targeted for the screen, or for print, are affected by those options.

Obviously some of the fonts used in the preferences (the ones marked in colour) are not found during the pdf conversion.

Have you unchecked the "allow webpages to use custom fonts" in Preferences > Content > Advanced?

Lucio Chiappetti
Fanatic
Fanatic
Posts: 207
Joined: Mon, 01 Sep 2014, 15:11
Location: Milan Italy

Re: ugly fonts in printed web pages

Unread postby Lucio Chiappetti » Mon, 08 Jun 2015, 14:44

squarefractal wrote:Have you unchecked the "allow webpages to use custom fonts" in Preferences > Content > Advanced?


Obviously not! In fact pages which specify their fonts in the HTML code for the screen usually print OK.
It were pages which do not specify fonts at all (no CSS, no style tags, no font face tags). This includes most of mine (in the spirit of original HTML ... care of the content and not of the look... we still remember NCSA Mosaic :mrgreen:). The fonts in the preferences should be just for that ... to supply suitable defaults on the screen.

Apparently from a while (which I cannot trace whether it is when I started using PM, or afterwards) these preferences (if different from the PM "factory defaults") generated ugly PDF. Now I reset the factory defaults and the PDF are nice again.

Will the cups-pdf package you mention be the one on the client (my machine, where I never update automatically), or the one on the server (where updates occurs automatically, sometimes with undesirable or at least unpredicted results) ? That might create inconsistencies, I suppose.

squarefractal

Re: ugly fonts in printed web pages

Unread postby squarefractal » Mon, 08 Jun 2015, 14:58

Lucio Chiappetti wrote:Will the cups-pdf package you mention be the one on the client or the one on the server

The client.


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: jaymel and 3 guests