ugly fonts in printed web pages

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

ugly fonts in printed web pages

Unread post by Lucio Chiappetti » 2015-06-03, 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
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1736
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: ugly fonts in printed web pages

Unread post by trava90 » 2015-06-07, 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
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: ugly fonts in printed web pages

Unread post by Lucio Chiappetti » 2015-06-08, 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
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

squarefractal

Re: ugly fonts in printed web pages

Unread post by squarefractal » 2015-06-08, 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
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: ugly fonts in printed web pages

Unread post by Lucio Chiappetti » 2015-06-08, 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.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

squarefractal

Re: ugly fonts in printed web pages

Unread post by squarefractal » 2015-06-08, 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.

Locked