Extension:UniversalLanguageSelector/Fonts for Chinese wikis

Introduction
Including all Chinese characters makes a webfont file too large. We may want to tailor the font file for every page based on characters used on that page. Once finished, this feature can be applied to other languages facing the same problem, such as Japanese.

As of writing, there isn't any "good" enough free font which includes all Chinese characters in Unicode. And the "wiki" concept itself encourages collaborative content creation, so it would be nice to invite user to create a glyph for it when the system sees a character without existing data.


 * Proposal: Click Here
 * Mentors: DChan,  Liangent
 * Repository: Coming soon

Milestones

 * May 19: Start coding.
 * Warm up with code and development tool set
 * Clarify what to do next
 * < - - - We are here
 * June 14: Finish the prototype of Font Tailor
 * June 27: Mid-term evaluation
 * Aug 11: Pencil down
 * Aug 22: Final evaluation

Dynamic Font
In general webfont service, a real font file is downloaded. Now a request like dynamic_font.php?font=xxx&... will return a font file for some special purpose. [ttf|svg|eot|woff]_font_tailor.php are such Dynamic Font entries. According to the parameters given, they check if there have been tailored fonts. If none, generate them and put in the right place. Finally return the fonts requested.

Repository Compiling
The existing script, data/fontrepo/scripts/compile.php, read fonts in data/fontrepo/fonts and generate resources/js/ext.uls.webfonts.repository.js, which will be used by jquery.webfonts. Now mark the fonts which should be tailored (maybe in font.ini), then change the font-url to a right tailor. e.g.

fonts: { "Rufscript": { ttf: "Rufscript.ttf", ... }, ...} becomes ''fonts: { "Rufscript": { ttf: "ttf_font_tailor.php?font=Rufscript", ... }, ...}''

Font Tailor Trigger
Then during the first time a dynamic font for some page is requested (Generally, it's just after a guy submits his changes ), the tailor will generate the font file. And every time the page is visited since then, the font file will be returned directly.

May 18

 * Done
 * Design font tailor
 * To do
 * START coding!
 * Issues
 * I'll defend my master's thesis on May 28. It will take some time to prepare.

May 11

 * Done
 * Re-announce the project on wikizh-l and Distribution list/Global message delivery/zh in Chinese. Discuss with the people there.
 * Reading code: jquery.webfonts, ext.uls.webfonts.js
 * To do
 * Finish designing the font-tailor. Be ready to start coding on May 19

May 4

 * Done
 * Knowledge preparation: Git, JS, jQuery. I use Hg and script languages like Python a lot, so it's easy to get started.
 * Study the tech talk about Unit testing.
 * To do
 * Read ULS docs and code
 * Build up development environment