Page MenuHomePhabricator

[BUG] Fonts missing for some languages on SVG Translate tool
Closed, ResolvedPublic2 Estimated Story Points

Description

I tried adding Hindi translations for a few labels but the preview fails to render Hindi characters. It does work as expected for Hebrew characters. The screenshot below demonstrates both.

image.png (1×2 px, 521 KB)

Steps to reproduce:

  1. Go to https://tools.wmflabs.org/svgtranslate-test/File:100_Years_War_France_1435.svg
  2. Change your keyboard language to Hindi
  3. Add a label translation in Hindi

Expected behavior: Hindi label is displayed in preview
Actual behavior: Unknown character glyph is displayed instead

Event Timeline

Niharika created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Issue with other Indic languages.... Not able to translate to Malayalam, Tamil too.. Showing only rectangular boxes.

The font difference is due to packages: for production to render the SVGs, it has tons of additional fonts installed, unlike our container.

Niharika set the point value for this task to 2.Jan 23 2019, 12:10 AM

Do we want to add all the fonts from mediawiki::packages::fonts? It seems likely that we could get away with a subset, but I'm not sure which could be left out.

Change 488764 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[operations/docker-images/toollabs-images@master] Add all fonts used in production MediaWiki

https://gerrit.wikimedia.org/r/488764

Yes, I think we do want all the fonts. From the patch, it seems just as easy to include them as not.

The Stretch grid has all these fonts, and RSVG. I've switched the staging site to use it, and things seem okay.

This task is ready for QA (no code changes required).

Change 488764 abandoned by Samwilson:
Add all fonts used in production MediaWiki

Reason:
Not required if we use the Stretch job grid.

https://gerrit.wikimedia.org/r/488764

@Samwilson Awesome! Works well for me. Can we switch the production site to Stretch too?

Seems like we could maybe just use the next deploy as an opportunity to deploy to Stretch.

Works well for me. Can we switch the production site to Stretch too?

Done.

Seems like we could maybe just use the next deploy as an opportunity to deploy to Stretch.

Sorry Alex, I only just saw your comment (I was working from emails). I didn't deploy any new code. Prod is currently at (untagged) ca6dba24555536c0866c754ac3ec1b5c9b8f6019 — I'll be sure not to deploy non-tagged releases any more to production. :)

Niharika moved this task from QA to Q3 2018-19 on the Community-Tech-Sprint board.