SVG fonts for Japanese look identical incorrectly
Closed, ResolvedPublic

Description

Author: ifurkend

Description:
The currently installed Japanese fonts for rendering SVG file to PNG image are Kochi Mincho (serif) and Kochi Gothic (sans-serif). The Western/English characters differ correctly in these 2 fonts, but the actual kanji, katakana and hiragana are not. All three syllabaries look exactly the same in the form of sans-serif typeface (Gothic). There could be some problem with the Kochi Mincho font installed on Wikimedia.

Please check this image and scroll to the Kochi fonts row for inspection:
https://commons.wikimedia.org/wiki/File:MediaWiki_SVG_fonts.svg

P.S. I tested the fonts with Jarry1250's SVG Check on wmflabs which correctly renders text of Mincho font in serif typeface.
https://tools.wmflabs.org/svgcheck/index.php


Version: wmf-deployment
Severity: normal

bzimport added a project: Wikimedia-SVG-rendering.Via ConduitNov 22 2014, 3:10 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz64002.
bzimport created this task.Via LegacyApr 16 2014, 4:35 PM
Bawolff added a comment.Via ConduitApr 16 2014, 5:22 PM

I'm not sure if that font is even installed on the servers. Its not listed at https://git.wikimedia.org/blob/operations%2Fpuppet.git/production/manifests%2Fimagescaler.pp#L44 However the fonts "Takao Gothic", "Takao P Gothic", "Takao Ex Gothic", "Takao Mincho", "Takao P Mincho" and Takao Ex Mincho are available. Some of the not specificly Japenese fonts should also have Japanese characters in them (Like DejaVu family)

The relavent packages would be ttf-kochi-gothic and ttf-kochi-mincho.

I'm not really sure if the list in puppet is exhaustive, or just "extra" fonts. Of course, the way to know for sure what is going on would be to run fc-match 'Kochi Micho' and fc-match 'Kochi Gothic' on an image scalar.


P.S. I tested the fonts with Jarry1250's SVG Check on wmflabs which correctly >renders text of Mincho font in serif typeface.
https://tools.wmflabs.org/svgcheck/index.php

Tool server does not appear to actually have the Kochi fonts installed, and uses DejaVu serif and DejaVu sans for Kochi Mincho and Kochi Gothic respectively (I think). Tool labs also has the IPAGothic installed which I don't think image scalars have.

Reedy added a comment.Via ConduitApr 16 2014, 5:35 PM

reedy@mw1154:~$ fc-match 'Kochi Micho'
DejaVuSans.ttf: "DejaVu Sans" "Book"
reedy@mw1154:~$ fc-match 'Kochi Gothic'
DejaVuSans.ttf: "DejaVu Sans" "Book"
reedy@mw1154:~$

gerritbot added a comment.Via ConduitApr 16 2014, 5:37 PM

Change 126729 had a related patch set uploaded by Reedy:
Add ttf-kochi-mincho and ttf-kochi-gothic to imagescalers

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

Reedy added a comment.Via ConduitApr 16 2014, 6:25 PM

(In reply to Bawolff (Brian Wolff) from comment #1)

I'm not really sure if the list in puppet is exhaustive, or just "extra"
fonts. Of course, the way to know for sure what is going on would be to run
fc-match 'Kochi Micho' and fc-match 'Kochi Gothic' on an image scalar.

It should be, bar anything that's a dependency of other packages and/or stock installed

bzimport added a comment.Via ConduitApr 17 2014, 2:41 AM

ifurkend wrote:

The Takao fonts work correctly and I've updated "File:MediaWiki SVG fonts.svg" for demonstration.

gerritbot added a comment.Via ConduitApr 18 2014, 8:25 AM

Change 126729 merged by Dzahn:
Add ttf-kochi-mincho and ttf-kochi-gothic to imagescalers

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

Dzahn added a comment.Via ConduitApr 18 2014, 8:27 AM

fonts are being installed now by puppet across imagescalers.

notice: /Stage[main]/Imagescaler::Packages::Fonts/Package[ttf-kochi-mincho]/ensure: ensure changed 'purged' to 'latest'

notice: /Stage[main]/Imagescaler::Packages::Fonts/Package[ttf-kochi-gothic]/ensure: ensure changed 'purged' to 'latest'

Dzahn added a comment.Via ConduitApr 18 2014, 8:29 AM

root@mw1153:~# fc-match 'Kochi Micho'
DejaVuSans.ttf: "DejaVu Sans" "Book"

root@mw1153:~# fc-match 'Kochi Gothic'
kochi-gothic-subst.ttf: "Kochi Gothic" "Regular"

Dzahn added a comment.Via ConduitApr 18 2014, 8:31 AM

eh, typo, Micho vs. Mincho

fc-match 'Kochi Mincho'
kochi-mincho-subst.ttf: "Kochi Mincho" "Regular"

Bawolff added a comment.Via ConduitApr 18 2014, 5:51 PM

Just as a reminder, if any existing images dont show the new font, do ?action=purge on image desc page.

bzimport added a comment.Via ConduitApr 21 2014, 10:35 AM

ifurkend wrote:

Kochi fonts are working now. May I ask if "VL Gothic" and "VL PGothic" (as listed in meta:SVG fonts) are installed which appear to fall back to Deja vu as well.

Reedy added a comment.Via ConduitApr 21 2014, 11:54 AM

reedy@mw1158:~$ fc-match 'VL Gothic'
DejaVuSans.ttf: "DejaVu Sans" "Book"
reedy@mw1158:~$ fc-match 'VL PGothic'
DejaVuSans.ttf: "DejaVu Sans" "Book"
reedy@mw1158:~$

gerritbot added a comment.Via ConduitApr 21 2014, 12:00 PM

Change 127623 had a related patch set uploaded by Reedy:
Add ttf-vlgothic to imagescalers

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

gerritbot added a comment.Via ConduitApr 28 2014, 1:04 PM

Change 127623 merged by Dzahn:
Add fonts-vlgothic to imagescalers

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

Dzahn added a comment.Via ConduitApr 28 2014, 1:10 PM

changed that to use fonts-vlgothic, because the other suggested packages (earlier patch sets on that gerrit change) were dummy or virtual packages.

fonts-vlgothic is: "VL Gothic is beautiful Japanese free Gothic TrueType font, developed by Project Vine"

Dzahn added a comment.Via ConduitApr 28 2014, 1:47 PM

root@mw1158:~# fc-match 'VL Gothic'
VL-Gothic-Regular.ttf: "VL Gothic" "regular"
root@mw1158:~# fc-match 'VL PGothic'
VL-PGothic-Regular.ttf: "VL PGothic" "regular"

bzimport added a comment.Via ConduitApr 29 2014, 8:40 AM

ifurkend wrote:

Updated all last 3 font-comparison images in meta:SVG_fonts. Both VL fonts look correct.

Add Comment