Bug 161804 - Full-width list numbering incorrectly uses Latin digits for lines beginning with Latin characters
Summary: Full-width list numbering incorrectly uses Latin digits for lines beginning w...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2024-06-27 03:26 UTC by jun meguro
Modified: 2024-07-23 08:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample document (12.18 KB, application/vnd.oasis.opendocument.text)
2024-06-27 03:26 UTC, jun meguro
Details
Screen shot of symbol preview in dialogue (64.20 KB, image/png)
2024-06-27 03:28 UTC, jun meguro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jun meguro 2024-06-27 03:26:49 UTC
Created attachment 194992 [details]
sample document

Open new writer document
Make number list as below
1.あああ
2.いいい
3.ううう

Set symbols of list to Multibyte number "1,2,3..."
1.あああ
2.いいい
3.ううう

When inserting singlebyte alphanumeric characters at the beginning of the list content, the digits of the symbols become single-byte characters.(See a sample document)
1.1あああ
2.いいい
3.aううう

And,It is unclear if it is the same issue, but the symbols in the numbered list settings dialog also appear to be half-width digits.(See a screen shot)
Comment 1 jun meguro 2024-06-27 03:28:09 UTC
Created attachment 194993 [details]
Screen shot of symbol preview in dialogue
Comment 2 Stéphane Guillou (stragu) 2024-07-12 04:14:24 UTC
What I see in the attachment:

1. Place cursor before number 4: the font is 游明朝 (I don't have it, so is substituted by something else), which is the Asian font of the "Numbering Symbol" character style used in Format > Bullets and Numbering > Customize.
2. Place the cursor at the beginning of item's text (i.e. before "えええ")
3. Type some English character e.g. "a"

Result: The numbering font for this item (4) switches to Alef, which is the Western font for the "Numbering Symbol" character style.

4. Type Japanese again at the beginning of the line

Result: numbering font reverts back to character style's Asian font.

Can you please confirm that this is the issue you describe?
Comment 3 Ming Hua 2024-07-12 06:24:37 UTC
I am not the bug reporter but here are my two cents as a CJK user:

(In reply to Stéphane Guillou (stragu) from comment #2)
> Can you please confirm that this is the issue you describe?
The fundamental issue is not changes of fonts between western ones and Asian ones, but the characters used for the list numbering.

1, 2, 3, ... are the ordinary digits, Unicode 0x0030 to 0x0039.

1, 2, 3, ... are so-called "full-width" [1] digits used by CJK encodings, Unicode 0xFF10 to 0xFF19.

Most CJK fonts have both sets of characters, and the second set are usually much wider than the first set, to match the width of kanji/hanzi/Han characters.

I can more or less reproduce the report, as the list numbering switches between the half-width and full-width (the reporter call them single-byte and multi-byte in the original report) sets when I explicitly choose the full-width numbering, and type half-width digits or latin letters immediately after the numbering.

You can set both the western font and the Asian font of the document as a single CJK font (the open source Noto Sans CJK / Source Han Sans will do) and see the difference more clearly.

1. https://help.libreoffice.org/latest/en-US/text/shared/00/00000005.html?DbPAR=SHARED#bm_id911622865848718
Comment 4 Stéphane Guillou (stragu) 2024-07-23 03:09:18 UTC
Thanks for the explanation.
I'll let Jonathan help with this one as I'm out of my depth.
Comment 5 Jonathan Clark 2024-07-23 08:45:36 UTC
I was able to reproduce the issue. I've also manually verified that Unicode DIGITs are used instead of the intended FULLWIDTH DIGITs when the line starts with a Latin character.

Besides aesthetic concerns, I think we shouldn't overrule a user who has explicitly chosen the full-width number format. We already have the "Native Numbering" format for users who do want numbering to be reactive to the following text, and among the rest this seems like an outlier. We don't perform this conversion for any of the ideographic, RTL, or CTL formats, for example; it's only this one.

I'm not certain, but from briefly looking at the code I also suspect this behavior isn't intentional.

Based on the above, I'm confirming this bug.