Re: [Wikitech-l] Fwd: [WikimediaMobile] webfonts in mobile frontend

2013-09-30 Thread Jon Robson
Thanks Amir for kicking this off!

A general point I wanted to make off the back of this... when adding
things to the mobile site, no matter how minimal a module is we should
get in the discipline habit of thinking Does everyone need this
module? We should be extremely careful what JavaScript and CSS
modules we add to mobile users, especially when modules are not useful
to certain users.

In this case I would recommend checking if the language needs WebFonts
before adding the module to the page. Another key thing we are doing
on mobile now is making use of mw.loader.using to conditionally load
JavaScript - this is another useful trick :-).



On Fri, Sep 27, 2013 at 10:49 PM, Yuvi Panda yuvipa...@gmail.com wrote:
 Forwarded to wikitech-l


 -- Forwarded message --
 From: Amir E. Aharoni amir.ahar...@mail.huji.ac.il
 Date: Sat, Sep 28, 2013 at 10:38 AM
 Subject: [WikimediaMobile] webfonts in mobile frontend
 To: mobil...@lists.wikimedia.org mobil...@lists.wikimedia.org


 Hi,

 So today I worked with Kaldari (thanks for the help!!) and committed a
 very simple module to enable webfonts support in MobileFrontend:
 https://gerrit.wikimedia.org/r/#/c/86340/
 https://gerrit.wikimedia.org/r/#/c/86337/

 Review and any comments are very welcome, of course.

 The current implementation is very simple. It doesn't allow any
 configuration or choice of fonts - if there is a default font for the
 language, it is used wherever there's a lang attribute or a style or a
 class the sets a font explicitly. (Some languages, like Tamil and
 Hebrew have fonts, but they are not default, so none are used). It may
 be worth optimizing it, for example:

 * Only loading the font of the content language to save time and
 bandwidth. (Loading additional fonts can be an option.)
 * Only loading fonts on devices that are known to have bad font
 support. On iPhone and it's pretty for many languages. On the latest
 Windows Mobile version it's very good. On Android below 4.0, however,
 it's very bad: most languages of India are completely unreadable,
 which is the main reason to do this (the same goes for languages of
 Ethiopia, South-East Asia and some others). Android 4 and above is not
 always perfect either.

 I'd love to hear more considerations about bandwidth, performance, testing 
 etc.

 Thanks!

 --
 Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
 http://aharoni.wordpress.com
 ‪“We're living in pieces,
 I want to live in peace.” – T. Moore‬

 ___
 Mobile-l mailing list
 mobil...@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/mobile-l



 --
 Yuvi Panda T
 http://yuvi.in/blog

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l



-- 
Jon Robson
http://jonrobson.me.uk
@rakugojon

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Fwd: [WikimediaMobile] webfonts in mobile frontend

2013-09-27 Thread Yuvi Panda
Forwarded to wikitech-l


-- Forwarded message --
From: Amir E. Aharoni amir.ahar...@mail.huji.ac.il
Date: Sat, Sep 28, 2013 at 10:38 AM
Subject: [WikimediaMobile] webfonts in mobile frontend
To: mobil...@lists.wikimedia.org mobil...@lists.wikimedia.org


Hi,

So today I worked with Kaldari (thanks for the help!!) and committed a
very simple module to enable webfonts support in MobileFrontend:
https://gerrit.wikimedia.org/r/#/c/86340/
https://gerrit.wikimedia.org/r/#/c/86337/

Review and any comments are very welcome, of course.

The current implementation is very simple. It doesn't allow any
configuration or choice of fonts - if there is a default font for the
language, it is used wherever there's a lang attribute or a style or a
class the sets a font explicitly. (Some languages, like Tamil and
Hebrew have fonts, but they are not default, so none are used). It may
be worth optimizing it, for example:

* Only loading the font of the content language to save time and
bandwidth. (Loading additional fonts can be an option.)
* Only loading fonts on devices that are known to have bad font
support. On iPhone and it's pretty for many languages. On the latest
Windows Mobile version it's very good. On Android below 4.0, however,
it's very bad: most languages of India are completely unreadable,
which is the main reason to do this (the same goes for languages of
Ethiopia, South-East Asia and some others). Android 4 and above is not
always perfect either.

I'd love to hear more considerations about bandwidth, performance, testing etc.

Thanks!

--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

___
Mobile-l mailing list
mobil...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mobile-l



-- 
Yuvi Panda T
http://yuvi.in/blog

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l