Hi, As the deadline is comming, I come to publicize myself again :) I have just updated the core part of my proposal [1]. Hope to see any advice or comments. Thanks a lot!
[1] https://www.mediawiki.org/wiki/User:Xiaoxiangquan/UniversalLanguageSelector_...
*---------------------About Chinese Font Tailor--------------------*
In the ULS webfonts's repository( ULS:/data/fontrepo/fonts ), Autonym contains all the characters needed for the ULS UI. It only needs tens of Chinese characters, so only keep them, and kick the other tens of thousands out. That's how Chinese Font Tailor will work! But it's for general purpose, not only for UI.
*I think there are two approaches.* - Aggressive update: Whenever a page is updated, scan it to see what characters are used and then generate the font for it. Advantage: quick response for visiting Disadvantage: it seems to affect the external logic
- Lazy update: Whenever a page is visited and ULS is called, scan it to see what characters are used and then generate the font for it. Cache the font with a timestamp, then we can use it directly in future when finding it up-to-date after comparing the font's and the page's timestamp. Advantage: better cohesion Disadvantage: may cause notable delay for the first visiting
I myself suggest the latter one, as wiki pages tend to Write Once and Read Many.
*Implementation* - A script that run on server will tailor the font file for a specified page called ABC. The font file will be named ABC_FONT-NAME_TIMESTAMP.ttf. - Modify the webfonts js (ULS:/resources/js/) to pack some parameters needed, such as the page name - A php script serve the right font for the webfonts' call.
----------------------------------------------------
Best regards,
wikitech-l@lists.wikimedia.org