Created attachment 177395 [details] test-localized-font-names.odt The attached file named "test-localized-font-name.odt" uses "思源黑体 CN" (i.e., localized font name of "Source Han Sans CN") in the 1st paragraph, and uses "思源宋体 CN" (i.e., localized font name of "Source Han Serif CN") in the 3rd paragraph. The font weights are set to normal. When open this document in a Simplified Chinese desktop environment (so that when open in LibreOffice the localized font names can be correctly recognized), the 1st and the 3rd paragraphs are shown as bold weight. Steps to Reproduce: 1. Make sure you have "Source Han Sans CN" and "Source Han Serif CN" fonts installed. (on Fedora system, the packages names should be: adobe-source-han-sans-cn-fonts and adobe-source-han-serif-cn-fonts) 2. Switch your operating system language (not your LibreOffice language) to Simplified Chinese, then open the attached "test-localized-font-name.odt". (Note: If you do not switch your system language to Chinese then when you open the file the fonts are shown as italic, indicating that the font is not found, although you have already installed the font) Current Result: The text in the 1st and the 3rd paragraphs are wrongly shown as bold weight. Expected Result: They should show as normal weight. I attach the (wrong) rendering result in this step as "test-localized-font-name.pdf". 3. As a comparison, now switch your system to English language, then open the file named "test-non-localized-font-name.odt". In this file, the 1st and the 3rd paragraphs uses "Source Han Sans CN" and ""Source Han Serif CN" fonts, respectively, which are identical to the localized names as in the file in step 2 above. --> The text in the 1st and the 3rd paragraphs are correctly shown as normal weight. I attach the (correct) rendering result in this step as "test-non-localized-font-name.pdf". Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: a6415004630c28ac4c0a64b83d8f0fd5c77a6a31 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: zh-CN (zh_CN.UTF-8); UI: en-US Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.4-CN Calc: threaded Fedora 34 and Fedora 35.
Created attachment 177396 [details] test-localized-font-name.pdf Rendering result of "test-localized-font-name.odt" in operating system of Simplified Chinese language.
Created attachment 177397 [details] test-non-localized-font-names.odt This should be open in a English system language for comparison.
Created attachment 177398 [details] test-non-localized-font-names.pdf Rendering result of the file "test-non-localized-font-names.odt" in an English language operating system. The text are correctly shown as non-bold for the 1st and 3rd paragraphs.
Bug already existed in Version: 6.0.0.0.alpha1+ Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
The impact of this bug is actually obvious, as we have set the localized font name "思源黑体 CN" as default font for zh-CN in: https://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/VCL.xcu This makes the default font to be bold when new document is created, thus the user need to manually change the font of default style every time a new doc is created.
Created attachment 179419 [details] screenshot showing the problem in Calc with default template
Kevin Suo committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/22c7ce6c8e7d5b7f8b37ad6c519c2b8ca4853724 UI Workaround for tdf#146653: change localized Source Han {Sans,Serif} CN... It will be available in 7.4.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.
Removing the "target" whiteboard as the fix in comment 7 is just a workaround and does not fix the root problem.
Fixed with 0b5e88bc88df6f0cd47e84cbd8bc53b649678f8b (bug 114192)
For the record, getting the localized font name now requires changing LO UI language not the system locale (at least on Linux).
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1e13ee5273848306cc6000d90e9f48593ea39bd8 Revert "UI Workaround for tdf#146653: change localized Source Han {Sans,Serif} It will be available in 24.2.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.