To detect whether the client can render a given string,
use a tofu detection algorithm.
If the user has an explicit font preference, do not override it.
If the user has no preference and there is a default font for a
language, see if that language can be rendered at the user's browser
using tofu detection.
If tofu is detected, apply the font.
If the element has 'autonym' class, apply Autonym font only when
that language has tofu.
Change-Id: Ib9ee9497e6bcfa7eb86f7d264e0980d8880d6b70
So that the fontfamily values are always 'seen' by the webfonts jquery
plugin. Missing this was causing incorrect behavior -overriding the
fontfamiliy from css- in random cases.
The stylesheet ext.uls.webfonts.css define font family values for
interlanguge links and autonym class. This patch make sure that that
css values are read by jquery.webfonts while deciding which font to
apply. Autonym font is supposed to be used for them. If jquery.webfonts
does not read that these elements has a font family defined in css as
"'Autonym', sans-serif", it will attempt to apply fonts as per user
preference or default fonts based on lang attribute. That will cause
applying bigger fonts.
jquery.webfonts does not apply any fonts, if an element has explicit
font family value defined by inline css or by external style sheets.
Bug: 59958
Change-Id: I2da436caa618bc2318e20e3c0492a6bf1c03e162
Not adding as a font option for English, but make it possible to define
the font in css and get the font downloaded from server
Bug: 58203
Change-Id: I968c4c4c3ba35ca53a9762cef0f7c59b374b1f67
* Also improves Nazli by adding Nazli bold from its original pack
* Scheherazade-R.woff is taken from Scheherazade font pack
* Except the above, rest WOFFs and EOTs are made by sfntly
Bug: 58381
Bug: 58382
Change-Id: Iede469600ddcaebfce177f5b3d33a9fc81ea33f9
Written in pair-programming with Ryan Kaldari.
This adds a version of webfonts initialization that is stripped
of any smart features. It only loads the basic jquery.webfonts
library and the fonts repository in a way that is usable
with the MobileFronted extension.
It is completely disabled by default.
It can be enabled by setting
$wgULSMobileWebfontsEnabled = true;
and even then it will only be enabled for users
who opted in for the mobile beta mode.
Change-Id: I488e411232a1192bbf46ae5675c701366bda9a3e
* Use ; for comments
* Avoid unescaped characters like = signs
* Consistency in request-url values
Change-Id: I1a94e30f1acedd934645b70f65025872e4bc7b8e
* Rename JsonMessageLoader to ULSJsonMessageLoader
* Correct the return type of mw.uls.loadLocalization
Follow up: Ic39dec1c484982fb07edd167e83794c0b5f470ee
Change-Id: I13c64a5e89ac75be8a95d951658018a78534f466
Pressing apply button is applicable to all settings module, not only
for the one that is visible. Unless we do a validation before we save
preferences, other module can cause incorrect (old) preferences to be
saved.
Bug: 56885
Change-Id: I31df2ee0bf8b600a94e8fed1a784daf529186b16
Was happening mostly on Firefox when ULS was in personal
position and you were logged out and allowed to change language.
Loading grid here already prevents graphical glitch and delaying
the click seems to prevent scrolling to wrong position.
Bug: 56937
Change-Id: Ie9acaa5a46fd903221d30c94dbc26a83355cdb64
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.
In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.
The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.
Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
It happens when input settings are accessed directly while display
settings are not initialized. While saving the display settings
will not be rendered, causing a js error
Change-Id: I3ef1afe67a6bcdc3047b482d697bc03baab6ac47
* Avoided Amiri being default font for ar
* Avoided CharisSIL, DuolosSIL being default fonts for
cdo, nan respectively
The change is because of the bandwidth efficiency concerns. Also
Arabic being widely supported language, having defaut font is not
must.
Change-Id: I657d08ded26f25342d18483f6c5a0393f625001b
Move it to a seperate css file ext.uls.webfonts.css so that the RL
modules are more granular and clear.
Also get the @font-face css for Autonym font get ready on page load
so that the font applied automatically to any future elements on page.
Change-Id: Icb76df5baedaba8ab613d665a1be923779a6b9e7
* Do not load anything unless input field is focused
* Split the setup function to smaller functions
* Introduce $wgULSImeSelectors to allow configuration and avoid
duplication of selectors in two places.
Change-Id: If5a476e66681dde9f0b72f619d35ddf6255246ac