Bug 147246 - Draw (PDF import) - Asian Text Font do not load correctly
Summary: Draw (PDF import) - Asian Text Font do not load correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.3.0.3 release
Hardware: All All
: medium normal
Assignee: Kevin Suo
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks: CJK PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2022-02-07 11:49 UTC by JO3EMC
Modified: 2022-12-11 14:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file to reproduce (31.98 KB, application/pdf)
2022-02-07 11:53 UTC, JO3EMC
Details
Screenshot: Font setting status of Character dialog (233.76 KB, image/png)
2022-02-07 11:58 UTC, JO3EMC
Details
Sample odt file created by Writer (10.83 KB, application/vnd.oasis.opendocument.text)
2022-02-08 14:49 UTC, Shinji Enoki
Details
File exported to PDF with Writer (11.53 KB, application/pdf)
2022-02-08 14:51 UTC, Shinji Enoki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JO3EMC 2022-02-07 11:49:01 UTC
Description:
When I open a PDF file, the Japanese font settings are not loaded.

Steps to Reproduce:
1.Enable "Asian" Language in Options.
  It will be easier to understand if the "CTL" language is also enabled, I think.
2.Open a PDF file containing a Japanese string with fonts in LibreOffice (usually we would open it in Draw).
  I will attach a sample file later.
3.Compare the part of the Japanese character string with the original PDF file.



Actual Results:
The font is different only in the Japanese character string part.

Expected Results:
As with Wetern, I expect the original font settings to be loaded.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL

This issue is reported as 7.3.0, but the situation is similar in earlier versions such as: 7.2.5, 7.1.8, 7.0.6, 6.4.7, 5.4.7, 4.4.7

If you check the font setting of the corresponding part in the Character dialog, you can see that only "Asian Text Font" is set to the same font as that of "Default Drawing Style".
Comment 1 JO3EMC 2022-02-07 11:53:26 UTC
Created attachment 178113 [details]
Sample file to reproduce
Comment 2 JO3EMC 2022-02-07 11:58:27 UTC
Created attachment 178114 [details]
Screenshot: Font setting status of Character dialog
Comment 3 JO3EMC 2022-02-07 11:59:45 UTC
Sample file is created by Writer 7.3.0.3.
Comment 4 Shinji Enoki 2022-02-08 14:45:14 UTC
I reproduced it with the following steps:

1. Start Writer
2. Enter Japanese and English strings to change the font from the default.
    For example, set both "Western Text Font" and "Asian Text Font" as "Noto Sans CJK JP" in Default Paragraph Style.
3. Export to PDF in Writer
4. Open the PDF file in step 3 in Draw
5. Check the font of the string

The font of the Japanese strings are "Noto Serif CJK JP", and the English strings are "Noto Sans CJKjp-Regular-VKana".

I expected  "Noto Sans CJK JP".

In Evince 41.3, it seems to be displayed in the font of "Noto Sans CJK JP".


Reproduced environment:
Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

It was reproduced even in the old version:
(The oldest version on my PC right now)
Version: 6.2.0.1
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU threads: 8; OS:Linux 5.15; UI render: default; VCL: gtk3; 
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 5 Shinji Enoki 2022-02-08 14:49:19 UTC
Created attachment 178143 [details]
Sample odt file created by Writer

Changing from the default font
Comment 6 Shinji Enoki 2022-02-08 14:51:41 UTC
Created attachment 178144 [details]
File exported to PDF with Writer
Comment 7 JO3EMC 2022-04-06 10:29:00 UTC
It is ongoing in 7.3.2 and 7.4.0a0.
For Asian language users, the value of the PDF import function is greatly undermined.
I hope that a programmer who can handle this matter will appear.


Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: a3b141624930b6eb96b3273fee8396476db6d116
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 8 Commit Notification 2022-12-03 14:07:57 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "master":

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

tdf#147246 sdext.pdfimport: "font-family-asia" -> "font-family-asian"

It will be available in 7.5.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 9 Commit Notification 2022-12-03 16:13:21 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#147246 sdext.pdfimport: "font-family-asia" -> "font-family-asian"

It will be available in 7.4.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.
Comment 10 Commit Notification 2022-12-04 14:56:55 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/00bf67a99dcdb1549401f0b656e872e5c9762dc5

tdf#147246 sdext: font name returned by font descriptor may be...

It will be available in 7.5.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 11 Commit Notification 2022-12-05 01:06:52 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/5aa8378eab3a05fdeee2cbe1056836dee4207b6e

tdf#147246 sdext: font name returned by font descriptor may be...

It will be available in 7.4.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.
Comment 12 Kevin Suo 2022-12-05 02:03:46 UTC
Fixed on master and 7.4 branch now. Would someone help to test with a daily build.

The issue, that the font is shown as "NotoSansCJKjp" (i.e. postscript name) rather than "Noto Sans CJK JP" (i.e. font family name), is tracked in bug 143095.
Comment 13 JO3EMC 2022-12-11 14:00:49 UTC
I have confirmed that the issue that only Asian has different fonts from other language groups has been corrected in the daily builds of 7.5.0.0.alpha1 and 7.4.4.0.0.
I understood that the bug 143095 issue remains. Sounds difficult.
Thank you for your efforts.