Bug 115970 - Set default font size for CJK/Western text fonts as locale value
Summary: Set default font size for CJK/Western text fonts as locale value
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: easyHack, needsDevAdvice
: 116174 (view as bug list)
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2018-02-23 15:29 UTC by Volga
Modified: 2018-07-07 07:42 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Western,Asia,CTL text font size (51.68 KB, image/png)
2018-02-27 01:14 UTC, Junichi Matsukawa
Details
Microsoft Word 2010's Font dialog (zh-cn) (17.54 KB, image/png)
2018-06-08 09:59 UTC, Volga
Details
Microsoft Word 2006's Font dialog (zh-cn) (17.54 KB, image/png)
2018-06-08 10:07 UTC, Volga
Details
WPS Office Writer 2016's Font dialog (zh-cn) (15.07 KB, image/png)
2018-06-12 02:13 UTC, Volga
Details
Tools > Options > Basic Font (CTL) after the patch (89.45 KB, image/png)
2018-06-13 09:51 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2018-02-23 15:29:32 UTC
Description:
in Tools ▸ Options ▸ Writer ▸ Basic Fonts (Western) ▸ Default, the font size should be default to 10.5 for Chinese and 12 for all other locales, this would keep consistency for Basic Fonts (Asian). Since you have already made localized settings for Tab stops, this localized values becomes necessary.

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Heiko Tietze 2018-02-24 09:47:27 UTC
Do you have proof that 10.5 is the default for CTL fonts (presumably we do not talk about Chinese only)?
Comment 2 Volga 2018-02-24 10:53:38 UTC
(In reply to Heiko Tietze from comment #1)
> Do you have proof that 10.5 is the default for CTL fonts (presumably we do
> not talk about Chinese only)?

Oh no. I was totally forgot CTL fonts, if you want 10.5 to be the default for CTL fonts, this should be also localized for Chinese locales.
Comment 3 Heiko Tietze 2018-02-24 11:18:08 UTC
Again, why do you request exactly 10.5. Is there a standard to comply with?
Comment 4 Cheng-Chia Tseng 2018-02-25 12:42:42 UTC
FYI, please see page 17-23 of this slide to understand the Typographic Scale Convention in Taiwan, Japan and China.

https://libocon.org/assets/Conference/Rome/Slides/2017-10-11-CJK-Taiwan-challenges-and-possibilities-ChengChia-Tseng.pdf
Comment 5 Heiko Tietze 2018-02-26 08:34:13 UTC
Thank you for the reference. So changing the default font size for CTL makes sense. 

But we should keep 12 for western/latin fonts (don't understand Volga's change to the summary).
Comment 6 Mark Hung 2018-02-26 08:52:56 UTC
> Description:
> in Tools ▸ Options ▸ Writer ▸ Basic Fonts (Western) ▸ Default, the font size
> should be default to 10.5 for Chinese and 12 for all other locales, this
> would keep consistency for Basic Fonts (Asian). Since you have already made
> localized settings for Tab stops, this localized values becomes necessary.


Hi Volga,

I'd like to clarify your original request. Are you requesting that font sizes for different scripts ( Latin, CJK, CTL ) to be consistent, and it should be 10.5 when the user's locale is Simplified Chinese and should be 12 for the rest? 

Can you make a screenshot with sample document and highlight the issue that bothers?

Thanks.
Comment 7 Mark Hung 2018-02-26 09:35:52 UTC
(In reply to Heiko Tietze from comment #5)
> Thank you for the reference. So changing the default font size for CTL makes
> sense. 
> 
> But we should keep 12 for western/latin fonts (don't understand Volga's
> change to the summary).

Hi, Heiko,

Cheng-Chia Tseng's slides talk about CJK font. It doesn't contain any information that suggest CTL font size.
Comment 8 Junichi Matsukawa 2018-02-27 01:14:00 UTC
Created attachment 140172 [details]
Western,Asia,CTL text font size

Hi.

Recently, we often use 11 or 12 point font in business in Japan.
we often use Asian(CJK) fonts mixed with Western fonts.
Rather, I think it would be better to unify them in a 12 point font.

Because it is understood by painting characters with a frame line and background color, but unity is lost.
Comment 9 Heiko Tietze 2018-02-27 08:34:11 UTC
(In reply to Mark Hung from comment #7)
> Cheng-Chia Tseng's slides talk about CJK font. It doesn't contain any
> information that suggest CTL font size.

Of course CJK, mixed it up with CTL.

(In reply to Junichi Matsukawa from comment #8)
> Rather, I think it would be better to unify them in a 12 point font.

The request is about the default values depending on your locale (and looking at your attachment it makes sense). If you mix latin with CJK both would be 10.5 unless you change the style to another value. (Btw. the default styles might still be with 12pt).
Comment 10 Buovjaga 2018-03-10 17:31:22 UTC
To all: should we set bug 116174 and bug 116175 to NEW as well or is there something further to consider?
Comment 11 Volga 2018-03-11 10:06:19 UTC
(In reply to Buovjaga from comment #10)
> To all: should we set bug 116174 and bug 116175 to NEW as well or is there
> something further to consider?

Yes. I agree with you, and I suggest fixing them together.
Comment 12 Volga 2018-04-06 11:31:44 UTC Comment hidden (no-value)
Comment 13 Volga 2018-06-08 09:59:35 UTC Comment hidden (no-value)
Comment 14 Volga 2018-06-08 10:07:50 UTC
Created attachment 142613 [details]
Microsoft Word 2006's Font dialog (zh-cn)

In MS Word, both Western and Eastern text font share the same settings for style and size, and both these texts defaulting to 10.5 (小四) in Simplified Chinese locale. When you create a new document in MS Word, you can right click the page, then choose Font in context menu, then you will see it. 

Althrough our Characters dialog uses separate font style and size settings for these text, we are still able to follow this behavior, just similar to what we have made for Tab stops.
Comment 15 Volga 2018-06-09 07:36:26 UTC
With a notice from Mark Hung, I have found that W3C Requirements for Chinese Text Layout has following notes at section 2.3.5: 

“Character size. For the main target audience of publications, i.e. the adult population, the most common character size is 10.5pt (≒3.7mm) or 9pt (≒3.2mm). The minimum acceptable size is 8pt (≒2.8mm), except for specialized publications.” 

Then I found Requirements for Japanese Text Layout has following instruction for Kihon-kanmen (basic layout): 

“b. Character size. Generally 9 point (about 3.2mm) type is common. Except for specialized publications such as dictionaries, the minimum size of type is 8 point (about 2.8mm).” 

“(note 1) In Western text layout, 10 point (about 3.5mm) or 12 point (about 4.2mm) type is common. This is mainly because of a difference in design principles between Japanese and Latin characters.” 

Requirements for Korean Text Layout doesn’t have such requirement.
Comment 16 Volga 2018-06-09 08:52:47 UTC
*** Bug 116174 has been marked as a duplicate of this bug. ***
Comment 17 Volga 2018-06-12 02:13:37 UTC
Created attachment 142671 [details]
WPS Office Writer 2016's Font dialog (zh-cn)

Here is the same dialog from WPS Office 2016 Writer. In this dialog both Chinese (中文字体) and Western (西文字体) texts share the same style and size options, but complex texts (复杂文种) using separete settings.
Comment 18 Heiko Tietze 2018-06-12 09:48:15 UTC
This is an easy hack with a very difficult to find place to change the default. I tried with Tomaz:

https://opengrok.libreoffice.org/xref/core/sw/source/ui/config/optpage.cxx#876
https://opengrok.libreoffice.org/xref/core/sw/source/uibase/config/fontcfg.cxx#250
and assuming it's taken from the default style
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentStylePoolManager.cxx
https://opengrok.libreoffice.org/xref/core/vcl/source/outdev/font.cxx#742

No success. Asia fonts use 10.5 but not CTL.
Comment 19 Heiko Tietze 2018-06-13 09:51:27 UTC
Created attachment 142697 [details]
Tools > Options > Basic Font (CTL) after the patch

Looked into it again and found a way to have the same value for CTL as it is on Asian. Does this work for you or should I modify the other values too?
Comment 20 Heiko Tietze 2018-06-13 09:55:37 UTC
Patch at https://gerrit.libreoffice.org/#/c/55742/
Comment 21 Volga 2018-06-13 13:20:08 UTC
(In reply to Heiko Tietze from comment #19)
> Created attachment 142697 [details]
> Tools > Options > Basic Font (CTL) after the patch
> 
> Looked into it again and found a way to have the same value for CTL as it is
> on Asian. Does this work for you or should I modify the other values too?
OK, I see. I think this could work you if I set language as zh-CN in Options - Language Settings - Language. One question is: does it really works for specific locale?
Comment 22 Heiko Tietze 2018-06-14 12:46:51 UTC
(In reply to Volga from comment #21)
> OK, I see. I think this could work you if I set language as zh-CN in Options
> - Language Settings - Language. One question is: does it really works for
> specific locale?

There is Tools > Options > Language Settings > Language where you can enable Asian (CJK) and CTL languages. Don't know if that depends on your locale or on the configuration of "locale settings" at in the same tab. After enabling these/this checkbox/es you get the entries under Tools > Options > Writer > Basic Fonts (Western/CJK/CTL). Western is defined with 12,14,12,12,12 for default, headings, lists, caption, and index; Asian (aka CJK) with 10.5,14,12,12,12, and the patch does the same now for CTL (update of unit test pending). If you think we should change heading, list etc. too I could try that now.
But if you are talking about a better integration of locale meaning CTL is enabled automatically when your system has set lang=zh, or the like, and the current workflow is not appropriate, we have to do another loop (and find a dev ultimately).
Comment 23 Volga 2018-06-14 13:46:59 UTC
(In reply to Heiko Tietze from comment #22)
> (In reply to Volga from comment #21)
> > OK, I see. I think this could work you if I set language as zh-CN in Options
> > - Language Settings - Language. One question is: does it really works for
> > specific locale?
> 
> There is Tools > Options > Language Settings > Language where you can enable
> Asian (CJK) and CTL languages. Don't know if that depends on your locale or
> on the configuration of "locale settings" at in the same tab. After enabling
> these/this checkbox/es you get the entries under Tools > Options > Writer >
> Basic Fonts (Western/CJK/CTL). Western is defined with 12,14,12,12,12 for
> default, headings, lists, caption, and index; Asian (aka CJK) with
> 10.5,14,12,12,12, and the patch does the same now for CTL (update of unit
> test pending). If you think we should change heading, list etc. too I could
> try that now.
> But if you are talking about a better integration of locale meaning CTL is
> enabled automatically when your system has set lang=zh, or the like, and the
> current workflow is not appropriate, we have to do another loop (and find a
> dev ultimately).
Oh, I forgot, sorry. I mean these values should be switched via "locale settings".
Comment 24 Heiko Tietze 2018-06-15 12:35:49 UTC
(In reply to Heiko Tietze from comment #20)
> Patch at https://gerrit.libreoffice.org/#/c/55742/

Need help with the unit test: It complains about 12 (expected) vs. 10.5 actual in testFdo44715 but when I change the value it fails with 10.5 vs. 12 (exactly the opposite).