Page MenuHomePhabricator

Incorrect font used in color-coded 2017 Wikitext Editor
Open, Needs TriagePublic

Description

  • Browser: Google Chrome
  • Operating System: Windows 10 Pro

It appears that there is a problem of incorrect displaying of some (all for my Surface Pro) full-width punctuation in Wikitext. One of those that were affected across multiple devices I tried was the bullet symbol · is full-width when highlighted but half-width as displayed.

image.png (185×21 px, 1 KB)

For the above image, in fact, only {{·w} was highlighted. On some devices (example below is taken from my Surface Pro), this issue also affects basic full-width punctuations, e.g. the full-width periods and commas , where the characters are occupies more space than is displayed, thus experiencing major shifts in a full paragraph as shown below.
image.png (1,025×69 px, 62 KB)


Update: 2021-01-12
This bug or issue seems to be happening as there are different character widths/spacings with the fonts used for displaying the color-coded editor overlay(?) and the uncolored editor, and the color-coded editor seems to be unable to load the same font used for the uncolored editor as set in the preferences. I'm sure that I was able to see the font as there is a one-second gap after the black text loads before the coloring kicks in.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I couldn't reproduce this, it probably depends on which fonts you have installed.

Do you still see the issue when logged out, or on another device?

ppelberg added a project: Editing-team.
ppelberg moved this task from Untriaged to Freezer on the Editing-team board.

Yes, I did actually experience this on multiple devices, from desktop computers to computer tablets.

Anyways, I suppose it should actually force the use of a (common) fixed-width monospace font instead of somehow using weird fonts that mess things up?

It should be using the same font as the old wikitext editor. You can set it in preferences: Preferences → Editing → Edit area font style on en.wp, 参数设置 → 编辑 → 编辑区字体样式 on zh.wp.

It is actually not using monospace fonts as set in my preferences.

So... are there any ways to solve this problem?

Btw, in enwp, it does correctly use monospace fonts so that isn't a problem, but this problem exists in zhwp where it's not using monospace fonts as configured.

Thread bump and update: it seems to using the very same font for any configurations of edit tool font set in my preferences (on zhwiki), and in fact has a different character spacing causing the shift. Any idea what could fix this?

LuciferianThomas renamed this task from Incorrect display of full-width punctuation on 2017 Wikitext Editor to Incorrect font used in color-coded 2017 Wikitext Editor.Jan 11 2021, 11:55 PM
LuciferianThomas updated the task description. (Show Details)

@matmarex
I finally found out what exactly the problem is.
Using Traditional Chinese and Simplified Chinese as display language, the fonts used are also different.
When using Traditional Chinese (incl. Trad. Chinese (Taiwan), Trad. Chinese (Hong Kong), Trad. Chinese (Macao)) as display language on Chinese wikis, the editor first loads with the Simplified Chinese font by default and then the syntax highlight overlay uses the Traditional Chinese font. Since the two fonts have different character widths, the editor doesn't actually match with the overlay. I can also reproduce this even in Fandom which also supports syntax highlighting. Please check if you can reproduce this again using Traditional Chinese as the display language.