Page MenuHomePhabricator

Document required fonts for Chromium-Render service
Open, NormalPublic

Description

When using Chromium-PDF on system default font set (using english locale), chromium-pdf uses incorrect fonts while generating PDF. This leads to unreadable PDF. In order to prevent this issue please find and document which fonts are required by`chromium-pdf` service to render properly all supported languages and dialects.

Example of broken render

Article: https://en.wikipedia.org/wiki/Mahatma_Gandhi
Chromium render url: http://chromium-pdf.wmflabs.org/en.wikipedia.org/v1/pdf/Mahatma_Gandhi/letter


What needs answering?

We'd like to install the missing fonts on the computer generating PDFs, but first we need to identify what those fonts should be. Language engineering/design may be able to help provide us with a list of fonts that are used across our different language wikis. Can you help?

Event Timeline

pmiazga created this task.Dec 11 2017, 5:21 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 11 2017, 5:21 PM
ovasileva triaged this task as High priority.Dec 11 2017, 6:07 PM

Strange. The newly generated PDFs don't have this issue.

@pmiazga is trying to repro and will report back after the weekend.

ovasileva lowered the priority of this task from High to Normal.Dec 12 2017, 5:14 PM
ovasileva moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.

@pmiazga did you ever manage to reproduce this?

I think I fixed that by installing lots of extra fonts. Let's use this ticket to document all required fonts.

pmiazga renamed this task from Chromium renders article with broken fonts to Document required fonts for Chromium-Render service.Feb 15 2018, 2:53 PM
pmiazga updated the task description. (Show Details)

please find and document which fonts are required by`chromium-pdf` service to render properly all supported languages and dialects.

Can you add instructions in the tasks on how this will be done? Does this mean Nirzar or a designer needs to list all font family names we need to install?

Could we do this on a case by case basis as we get bug reports?

I'm not sure, this requires some analysis first as we have to install correct Debian packages. Nirzar can provide us all font family names but those might not match Debian packages. We can do it case by case but first we have to verify the most popupar wikis and check that PDF generated for those have correct fonts.

Jdrewniak added a subscriber: Jdrewniak.EditedFeb 19 2018, 5:36 PM

I'd recommend hitting all 298 birds with one stone...

For language support, the Google Noto font is known for having the widest range of characters available, it's specifically designed for that.
There's a debian package available.
To give you an of how many languages are covered by Noto, the entire font family weighs 1 GB!

Pginer-WMF moved this task from Backlog to Other teams on the Language-Team board.Sep 7 2018, 11:21 AM
ovasileva moved this task from Triage to Tracking on the Proton board.Feb 22 2019, 3:26 PM
ovasileva edited projects, added PDF-Rendering; removed Proton.Feb 25 2019, 4:44 PM
alexhollender added a subscriber: alexhollender.

@pmiazga @Jdrewniak can you describe what needs to be done here and how to do it? Trying to figure out if this makes sense as a design task.

TheDJ added a subscriber: TheDJ.Jun 4 2019, 3:27 PM

Also note that there are still several 'missing font' tickets open, specifically:

Those are the two i ran into today at least, there might be more.

Related: T169828 T181200 - It seems these font issues could easily be resolved by quickly syncing with the required people - Reading Infrastructure or/and Marko, Olga, Alex and a reading web engineer

Previously, we were using clean distro, everything installed by hand, most probably because of that we didn't have all fonts installed, furthermore we didn't know which fonts to install.

From my knowledge - this task was fixed by applying existing puppet class mediawiki::packages::fonts on proton servers (see https://github.com/wikimedia/puppet/blob/production/modules/mediawiki/manifests/packages/fonts.pp).
With this set of fonts most of the languages started to render correctly. If there are issues with it ( looks like there are (see DJ comment https://phabricator.wikimedia.org/T182608#5233883), we need to update the mediawiki::packages::fonts puppet class to support new fonts.