Last modified: 2013-09-15 20:04:41 UTC
Original bug title: Install and provide monospace fonts for all characters ---- Reproducing: Just paste ഉപയോക്താവിന്റെ അപ്ലോഡുകൾ into http://ace.c9.io/#nav=about or into a .js page at Wikimedia Commons. Expected result: Caret position and selection matches display. Actual result: Caret position and display do not match if the machine has no monospace font for that language available. If you copy & paste, you sometimes copy too much or not everything dependent on the character width of the underlaying font. This may be upstream issue https://github.com/ajaxorg/ace/issues/1121 // https://github.com/ajaxorg/ace/issues/460 *but* since MW has ULS and the like, this may be considered here.
Not all writing systems work in monospace; this simply isn't actionable. What you may actually want here is "fix CodeEditor to work with non-monospace characters". One possibility is switching to another widget that handles it already, eg bug 48826
The language you mentioned is Malayalam, one of the complex scripts. Complex scripts like Indian languages does not have the concept of monospaces because all glyphs are varying width, creates complex ligatures by combining multiple characters. To surprise you, you can place your caret in middle of a ligature too. It is just the nature of the script. You may read https://en.wikipedia.org/wiki/Complex_text_layout or related links. Thanks
(In reply to comment #2) Why did humans invent such horribly difficult writing systems :) anyway the monospace font wouldn't have to be correct for a native reader, just for a coder like me who can't read it anyway. It could be also represented by squares with charcode numbers; the status quo isn't good for administrators and coders.
(In reply to comment #1) Bug 48826 was known before Ace editor was activated by default on the cluster. You will have to reproduce the whole Ace-API if you are going to switch over to another editor. Folk is already starting to write documentation on their wikis. Whether Malayalam translations are correctly displayed as complex ligatures or not does not matter while coding or administrating.
The thing you're asking for remains impossible. closing.
(In reply to comment #5) Why is it impossible to represent one UTF-8 char by one symbol?
Characters have inherent properties such as combiningness and directionality; even if we devised a webfont I'm not sure we can easily override those. Let's investigate what it would take to modify Ace to either position the cursor correctly or show alternate behavior that would work this way: bug 54136
Rainer, I think you'll be pleased by my progress on bug 54136 comment 4. Can you try out the editor demo link there? Paste in some of those pages w/ the text that was causing trouble and see if it's working better for you. Let me know if it produces any surprises or JavaScript errors!