Bug 114746 - Improve CJK and CTL fonts setting in default Impress templates
Summary: Improve CJK and CTL fonts setting in default Impress templates
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:7.0.0 target:6.4.1
Keywords:
Depends on:
Blocks: CJK Templates PPTX RTL-UI
  Show dependency treegraph
 
Reported: 2017-12-29 06:49 UTC by Cheng-Chia Tseng
Modified: 2020-02-05 07:25 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The screenshot of the Font tab of the "Title" style in the first slide of the Progress template (66.36 KB, image/png)
2017-12-29 06:49 UTC, Cheng-Chia Tseng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cheng-Chia Tseng 2017-12-29 06:49:41 UTC
Created attachment 138729 [details]
The screenshot of the Font tab of the "Title" style in the first slide of the Progress template

Tested in Daily build (2017-12-28_10.01.02) and Chinese (traditional) locale (zh-tw).

The default templates of Impress provide poor default Asian fonts settings. 
Let's take the "Progress" template for example.

How reproducible: always
Reproduce Steps:
1. Install Daily Build and set the locale to Chinese (traditional) in Tools > Options > Language Settings > Language > Language Of "Locale setting" to "Chinese (traditional)" and enable Default Languages for Documents "Asain:" checkbox then seclect "Chinese (traditional)"
2. Press OK and restart
3. Open Impress and select any of the default templates, such as "Progress" for example here.

Actual Result of the styles in the first slide of the Progress template:
In the Font tab of the "Title" style:
    Western Text Font
    Family: Liberation Sans    Style: Bold    Size: 75

    Asian Text Font
    Family: 思源宋體    Style: Regular    Size: 24

In the Font tab of the "Outline 1" style:
    Western Text Font
    Family: Liberation Sans    Style: Regular    Size: 36

    Asian Text Font
    Family: 思源宋體    Style: Regular    Size: 24

Expected result:
1. Sans-serif font families should mapped to any 黑體/方體/ゴシック (Hei/Fung/Gothic typeface). In the case of zh-tw locale, it should map to the CJK_HEADING of zh-tw locale defined in VCL.xcu.
2. Serif font families should map to any 明體/宋體/明朝體 (Ming/Sung/Mincho typeface).  In the case of zh-tw locale, it should map to the CJK_TEXT of zh-tw locale defined in VCL.xcu.
3. The Asian Text Font "Style" and "Size" should be in coherent with Western Text Font Style and Size. If it is Bold and 75 points for Western Text, it is better to be the same for Asian Text. 

Bottom line:
Mostly all the templates have the problems on Asian Text Font Family, Style and Size. It is best to have a corresponding setting for each locale. If that cannot be done, just use the same generic font family (matchmaking for Sans and Serif fonts), the same style (Regular, Bold, etc.), and the same size.

PS. here is a brief view of the first candidate CJK font of zh-tw locale in VCL.xcu:
CJK_HEADING: 思源黑體 (Source Han Sans)
CJK_TEXT: 思源宋體 (Source Han Serif)
CJK_PRESENTATION: 思源黑體 (Source Han Sans)
CJK_SPREADSHEET: 思源黑體 (Source Han Sans)
Comment 1 Yousuf Philips (jay) (retired) 2017-12-29 10:49:47 UTC
(In reply to Cheng-Chia Tseng from comment #0)
> 1. Sans-serif font families should mapped to any 黑體/方體/ゴシック (Hei/Fung/Gothic
> typeface). In the case of zh-tw locale, it should map to the CJK_HEADING of
> zh-tw locale defined in VCL.xcu.
> 2. Serif font families should map to any 明體/宋體/明朝體 (Ming/Sung/Mincho
> typeface).  In the case of zh-tw locale, it should map to the CJK_TEXT of
> zh-tw locale defined in VCL.xcu.

All the impress templates use sans-serif fonts, so as no setting is defined in the template files, it should automatically pull the correct font based on VCL.xcu from CJK_PRESENTATION. But if a serif font is defined, i dont think there is a odf attribute that could be set that would cause LO to choose the correct font from VCL.xcu.

Maxim, Regina: thoughts?

> 3. The Asian Text Font "Style" and "Size" should be in coherent with Western
> Text Font Style and Size. If it is Bold and 75 points for Western Text, it
> is better to be the same for Asian Text. 

As the cjk and ctl font size and weight isnt defined in the tag, i would have expected that it would utilize the same settings used in latin, so this likely can be fixed in code, or alternatively we could add style:font-size-asian, style:font-weight-asian, style:font-size-complex, and style:font-weight-complex attributes.
Comment 2 Cheng-Chia Tseng 2017-12-29 11:05:28 UTC
>All the impress templates use sans-serif fonts, so as no setting is defined in the template files, it should automatically pull the correct font based on VCL.xcu from CJK_PRESENTATION. But if a serif font is defined, i dont think there is a odf attribute that could be set that would cause LO to choose the correct font from VCL.xcu.

Actually, I found the "Vintage" template of Impress using Liberation Serif. BTW, many templates shipped in other office suites (such as MS Office and Apple Keynote) also use Serif in some Impress templates. So we still have to take Serif into consideration.
Comment 3 Laurent BP 2017-12-29 11:18:53 UTC
"Progress" and some other Impress templates have been updated in 6.0.0 RC2
See https://bugs.documentfoundation.org/show_bug.cgi?id=103317#c26

Please check if sizes of Asian fonts are now correct.
Comment 4 Cheng-Chia Tseng 2017-12-29 11:32:55 UTC
(In reply to Laurent BP from comment #3)
> "Progress" and some other Impress templates have been updated in 6.0.0 RC2
> See https://bugs.documentfoundation.org/show_bug.cgi?id=103317#c26
> 
> Please check if sizes of Asian fonts are now correct.

This is tested in Daily build (2017-12-28_10.01.02). Not resolved yet.
Comment 5 Laurent BP 2017-12-29 13:08:06 UTC
(In reply to Yousuf Philips (jay) from comment #1)
> As the cjk and ctl font size and weight isnt defined in the tag, i would
> have expected that it would utilize the same settings used in latin, so this
> likely can be fixed in code, or alternatively we could add
> style:font-size-asian, style:font-weight-asian, style:font-size-complex, and
> style:font-weight-complex attributes.
Actually I removed all these tags, because I was expecting such behavior: use latin settings for size and weight with asian and complex.
This may be a different bug report.
Comment 6 QA Administrators 2018-12-30 03:47:19 UTC Comment hidden (obsolete)
Comment 7 nogajun 2019-10-02 07:21:44 UTC
Same as previous status on 6.4.0.0.alpha0+. (master~2019-09-28_15.31.38)

Verision:
バージョン: 6.4.0.0.alpha0+
Build ID: 66e45a1ae861d50edf65fed9e39c9c9d5b15e0ac
CPU threads: 8; OS:Linux 5.2; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-09-28_15:31:38
ロケール: ja-JP (ja_JP.UTF-8); UI-Language: ja-JP
Calc: threaded

This is a critical bug for CJK users.

Reproduce Steps:
Select Progress theme from theme selector.

then Title Fonts is
- English(USA): Liberation Sans / Bold /75pt
- Japanese: Noto Serif CJK JP / Normal / 24pt (Serif???)

The correct fonts is Noto Sans CJK JP(Sans) / Bold / 75pt.
Comment 8 Laurent BP 2019-10-02 16:26:02 UTC
Reset Version to earliest affected
Comment 9 Commit Notification 2019-10-21 20:52:09 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in Progress template

It will be available in 6.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.
Comment 10 Commit Notification 2019-11-14 18:14:55 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/457be5006ea029e872a04d1c4e55b450863804a0

tdf#114746 Restore asian and complex tags in Alizarin template

It will be available in 6.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 2019-11-14 18:15:02 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in Beehive template

It will be available in 6.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 12 Commit Notification 2019-11-14 18:16:58 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7b13f1efa835a90fd1c5554b70a62bf8e395a69f

tdf#114746 Restore asian and complex tags in Blue_Curve template

It will be available in 6.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 13 Commit Notification 2019-11-14 18:17:12 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in Blueprint_Plans template

It will be available in 6.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 14 Commit Notification 2019-11-14 18:17:20 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in BrightBlue template

It will be available in 6.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 15 Commit Notification 2019-11-14 18:17:30 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in Classy_Red template

It will be available in 6.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 16 Laurent BP 2019-12-30 13:52:22 UTC
Can somebody using Asian or complex UI test in LibO 6.4.0RC1 if Progress template has now better rendering with correct font sizes?
If it works for Progress template, I will extend this patch to other templates.
Comment 17 Hiunn-hué 2020-01-01 07:53:57 UTC
Env:
Version: 6.4.0.1
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: th-TH (zh_TW.UTF-8); UI-Language: en-US
Calc: threaded


Reproduce Steps:
  (1) Change the local setting.
  (2) Select the theme "Progress" from theme selector.
  (3) Open the font setting dialog for "Title".


Result: 
----------------------------------------------
If Local Setting is English (USA)
    Western Text Font: Libration Sans, Bold, 75pt
    Asian  Text  Font: DejaVu Sans, Bold, 75pt
    Complex Text Font: Noto Sans CJK TC, Bold, 75pt
----------------------------------------------
If Local Setting is Chinese (Trad)
    Western Text Font: Libration Sans, Bold, 75pt
    Asian  Text  Font: Noto Serif CJK TC, Bold, 75pt
    Complex Text Font: Noto Sans CJK TC, Bold, 75pt
----------------------------------------------
If Local Setting is Japanese
    Western Text Font: Libration Sans, Bold, 75pt
    Asian  Text  Font: Noto Serif CJK JP, Bold, 75pt
    Complex Text Font: TakaoPGothic, Bold, 75pt
----------------------------------------------
If Local Setting is Korean (RoK)
    Western Text Font: Libration Sans, Bold, 75pt
    Asian  Text  Font: Noto Serif CJK KR, Bold, 75pt
    Complex Text Font: Noto Sans CJK TC, Bold, 75pt
----------------------------------------------
If Local Setting is Thai
    Western Text Font: Libration Sans, Bold, 75pt
    Asian  Text  Font: Waree, Bold, 75pt
    Complex Text Font: Kinnari, Bold, 75pt
----------------------------------------------



Issues: 

  (1) Noto "Serif" CJK is used, which should be Noto "Sans" CJK.

  (2) Why a CJK font is used for CTL, when local is Western/CJK?

  (3) Regarding to Thai, "Kinnari" seems not a sans font?
Comment 18 Laurent BP 2020-01-01 17:10:06 UTC
@Hiunn-hé: thanks for your tests.
Size, style and weight are now forced to be the same. These properties can be defined inside XML code of templates. Modifications of templates are on the way.

Unfortunately, I don't know how to fix font changing for the issues you mentioned.
Comment 19 Commit Notification 2020-01-01 18:15:17 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114746 Restore asian and complex tags in templates

It will be available in 6.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 20 Commit Notification 2020-02-04 10:04:56 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/8c014938c523a4ee1bd8950781fe2a830b08cef1

tdf#114746 Restore asian and complex tags in Impress templates

It will be available in 6.4.1.

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.