Last modified: 2014-05-19 10:46:26 UTC
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
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@mw1154:~$ fc-match 'Kochi Micho' DejaVuSans.ttf: "DejaVu Sans" "Book" reedy@mw1154:~$ fc-match 'Kochi Gothic' DejaVuSans.ttf: "DejaVu Sans" "Book" reedy@mw1154:~$
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
(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
The Takao fonts work correctly and I've updated "File:MediaWiki SVG fonts.svg" for demonstration.
Change 126729 merged by Dzahn: Add ttf-kochi-mincho and ttf-kochi-gothic to imagescalers https://gerrit.wikimedia.org/r/126729
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'
root@mw1153:~# fc-match 'Kochi Micho' DejaVuSans.ttf: "DejaVu Sans" "Book" root@mw1153:~# fc-match 'Kochi Gothic' kochi-gothic-subst.ttf: "Kochi Gothic" "Regular"
eh, typo, Micho vs. Mincho fc-match 'Kochi Mincho' kochi-mincho-subst.ttf: "Kochi Mincho" "Regular"
Just as a reminder, if any existing images dont show the new font, do ?action=purge on image desc page.
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@mw1158:~$ fc-match 'VL Gothic' DejaVuSans.ttf: "DejaVu Sans" "Book" reedy@mw1158:~$ fc-match 'VL PGothic' DejaVuSans.ttf: "DejaVu Sans" "Book" reedy@mw1158:~$
Change 127623 had a related patch set uploaded by Reedy: Add ttf-vlgothic to imagescalers https://gerrit.wikimedia.org/r/127623
Change 127623 merged by Dzahn: Add fonts-vlgothic to imagescalers https://gerrit.wikimedia.org/r/127623
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"
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"
Updated all last 3 font-comparison images in meta:SVG_fonts. Both VL fonts look correct.