Last modified: 2014-03-07 11:44:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53662, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51662 - Define CSS classes for scripts with web fonts
Define CSS classes for scripts with web fonts
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-19 08:22 UTC by Michael M.
Modified: 2014-03-07 11:44 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2013-07-19 08:22:47 UTC
It would be useful if ULS could provide CSS definitions like

.script-buginese {
 font-family: Saweri, sans-serif;
}

Currently one has to use a lang="bug" on the element, but this isn't ideal from a semantical point of view, as the Buginese script isn't used to only write Buginese language, but also for some other languages. So in an article about the script it isn't correct to add language attributes. With such classes authors could easily tell ULS to embed the fonts to display the characters to all users.
Comment 1 Siebrand Mazeland 2013-07-19 10:16:09 UTC
i think this satisfies your requirement. It's documented on [[mw:Extension:Universal_Language_Selector#Alternate_ways_to_load_fonts]]:

Alternate ways to load fonts, By specifying font-family

Inside the wiki text <span style="font-family:'YourFontName';">YourText</span>, webfonts extension will check whether the font is available with the extension, if so it will download it to the client.
Comment 2 Michael M. 2013-07-19 10:40:01 UTC
There are some advantages the classes have:

* They are more descriptive. <span class="script-buginese">some text</span> is more obvious than <span style="font-family: Saweri, sans-serif;">some text</span>. You had to look up the exact font names in the documentation, while you could use classes without doing so (if you know the English name of the script).
* They are shorter.
* Classes can be used in advance, even if there is currently no font for the script. Then it will work once a font is added to ULS.
* Users can override the fonts in their common.css if they have a font installed for a script they like better.
Comment 3 Niklas Laxström 2013-07-29 13:43:43 UTC
Isn't the wiki way to write a template ala {{script-buginese|Text goes here}}? That way the communities themselves can also decide which font they want to use without us dictating it.

In my opinion adding such classes to ULS would entail quite a maintenance burden.
Comment 4 Michael M. 2013-07-30 08:20:43 UTC
(In reply to comment #3)
> In my opinion adding such classes to ULS would entail quite a maintenance
> burden.

Somebody has to maintain the classes/templates/whatever, to keep them up to date with the fonts provided by ULS. I don't see a reason why this maintenance should be done by the single wiki communities. When you add, change or remove a font from ULS, you have to update the central config files and automatically re-build the others anyway, so why shouldn't there be a file with CSS definitions like above which is updated along with these files?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links