Bug 63011 - FORMATTING: Chinese font name in English not recognized
Summary: FORMATTING: Chinese font name in English not recognized
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:26.8.0 inReleaseNotes:26.8
Keywords:
: 80812 81964 107484 (view as bug list)
Depends on:
Blocks: CJK Font-Substitution
  Show dependency treegraph
 
Reported: 2013-04-02 03:00 UTC by webofht-libreofficebugs002
Modified: 2026-04-07 15:20 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
File saved on Debian Linux (23.51 KB, application/vnd.oasis.opendocument.text)
2013-04-02 03:01 UTC, webofht-libreofficebugs002
Details
File saved on Windows (16.05 KB, application/vnd.oasis.opendocument.text)
2013-04-02 03:01 UTC, webofht-libreofficebugs002
Details
Windows Registery items (2.60 KB, text/x-ms-regedit)
2017-10-09 07:32 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description webofht-libreofficebugs002 2013-04-02 03:00:09 UTC
Problem description: Chinese font names appear in English, for example the font TW-Kai (called 全字庫正楷體 in Chinese), on Debian Linux. Chinese font names appear in Chinese on Windows. 全字庫正楷體 appears as 全字庫正楷體 on Windows. Save a file with the font name TW-Kai on Debian Linux. Then, this font is _not_ recognized on Windows. (Save a file with the font name 全字庫正楷體. Then, this font is _recognized_ on Debian Linux.)

Steps to reproduce:
1. The operating system used is Linux debian 2.6.32-5-686 #1 SMP Mon Feb 25 01:04:36 UTC 2013 i686 GNU/Linux.
2. The LibreOffice version involved is:
Version 4.0.2.2 (Build ID:4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
3. Type and select some Chinese text. 
4. Select the font TW-Kai on Debian Linux. (The font name 全字庫正楷體 is missing.)
5. File -> Save
6. Open the file on Windows (having installed the font mentioned)
7. The font mentioned is _not_ recognized.

Compare:
1. Type and select some Chinese text on Windows.
2. Select the font 全字庫正楷體 on Windows. (The font name TW-Kai is missing.)
3. File -> Save
4. Open the file on Debian Linux (having installed the font mentioned)
5. The font mentioned is _recognized_.

Current behavior: LibreOffice on Windows does not recognized the Chinese font name in English in the sample Linux file. 

Expected behavior: LibreOffice on Windows should recognize the Chinese font name in English in the sample Linux file.

Related:
https://bugs.freedesktop.org/show_bug.cgi?id=59055
Comment 1 webofht-libreofficebugs002 2013-04-02 03:01:24 UTC
Created attachment 77296 [details]
File saved on Debian Linux
Comment 2 webofht-libreofficebugs002 2013-04-02 03:01:51 UTC
Created attachment 77297 [details]
File saved on Windows
Comment 3 webofht-libreofficebugs002 2014-02-02 02:11:09 UTC
Confirm the same issue. In addition, all Chinese font names are affected, i.e. Chinese font names are shown in English in the Font Name list.

Chinese font names in English are treated as different fonts.

Chinese font names in English are not the same as Chinese font names in Chinese.

---
LibreOffice Version: 4.2.0.4
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 4 Yousuf Philips (jay) (retired) 2014-06-25 01:35:46 UTC
I tried this with 4.0.6 and 4.2.5 on Linux Mint and wasnt able to reproduce this using text pulled from < http://zh.wikipedia.org/wiki/LibreOffice > and pasted without formatting and then setting them to the Simsun font and then loading them in LibO on Windows 7. Can you please try a newer version of LibreOffice and see if this still happens.

There is a chinese forum for LibreOffice users that recently started and i thought you might be interested in checking it out < http://libreofficechina.org/forum.php >
Comment 5 Adolfo Jayme Barrientos 2014-07-31 16:47:40 UTC
*** Bug 81964 has been marked as a duplicate of this bug. ***
Comment 6 QA Administrators 2015-02-19 04:34:49 UTC Comment hidden (obsolete)
Comment 7 Mabin 2015-03-04 09:58:09 UTC
What more information do you have?

All multilingual names of font is contained in each font file.
Comment 8 Yousuf Philips (jay) (retired) 2015-03-04 10:01:33 UTC
@Kevin, @Matthew: can you guys have a look at this one.
Comment 9 Matthew Francis 2015-04-26 03:54:59 UTC
The result for attachment 77297 [details] is the same on both Linux and OSX - the "全字庫正楷體" font shows in the font selector as having been substituted (italic text)
(On Linux it looks to me as though the correct font has actually been used, but the interface still indicates substitution, so I'm not sure if this was intentional or just because it was an available Chinese font)


To reproduce on Windows you would need to install the font in question. I can't see it through the original link, but it is available here:

http://file.magiclen.org/index.php?file=54572d4b61692e726172
(click the large link and wait)


On the basis that for interoperability between users with different languages, we should really recognise all the font names defined in a font, setting -> NEW
Comment 10 Dan Weiss 2015-06-18 16:05:01 UTC
This is not just for Chinese fonts, it affects any font that changes name based on your system locale, such as Japanese fonts.

Calls to CreateFont on Windows will always accept the English name of any font, but the actual font name that you see in font dialogs and such will often be the localized name instead of the English name.  It depends on the system's locale settings.

LibreOffice should always allow the English name, just like Windows itself does.  Given an English font name, it's not very hard to use a few Win32 API calls to get its localized name.

I was testing out LibreOffice on Japanese locale.  The major fonts are MS Gothic and MS Mincho, spelled "MS ゴシック" or "MS 明朝" when using Japanese locale.  I was unable to type "MS Gothic" into the font selector, since it changed the ASCII characters into fullwidth characters as I was typing.  But I was able to copy-paste that font name in.  Even though it says that the font name is unrecognized, it still displayed using that font, probably since the Windows font mapper always recognizes the English font names.
Comment 11 ftj 2015-10-25 14:43:19 UTC
I also encounter the same problem.My system is windows 10 English version, Chinese locale,current language for non-Unicode programs:Chinese(Simplified, China). In the font drop down list the Chinese font names are blank,and only the Symbol preview is shown.
Comment 12 ftj 2015-10-25 14:59:06 UTC
Sorry, I have LibreOffice 5.0.2.2 installed.
Comment 13 QA Administrators 2016-11-08 11:53:32 UTC Comment hidden (obsolete)
Comment 14 Volga 2017-10-09 07:32:40 UTC
Created attachment 136859 [details]
Windows Registery items

(In reply to ftj from comment #11)
> I also encounter the same problem.My system is windows 10 English version,
> Chinese locale,current language for non-Unicode programs:Chinese(Simplified,
> China). In the font drop down list the Chinese font names are blank,and only
> the Symbol preview is shown.

Windows Registery has the following path for this, LibreOffice can add codes to load font from here to specified fallback fonts if a document including non-English font names: 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapperFamilyFallback
Comment 15 QA Administrators 2018-10-14 02:57:43 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2020-10-14 04:30:36 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2024-04-11 03:13:29 UTC Comment hidden (obsolete)
Comment 18 Khaled Hosny 2026-03-15 02:17:45 UTC
*** Bug 107484 has been marked as a duplicate of this bug. ***
Comment 19 Khaled Hosny 2026-03-15 02:18:00 UTC
*** Bug 80812 has been marked as a duplicate of this bug. ***
Comment 20 Commit Notification 2026-03-20 02:26:30 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5257ad4ec11bafcc2765ef5bb3e8cfb37ac7742c

tdf#63011 vcl: Use localized font family names as aliases

It will be available in 26.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 21 Jonathan Clark 2026-03-20 15:16:41 UTC
LibreOffice now understands font names from other languages, in addition to the current UI language. We handle this ourselves, so it will work the same way on all platforms.

The GUI also no longer says these fonts are substituted.
Comment 22 Jonathan Clark 2026-03-20 15:18:33 UTC
*** Bug 170319 has been marked as a duplicate of this bug. ***
Comment 23 Jonathan Clark 2026-03-20 15:21:40 UTC
*** Bug 154571 has been marked as a duplicate of this bug. ***
Comment 24 Commit Notification 2026-04-04 13:40:10 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3b43be508d5f2ac1bd76051924e960c0be9bfafd

Revert "tdf#63011 vcl: Use localized font family names as aliases"

It will be available in 26.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 25 Volga 2026-04-05 08:28:42 UTC
I think this should queries font names from font files, rather than calling system APIs. For OpenType fonts, these could be retrieved from 'name' table. 

https://learn.microsoft.com/en-us/typography/opentype/spec/name
Comment 26 Jonathan Clark 2026-04-06 15:52:05 UTC
(In reply to Commit Notification from comment #24)
> Xisco Fauli committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 3b43be508d5f2ac1bd76051924e960c0be9bfafd
> 
> Revert "tdf#63011 vcl: Use localized font family names as aliases"
> 
> It will be available in 26.8.0.

Reopening due to revert.
Comment 27 Commit Notification 2026-04-07 15:19:47 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c93a99c3a14af276f9e43cd0bd68be89fd3e3db8

Reapply "tdf#63011 vcl: Use localized font family names as aliases"

It will be available in 26.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 28 Jonathan Clark 2026-04-07 15:20:51 UTC
The Windows CI build took 54 minutes to run with this new version, so the build time regression seems to be resolved.