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: difficultyBeginner, easyHack, skillCpp
: 116174 (view as bug list)
Depends on:
Blocks: CJK Fonts-Locale
  Show dependency treegraph
 
Reported: 2018-02-23 15:29 UTC by Volga
Modified: 2023-08-04 13:52 UTC (History)
14 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
screenshot of the current Font tab of default Paragraph style (71.41 KB, image/png)
2022-01-23 09:57 UTC, Kevin Suo
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).
Comment 25 Kevin Suo 2022-01-23 09:56:16 UTC
Currently, as of today's master (and also in 7.2 and 7.3), if you create a new empty document, the default font for Western is 12pt, while it is 10.5pt for CJK and 12pt for CTL.

It is very common to have a mixture of CJK and Western characters in a paragraph. It makes no sense to have 10.5pt for CJK while 12pt for Western in the same document.
Comment 26 Kevin Suo 2022-01-23 09:57:48 UTC
Created attachment 177717 [details]
screenshot of the current Font tab of default Paragraph style
Comment 27 Kevin Suo 2022-01-23 10:20:33 UTC
From what I can see from Volga's original request, he requests the font 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".

Note that the font settings there are for the "HTML, Basic and SQL Sources". The word "Basic" here means LibreOffice BASIC language, not the "basic font (primary/base font)". 

While I agree with this original request, what I have raised on comment 25 is what we have now for a default Writer document, which is a bug and should be corrected. I reported the one raised in comment 25 in a separate bug, bug 146932. I think *this one* (i.e. the one related to  "Tools ▸ Options ▸ Writer ▸ Basic Fonts (Western) ▸ Default" should be limited to the  "HTML, Basic and SQL Sources" fonts, and not anywhere else.
Comment 28 Volga 2022-07-27 16:47:36 UTC
Unfortunately, this is still happeneed in

Version: 7.3.5.2 (x86) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded

And even appeared in 7.4 release.

https://wiki.documentfoundation.org/File:Charnamedlg.png
Comment 29 Heiko Tietze 2022-07-28 08:45:41 UTC
Xisco, maybe you can help with comment 24.
Comment 30 Volga 2023-06-22 11:54:32 UTC
This is still appeared in

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded
Comment 31 Volga 2023-07-03 10:41:22 UTC Comment hidden (no-value)
Comment 32 Volga 2023-07-05 06:20:21 UTC
Mr. Sung, I saw you have made a fix for bug 155947, so can you fix this bug as well?
Comment 33 DaeHyun Sung 2023-07-05 13:42:47 UTC
(In reply to Volga from comment #32)
> Mr. Sung, I saw you have made a fix for bug 155947, so can you fix this bug
> as well?

In LibreOffice Korean environments(both Windows and MacOS), https://bugs.documentfoundation.org/show_bug.cgi?id=155947 "Korean word default font size is 10pt." is fixed. 

Check English and Korean, default fonts(English and Korean) use 10pt. 

But, I'm not LibreOffice Chinese user, I don't know about Chinese(all environments, Mainland China, Taiwan, Hong kong)'s default font.

(I checked only Korean environments in LibreOffice)
Comment 34 Volga 2023-07-09 03:39:44 UTC Comment hidden (no-value)
Comment 35 Volga 2023-07-09 03:42:13 UTC
OK, Sung, the default body text size for Chinese and Japanese are already documented by W3C:

https://www.w3.org/International/clreq/#considerations_in_designing_type_area
https://www.w3.org/International/jlreq/#considerations_in_designing_the_kihonhanmen

So you're possible to implement based on your work. I'll try to check.
Comment 36 QA Administrators 2023-07-10 03:14:08 UTC Comment hidden (obsolete)
Comment 37 Franklin Weng 2023-08-02 06:46:32 UTC
(In reply to DaeHyun Sung from comment #33)
> (In reply to Volga from comment #32)
> > Mr. Sung, I saw you have made a fix for bug 155947, so can you fix this bug
> > as well?
> 
> In LibreOffice Korean environments(both Windows and MacOS),
> https://bugs.documentfoundation.org/show_bug.cgi?id=155947 "Korean word
> default font size is 10pt." is fixed. 
> 
> Check English and Korean, default fonts(English and Korean) use 10pt. 
> 
> But, I'm not LibreOffice Chinese user, I don't know about Chinese(all
> environments, Mainland China, Taiwan, Hong kong)'s default font.
> 
> (I checked only Korean environments in LibreOffice)


In Taiwan, there is an official rule.  In the main text body of government official document, Chinese and English characters needs to use size 12pt.  It's similar to the condition in Korean I guess.  But that's only for government official documents, not applying to all others. 

If Daehyun's patch ( https://gerrit.libreoffice.org/c/core/+/153324  ) is acceptable, maybe there should be similar workaround for other languages?  I mean, if I proposed a commit for LANGUAGE_CHINESE_TRADITIONAL like Daehyun did, will it be accepted also?  

Given it all, shouldn't it be an option based on locale?

So far we're using customized template to decide default font settings.  However there is a problem: Even if I set the Chinese font in a template to 12pt, when I select texts and clear all their style settings, it will be back to 10.5, which is not the expected behavior the users want.
Comment 38 Volga 2023-08-03 06:25:26 UTC Comment hidden (no-value)
Comment 39 Volga 2023-08-03 06:26:34 UTC Comment hidden (no-value)
Comment 40 Volga 2023-08-03 07:01:35 UTC
OK, Franklin, this should be an option based on language/locale, I believe Daehyun Sung's patch paved the way for fix, so both Western, CJK and CTL body texts could be able to share the same size for this condition.
Comment 41 Volga 2023-08-04 13:52:11 UTC
(In reply to Franklin Weng from comment #37)
> If Daehyun's patch ( https://gerrit.libreoffice.org/c/core/+/153324  ) is
> acceptable, maybe there should be similar workaround for other languages?  I
> mean, if I proposed a commit for LANGUAGE_CHINESE_TRADITIONAL like Daehyun
> did, will it be accepted also?  
To my eyes, this font size should be default to 12 pt for all other locales, then set specific size for certain language/locales.