Page MenuHomePhabricator

CodeEditor must force use of fixed width size font even with some some customized CSS
Open, MediumPublic

Description

Author: nzmoihue

Description:
not fixed size font

On http://commons.wikimedia.org/w/index.php?title=Module:Bananas&action=edit&uselang=fa CodeEditor should use fixed size font even with available some customized font configuration (see http://commons.wikimedia.org/wiki/MediaWiki:Common.css Persian specific customization) otherwise it will be unusable for editing.


Version: unspecified
Severity: normal

Attached:

not_fixed_size_font.png (428×734 px, 22 KB)

Details

Reference
bz56484

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:30 AM
bzimport added a project: CodeEditor.
bzimport set Reference to bz56484.
bzimport added a subscriber: Unknown Object (MLST).

I wonder whether that font declaration in Common.css still required -- is ULS already able to handle that?

nzmoihue wrote:

That is because Persian Wikipedia community wanted use the non-free font; That is long discussion and Persian users consensus was using the non-free Tahoma as first font on Windows users (long story short, because Tahoma is highly used across Persian sites and web embedded fonts having problem on rendering as they have not hinting imformation). And Persian users on other wikis http://www.wikidata.org/wiki/MediaWiki_talk:Common.css#farsi_font http://meta.wikimedia.org/wiki/MediaWiki:Common.css also wanted the same configuration with Persian Wikipedia for other wikis.

I think the main point here is CodeEditor should declare a monospace for itself, like the normal editor is doing in the same situation.

(In reply to comment #2)

I think the main point here is CodeEditor should declare a monospace for
itself, like the normal editor is doing in the same situation.

One fault in CodeEditor is that it doesn't declare the page language (which is set to English in Scribunto) to the browser. When its language attribute is correctly set to English, this issue disappears.

I'm not sure whether the normal editor explicitly set a monospace font, and I remember I saw some wiki edit boxes not using some monospace fonts. Further more, does every language / script have the concept of "monospace"?

nzmoihue wrote:

I agree but normal editor as using <textedior> with unmodified preference have
textarea {

font-family: monospace;

} (via useragent stylesheet of-course)

nzmoihue wrote:

I converted :lang(fa) to html[lang=fa] body, [lang=fa] on Wikidata and Wikimedia Commons to temporary solve the CodeEditor bug.