Last modified: 2014-11-20 04:16:12 UTC
All Chinese characters in the time line would be shown as "□". Seems the "FreeSan.ttf" doesn't contain full UTF-8 character set. Maybe change the font to "ArialMSUnicode.ttf" or something would solve this. Regards.
as of r62018, easy time line supports specifying alternate fonts in LocalSettings.php. Changing to a shell request. The relevant setting is something like: $wgTimelineSettings->fontFile = "fontFile.ttf" probably would also want to update: $wgTimelineSettings->epochTimestamp = '20081209214953'; to something more recent (Currently specified as above in CommonSettins.php) fontFile.ttf must be in the path specified by $GDFONTPATH environment variable. (Which i believe for wikimedia is /usr/local/apache/common/fonts .) As for which fontFile, presumably we already have at least one chinese font installed for the svg renders(?) See also bug 21497 It might also be interesting idea to change the default font for all wikis to be DejaVu Sans, since that supports significantly more characters than FreeSans afaik, however that might break pre-existing timelines on enwikipedia if they depend on letters to be specific sizes. Should be done with care in any case.
Is there a nice *free* font with Chinese characters available? Unfortunately, ArialMSUnicode is non-free.
According to [[meta:Svg_fonts]], there should be some at http://ftp.gnu.org/gnu/non-gnu/chinese-fonts-truetype/
Giving to pdhanda who will research good fonts to use and update the config.
-shell till a font has been suggested that we can use
Have a look at http://wenq.org/enindex.cgi
+shell as WQY fonts are proposed. WenQuanYi Zenhei is available at * http://downloads.sourceforge.net/wqy/wqy-zenhei-0.8.38-1.tar.gz or * http://packages.ubuntu.com/oneiric/ttf-wqy-zenhei I didn't post Microhei because we're not using Droid fonts for ASCII characters.
(In reply to comment #7) > +shell as WQY fonts are proposed. > > WenQuanYi Zenhei is available at > * http://downloads.sourceforge.net/wqy/wqy-zenhei-0.8.38-1.tar.gz or > * http://packages.ubuntu.com/oneiric/ttf-wqy-zenhei > > I didn't post Microhei because we're not using Droid fonts for ASCII > characters. http://packages.ubuntu.com/precise/ttf-wqy-zenhei
ttf-wqy-zenhei is already installed on the cluster...
Related URL: https://gerrit.wikimedia.org/r/64205 (Gerrit Change I3c03bf9b2352a4e577f94ad92d2d38021cf12968)
(In reply to comment #10) > Related URL: https://gerrit.wikimedia.org/r/64205 (Gerrit Change > I3c03bf9b2352a4e577f94ad92d2d38021cf12968) Sadly this caused all characters in timelines missing, including ASCII characters.
Are TTC files supported there, or do we need to get TTF files and put them in the configuration file?
(In reply to comment #11 by Liangent) > Sadly this caused all characters in timelines missing, including ASCII > characters. Liangent: Where could I see this problem? Any testcase?
(In reply to comment #13) > (In reply to comment #11 by Liangent) > > Sadly this caused all characters in timelines missing, including ASCII > > characters. > > Liangent: Where could I see this problem? Any testcase? You can paste any EasyTimeline code to a zhwiki page and see it broken (unless that specific EasyTimeline code has been used on zhwiki and got cached. In this case just modify it a bit).
(In reply to comment #11) > (In reply to comment #10) > > Related URL: https://gerrit.wikimedia.org/r/64205 (Gerrit Change > > I3c03bf9b2352a4e577f94ad92d2d38021cf12968) > > Sadly this caused all characters in timelines missing, including ASCII > characters. This typically means a font file was specified that didn't exist.
I suppose the font(wqy-zenhei.ttc) is broken/missing/unsupported in zhwiki? Hints from Timeline error message: Timeline error. Command line was: '/usr/bin/perl' '/usr/local/apache/common-local/php-1.22wmf17/extensions/timeline/EasyTimeline.pl' -i '/tmp/timeline_c6499ee685fd-1' -m -P '/usr/bin/ploticus' -T '/tmp' -A '/wiki/$1' -f 'wqy-zenhei.ttc'
(In reply to comment #16) > I suppose the font(wqy-zenhei.ttc) is broken/missing/unsupported in zhwiki? > Hints from Timeline error message: > Timeline error. Command line was: '/usr/bin/perl' > '/usr/local/apache/common-local/php-1.22wmf17/extensions/timeline/ > EasyTimeline.pl' > -i '/tmp/timeline_c6499ee685fd-1' -m -P '/usr/bin/ploticus' -T '/tmp' -A > '/wiki/$1' -f 'wqy-zenhei.ttc' If there's an error message, more likely means its not font error. Usually font errors just mean timeline with no text on it. Do you have a link to a page with the error.
(In reply to comment #17) > (In reply to comment #16) > > I suppose the font(wqy-zenhei.ttc) is broken/missing/unsupported in zhwiki? > > Hints from Timeline error message: > > Timeline error. Command line was: '/usr/bin/perl' > > '/usr/local/apache/common-local/php-1.22wmf17/extensions/timeline/ > > EasyTimeline.pl' > > -i '/tmp/timeline_c6499ee685fd-1' -m -P '/usr/bin/ploticus' -T '/tmp' -A > > '/wiki/$1' -f 'wqy-zenhei.ttc' > > If there's an error message, more likely means its not font error. Usually > font > errors just mean timeline with no text on it. Do you have a link to a page > with > the error. I tried to make EasyTimeline to show an error in preview, so there is no page that contains such timeline error. But font error is still exists in various pages like: https://zh.wikipedia.org/wiki/2013%E5%B9%B4%E5%A4%AA%E5%B9%B3%E6%B4%8B%E9%A2%B1%E9%A2%A8%E5%AD%A3#.E9.A2.A8.E6.9A.B4.E6.99.82.E9.96.93.E8.A1.A8 https://zh.wikipedia.org/wiki/2013%E5%B9%B4%E5%A4%A7%E8%A5%BF%E6%B4%8B%E9%A2%B6%E9%A2%A8%E5%AD%A3#.E9.A2.A8.E6.9A.B4.E6.99.82.E9.96.93.E8.A1.A8
We need the font to be copied to whatever GDFONTPATH is set to. gd (which ploticus uses internally), needs all font files to be in the same directory. See also https://bugzilla.wikimedia.org/show_bug.cgi?id=37968
ottomata and hashar helpfully provided the list of fonts available in GDFONTPATH, at https://gist.github.com/ottomata/be2e8f786a3e8d1bcd78 and http://paste.openstack.org/show/80352/ . A quick evaluation of potential fonts with Chinese characters, identified by size, follows (using equivalent terms in Chinese typography): unifont-5.1.20080907.ttf: 宋体([[GNU Unifont]]) kochi-mincho.ttf: 宋体(日文) kochi-gothic.ttf: 黑体(日文) gkai00mp.ttf: 文鼎PL简中楷 gbsn00lp.ttf: 文鼎PL简报宋 bsmi00lp.ttf: 文鼎PL细上海宋 bkai00mp.ttf: 文鼎PL中楷 (see [[zh:文鼎#捐獻]] for the last four fonts)
(and see [[Kochi font]] for those Japanese fonts) I'm submitting a patch to use unifont-5.1.20080907.ttf. This seems like a language-neutural font.
Change 133228 had a related patch set uploaded by Liangent: Set unifont-5.1.20080907.ttf for timeline on ZH projects https://gerrit.wikimedia.org/r/133228
Change 133228 merged by jenkins-bot: Set unifont-5.1.20080907.ttf for timeline on ZH projects https://gerrit.wikimedia.org/r/133228
No luck :( it still appears not working.
(In reply to Liangent from comment #24) > No luck :( it still appears not working. I just wonder if that setting is really used? If it is used, even English chart will use Unifont, which is dual-spaced font. But instead, FreeSans is still being used from my observation.
(In reply to Roy Tam from comment #25) > (In reply to Liangent from comment #24) > > No luck :( it still appears not working. > > I just wonder if that setting is really used? > If it is used, even English chart will use Unifont, which is dual-spaced > font. > But instead, FreeSans is still being used from my observation. The setting only applies to zh projects. It will also only apply to new timelines (where the timeline code has never previously been entered into the wiki)
(In reply to Bawolff (Brian Wolff) from comment #26) > (In reply to Roy Tam from comment #25) > > (In reply to Liangent from comment #24) > > > No luck :( it still appears not working. > > > > I just wonder if that setting is really used? > > If it is used, even English chart will use Unifont, which is dual-spaced > > font. > > But instead, FreeSans is still being used from my observation. > > The setting only applies to zh projects. It will also only apply to new > timelines (where the timeline code has never previously been entered into > the wiki) So preview of timeline is not generated every time I press preview button in edit page?
No patches left to review here; resetting status.
The Chinese Wikipedia still has trouble with its timeline font, but I can use wqy-zenhei.ttc without problems. The font should be under the GDFONTPATH directory (or change GDFONTPATH). I am not using MediaWiki; I run the PHP file directly, which can be downloaded from http://www.mediawiki.org/w/index.php?title=Extension:EasyTimeline/installation&oldid=1249585#Download_PHP.2FPERL_scripts