Page MenuHomePhabricator

[Migrated] Fullwidth characters in edit box are not really fullwidth
Open, LowPublic

Description

@Dinoguy1000 03:47, 8 June 2010 (UTC) wrote:

Fullwidth characters in the edit box are not actually given full width; any character to the right of a fullwidth character (including another fullwidth character) will slightly overlap its right side. This makes most CJK characters nearly unreadable from the overlap/runon.


Duplicate: Load any page with fullwidth characters
Site: English Wikipedia, Yugipedia
OS: Windows 7, Windows 10
Versions: 5.0.2.0, 5.0.3.0, 6.1.0.1
Edit-box fonts: Courier New, Consolas

Event Timeline

Josve05a raised the priority of this task from to Needs Triage.
Josve05a updated the task description. (Show Details)
Josve05a added a project: AutoWikiBrowser.
Josve05a added subscribers: Josve05a, Dinoguy1000.

@Rjwilmsi 22:24, 2 August 2010 (UTC) wrote:

Confirm, have seen this myself with Chinese/Japanese characters followed by a closing parenthesis – parenthesis not shown properly. Maybe a RichTextBox setting we need to adjust.

Yinweichen (talk) 17:12, 7 March 2014 (UTC) wrote:

The problem still has not been fixed. I cannot imagine that this could be difficult.

So I had a play around with this and noticed that the issue seems to be with this line, it seems to work if I set the font to something like "SimSun" (or if I remove the line entirely). I don't know if there was a compelling reason for using that font over whatever the default is?

So I had a play around with this and noticed that the issue seems to be with this line, it seems to work if I set the font to something like "SimSun" (or if I remove the line entirely). I don't know if there was a compelling reason for using that font over whatever the default is?

It's been like that over 13 years - https://github.com/reedy/AutoWikiBrowser/blame/d02a2859d49e10656d152f4b8dfe320ac3141fe3/AWB/Main.Designer.cs#L1813

I'd have to have a play (not got windows and VS on my laptop atm) to see if it's set as default etc. But with the change in .NET versions, bumps in VS etc, it probably doesn't match up with how things are now

We can probably remove it

Don't we have a font option for this somewhere?

Don't we have a font option for this somewhere?

Have just checked, yeah this seems to fix/break the issue depending on the font, so that's a workaround.

I created a new blank project with a RichTextBox (not the subclass used in AWB) and this has

this.richTextBox1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

as the default so one would guess that's where it's coming from. Although I noticed that the issue doesn't seem to happen here, so it's presumably an issue with the subclass ArticleTextBox. I will try to experiment a little more tomorrow

It seems that if [this line|https://github.com/reedy/AutoWikiBrowser/blob/39e89bf1b805ee1f985f3854b414f52298b7e729/WikiFunctions/Controls/ArticleTextBox.cs#L35] is removed that also fixes the issue, maybe it either wants removing or wants combining with something else e.g. AutoFontSizeAdjust