Bug 142667 - Impress CJK font fallback refers to the wrong font list
Summary: Impress CJK font fallback refers to the wrong font list
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK Templates 114746
  Show dependency treegraph
 
Reported: 2021-06-05 07:00 UTC by Jun Nogata
Modified: 2023-07-13 03:14 UTC (History)
3 users (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 Jun Nogata 2021-06-05 07:00:29 UTC
Description:
Impress CJK font fallback refers to CJK_TEXT not CJK_PRESENTATION in VCL.xcu.

Steps to Reproduce:
Requirements.
* Create a new profile.
* Use CJK (Chinese, Japanese, Korean) locale. (I tested in Japanese locale)


1. start Impress
2. select "Blueprints Plan" from Templates 
3. Make sure the "クリックしてタイトルを追加 (Click to add title)" in the Blueprints Plan template is in Mincho font. 
4. go to Tools -> Options and LibreOffice -> Advanced, Push "Open Expert Configuration" button.
5. search for "cjk_text"
6. double-click CJK_TEXT (org.openoffice.VCL:LocalizedDefaultFants) of the CJK language you are using to open it
  In my test, I selected org.openoffice.VCL:LocalizedDefaultFants['ja'] because it is a Japanese environment.
7. add the Gothic font name to the beginning of the value, separated by a ; character.For example, "Noto Sans CJK JP".

  Before(ja): Noto Serif JP; Noto Serif CJK JP;游明朝;MS 明朝;MS P明朝;ヒラギノ明朝 ProN;ヒラギノ明朝 Pro;IPA 明朝;IPA P明朝;Mincho;Serif
  After(ja): Noto Sans CJK JP;Noto Serif JP; Noto Serif CJK JP;游明朝;MS 明朝;MS P明朝;ヒラギノ明朝 ProN;ヒラギノ明朝 Pro;IPA 明朝;IPA P明朝;Mincho;Serif

8. close the options disalog and exit Impress
9. start Impress with the same profile
10. Select Blueprints Plan from Template (same as 2)



Actual Results:
The "クリックしてタイトルを追加 (Click to add title)" in the Blueprints Plan template changes to the gothic font you set.

Expected Results:
It refers to CJK_PRESENTATION, so there is no change in the font. It is gothic from the first state and remains gothic even if you change it.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 1 Julien Nabet 2021-06-05 17:56:12 UTC
I don't succeed in reproducing this because I got no Mincho font and don't know which fonts package to use.
In Debian searching Mincho, I got:
julien@debianamd:~/lo/libreoffice$ apt-cache search mincho
fonts-ipaexfont - fontes japonaises OpenType, toutes les fontes IPAex
fonts-ipafont - jeu de fontes japonaises OpenType, toutes des fontes IPA
fonts-takao - ensemble de fontes TrueType japonaises, fontes Takao
xfonts-kappa20 - Polices X11 20 points Kappa (ISO-8859-1..4/9/10/13..16, japonais) avec polices grasses
fonts-dejima-mincho - antique-looking Japanese TrueType Mincho font
fonts-hanazono - Japanese TrueType mincho font by KAGE system and FontForge
fonts-horai-umefont - Japanese TrueType font, Ume-font
fonts-ipaexfont-mincho - Japanese OpenType font, IPAex Mincho Font
fonts-ipafont-mincho - Japanese OpenType font set, IPA Mincho and IPA P Mincho Fonts
fonts-ipamj-mincho - Japanese OpenType font, IPAmj Mincho Font
fonts-misaki - Japanese Gothic and Mincho font from "Misaki" bitmap font
fonts-oradano-mincho-gsrr - Retro style (Meiji period) Japanese font
fonts-sawarabi-mincho - Japanese mincho font - Sawarabi Mincho font
fonts-takao-gothic - Japanese TrueType font set, Takao Gothic Fonts
fonts-takao-mincho - Japanese TrueType font set, Takao Mincho Fonts
fonts-umeplus-cl - Japanese TrueType font, based on Ume Gothic Classic and M+ fonts
latex-cjk-japanese-wadalab - type1 and tfm DNP Japanese fonts for latex-cjk
xfonts-ayu - Gothic 18/20 dot Japanese and ISO-8859-1 X11 bitmap fonts

Anyway, I compared the result of:
git grep -n CJK_PRESENTATION
and
git grep -n CJK_TEXT

I noticed this line:
sd/source/ui/presenter/PresenterTextView.cxx:236:            DefaultFontType::CJK_TEXT,   EE_CHAR_FONTINFO_CJK },
since it's "sd" part, just wonder if it shouldn't be CJK_PRESENTATION here.


(remark: I noticed the same with CTL_PRESENTATION and CTL_TEXT)
Comment 2 Jun Nogata 2021-06-07 15:45:27 UTC
(In reply to Julien Nabet from comment #1)
> I don't succeed in reproducing this because I got no Mincho font and don't
> know which fonts package to use.

For the Mincho font package, use fonts-noto-cjk or fonts-ipaexfont-mincho. This is a popular font for Japanese.

> I noticed this line:
> sd/source/ui/presenter/PresenterTextView.cxx:236:           
> DefaultFontType::CJK_TEXT,   EE_CHAR_FONTINFO_CJK },
> since it's "sd" part, just wonder if it shouldn't be CJK_PRESENTATION here.

Thanks for the advice. I changed that part and built it, but it seems to be different.

I searched for it with git grep CJK_TEXT, and found svx/source/svdraw/svdmodel.cxx:639. I changed CJK_TEXT to CJK_PRESENTATION in that line, and it fell back to Gothic.
Comment 3 Buovjaga 2022-12-13 12:43:44 UTC
(In reply to Jun Nogata from comment #0)
> 3. Make sure the "クリックしてタイトルを追加 (Click to add title)" in the Blueprints Plan
> template is in Mincho font. 

I don't understand this step. Do I have to modify the template file before creating a new document from the template? I did not do this. Instead, I created a new file from the template, edited the master slide and changed the character formatting to be IPAexMincho. I followed the rest of the steps, finally reopening my saved file and the font was still IPAexMincho.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fa5cc6c6e7ce89d6d9972d8ad2f9469b9bd5bf9a
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 13 December 2022

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 4 QA Administrators 2023-06-12 03:11:34 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2023-07-13 03:14:05 UTC
Dear Jun Nogata,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp