Bug 166104 - All apostrophes change to Asian font when there is Asian text in the paragraph
Summary: All apostrophes change to Asian font when there is Asian text in the paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.1 rc
Hardware: All All
: medium minor
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.8.0 target:25.2.4.2
Keywords: regression
Depends on:
Blocks: Script-Assignment
  Show dependency treegraph
 
Reported: 2025-04-09 14:57 UTC by psaubro
Modified: 2025-06-12 13:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description psaubro 2025-04-09 14:57:15 UTC
Description:
When I mix roman alphabet-based language (French in my case) and Asian language (Japanese in my case) in the same paragraph, LibreOffice automatically changes all apostrophes in the paragraph to the font of the Asian text (MS Mincho in my case). This is annoying because Asian font apostrophes create a big blank. It is possible to change the font back to Liberation Serif, but you have to do it character by character.

Steps to Reproduce:
1. Write text with an apostrophe somewhere
2. In the same paragraph, add Japanese text
3. Press Enter

Actual Results:
All apostrophes in the paragraph turn to MS Mincho

Expected Results:
Apostrophes shouldn't automatically change font


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded
Comment 1 psaubro 2025-04-10 12:27:30 UTC
I should add that I've been using LibreOffice and mixing languages for years, but this bug has only started happening a month or two ago. I don't remember changing any of the settings of LibreOffice when it started; I think it was due to a software update.
Comment 2 meagan.eggert 2025-04-10 16:33:10 UTC
Version 25.2.1.2
Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49
CPU threads: 8; OS: Windows 11 x86_64
UI render: Skia/Raster; VCL: win
Locale: en-US; UI: en-US
Calc: threaded

Confirmed. I typed a paragraph in English, pasted in Japanese text, hit enter, and the apostrophes in the paragraph changed and spaced out.
Comment 3 psaubro 2025-04-11 10:56:36 UTC
Sorry for the multiple posts.
I went back to version 24.8.6.2 and can confirm the bug doesn't happen in this version of LibreOffice.
I think this is due to the fix for bug #66791 (https://bugs.documentfoundation.org/show_bug.cgi?id=66791), which has been implemented in version 25.2.
Comment 4 Ming Hua 2025-04-11 12:07:11 UTC
(In reply to psaubro from comment #3)
> I went back to version 24.8.6.2 and can confirm the bug doesn't happen in
> this version of LibreOffice.
> I think this is due to the fix for bug #66791
> (https://bugs.documentfoundation.org/show_bug.cgi?id=66791), which has been
> implemented in version 25.2.
Quite possible.

Jonathan, would you please have a look at this?
Comment 5 Saburo 2025-04-11 14:05:24 UTC
bisected
commit 73a96633d672f344f6415f050405b19174031f37
author	Jonathan Clark <jonathan@libreoffice.org>	Tue Dec 10 02:25:31 2024 -0700

tdf#66791 sw: Treat weak punctuation as Asian in Asian paragraphs

This change modifies script detection to treat certain weak punctuation
marks, particularly left- and right- quotation marks, as Asian script in
paragraphs containing Chinese and Japanese characters, but no Complex
characters. This change improves our script detection compatibility with
other programs.

As part of this change, duplicated script detection code has been
extracted from Writer and Edit Engine, and consolidated.

***
As stated in comment 3.

If you set the Western Languages ​​font to MS Mincho, single quotes will become full-width while you type.

This does not work unless you uncheck Replace single quotes in the localized options of AutoCorrect options.
Comment 6 Volga 2025-04-11 14:58:17 UTC Comment hidden (no-value)
Comment 7 Volga 2025-04-11 14:59:37 UTC
I've already seen that.

https://bugs.documentfoundation.org/show_bug.cgi?id=66791#c41
Comment 8 Jonathan Clark 2025-05-26 15:18:52 UTC
What I'm leaning towards:

- Change back to the previous lazy assignment for quotes
- Reopen bug 66791
- Approach fixing bug 66791 at proofing time via bug 166011 and bug 166012
Comment 9 Commit Notification 2025-05-29 15:15:37 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/86ffb108824d884320bde3320d58c8c497780099

tdf#166104 sw: Fix for apostrophes changing to Asian font

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2025-05-29 20:52:14 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/4955c78db541cc73ea85f0990562c78349400030

tdf#166104 sw: Fix for apostrophes changing to Asian font

It will be available in 25.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 psaubro 2025-05-30 11:51:03 UTC
It looks like the fix is working. Apostrophes do not change font even when I type Asian text in (although for some reason, I cannot use MS Mincho in this version, which is the font I was using when I reported the bug. Still I am using different fonts for Roman and Asian alphabet, so I guess it is working).
I hope I was using the right version to test it (LibreOfficeDev 25.2 uploaded today at 3:46 AM UTC).
Thank you for looking into this problem and solving it.
Comment 12 Commit Notification 2025-05-31 19:09:08 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-4":

https://git.libreoffice.org/core/commit/405d6ae59555a9769c0936a85240f2e2456d4b6c

tdf#166104 sw: Fix for apostrophes changing to Asian font

It will be available in 25.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.