notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Starting comments double chars set as 1 char

Open
#14,952 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

Double slash are not rendered the same manner when used with UTF8 chars.

Steps to Reproduce the Issue

Use this code in a C-like language : C, C++, java

// $ 	U+0024 	010 0100 	00100100 	24
// £ 	U+00A3 	000 1010 0011 	11000010 10100011 	C2 A3
// И 	U+0418 	100 0001 1000 	11010000 10011000 	D0 98
// ह (Devanagari letter HA) 	U+0939 	0000 1001 0011 1001 	11100000 10100100 10111001 	E0 A4 B9
// € 	U+20AC 	0010 0000 1010 1100 	11100010 10000010 10101100 	E2 82 AC
// 한 	U+D55C 	1101 0101 0101 1100 	11101101 10010101 10011100 	ED 95 9C
// 𐍈 	U+10348 	0 0001 0000 0011 0100 1000 	11110000 10010000 10001101 10001000 	F0 90 8D 88
// Suppl Private Use Area B 	U+1096B3 	1 0000 1001 0110 1011 0011 	11110100 10001001 10011010 10110011 	F4 89 9A B3
// Mình nói tiếng Việt 𨉟呐㗂越, "I speak Vietnamese"

Expected Behavior

All start of lines shall take same width.

Actual Behavior

Some // are collapsed into one. Some are larger than others.

Using Cascadia semibold font, 11 point

image

L8, 9 and 11 : Display is different, because of ligature of "//". not a big issue. Still why some are "ligated" and others not is a mystery.

Using Cascadia Mono to avoid ligatures, L6 is still collapsing the "//" into one char.

image

Debug Information

Notepad++ v8.6.5 (64-bit)
Build time : Mar 29 2024 - 17:04:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "C:\Program Files\Notepad++\change.log"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : OFF
OS Name : Windows 10 Pro (64-bit
OS Version : 22H2
OS Build : 19045.4170
Current ANSI codepage : 1252 [still encoding of the file is set to UTF-8]
Plugins :
ComparePlugin (2.0.2)
JsonTools (5.6)
mimeTools (3.1)
nppAutoDetectIndent (2.3)
NppConverter (4.6)
NppExport (0.4)
PlantUmlViewer (1.6.0.10)
XMLTools (3.1.1.13)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the provided UTF-8 comment examples in Notepad++ using Cascadia Semibold and Cascadia Mono, comparing the lines with different-width // markers. Investigate the editor's comment rendering, Unicode-width, and font-ligature behavior; done means all line starts render consistently without unintended collapsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.