Bug 432882

Summary: Improve Font settings for CJK users under Windows
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: UsabilityAssignee: Alvin Wong <alvin>
Status: ASSIGNED ---    
Severity: wishlist CC: alvin, kde
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Krita's default font for Simplified Chinese under Windows has many issues
Krita using Windows 7+'s default system font for Simplified Chinese "Microsoft Yahei"
Microsoft Edge and Google Chrome are now using the new default font for Simplified Chinese Windows
Traditional Chinese has a similar situation, but not as bad
Japanese's default font is much better, but it has its own issues
Korean default font

Description Tyson Tan 2021-02-13 08:53:13 UTC
Background information:

UI Font customization is essential for CJK users on Windows and macOS, because:

1) CJK letters have a lot of strokes. Krita's default font size is good for English, but too small for CJK letters.

2) Windows and macOS's default CJK application fonts were designed in the era without font anti-aliasing. They are still the defaults probably for compatibility concern or just out of plain laziness. These fonts are very hard to read in modern OSes with anti-aliasing enabled all the time. When Hi-Dpi is on, they look atrocious.

Although we now have options for General UI font customization, we still have some issues that prevented users from making things work as intended:

1) Font size for docker panels are too small.
Docker panel's font size is about 25% smaller than those of the Menu and dialogues. I've received many complains from CJK users that they just couldn't make the panels readable on Hi-Dpi displays without making the dialogues unusable. It'd be nice to have an option to customize fonts for each major UI element types individually.

2) Docker title letters doesn't change immediately after a UI font change.
After changing the UI font, we must first undock-and-redock a docker, or restart Krita to see the changes in Docker titles. This confused a lot of user into thinking the options were broken. If this is not a problem we can fix, it'd nice to have a note next to the options telling people the restart Krita after a font change.

3) Give each language a translatable default font list string, so that the translators can assign proper fonts for their region. Krita's default font, although looking nice under English, will automatically fallback to the ugly, ancient CJK default font under CJK locales. It leaves a very bad first impression for new users.

4) Move the Font settings into an individual tab in Krita's settings dialogue. This will make it much easier to discover for new users. Most people don't even know Krita allows UI font customization till this date.
Comment 1 Tyson Tan 2021-06-18 03:48:15 UTC
A few months after the initial report, there has been more discussion and new discoveries on this topic. I will add new information and screenshots below to better communicate the issues. 

After that, You won't need to read the original report description anymore.
Comment 2 Tyson Tan 2021-06-18 03:53:47 UTC
Created attachment 139458 [details]
Krita's default font for Simplified Chinese under Windows has many issues

Simsun is the current default font Krita uses for Simplified Chinese on Windows 10. 

This font has some nasty quirks, it is:

1) A bitmap font -- it cannot be scaled losslessly.

2) A serif font -- it is unsuitable for modern UI.

3) A legacy font. it has been replaced by Microsoft Yahei.

4) Unable to support every font sizes -- it only has 10px, 11px, 12px and so on. They are not perfectly matching Krita's docker font sizes, and therefore become garbled.
Comment 3 Tyson Tan 2021-06-18 04:03:47 UTC
Created attachment 139459 [details]
Krita using Windows 7+'s default system font for Simplified Chinese "Microsoft Yahei"

This is how Krita looks using Windows 7+'s default system font for Simplified Chinese -- "Microsoft Yahei". 

It's somewhat comparable to how Krita looks under Linux, and I think this is how a modern app should look like.

Given more and more new displays are now Hi-DPI, especially the laptop ones, the old bitmap font is just impossible to read on a 4K screen, and leaves a bad first impression. There for I recommend we the new system font by default.
Comment 4 Tyson Tan 2021-06-18 04:05:52 UTC
Created attachment 139460 [details]
Microsoft Edge and Google Chrome are now using the new default font for Simplified Chinese Windows
Comment 5 Tyson Tan 2021-06-18 04:15:01 UTC
Created attachment 139461 [details]
Traditional Chinese has a similar situation, but not as bad

Krita's default font for Traditional Chinese under Windows is MingLiU.

MingLiU shares most of its characteristics with SimSun, but it supplies 1 more font size. Therefore Krita's docker texts are much more readable.

However, the News widget suffers badly and the content is even less readable than its Simplified Chinese counterpart.
Comment 6 Tyson Tan 2021-06-18 04:21:42 UTC
Created attachment 139462 [details]
Japanese's default font is much better, but it has its own issues

Krita's default font for Japanese is MS Gothic. This is a much better crafted font compared to SimSun. It covers all important small font sizes.

However, this font is so densely packed, and it is also a bitmap font. It's still an ugly font for Hi-DPI displays.
Comment 7 Tyson Tan 2021-06-18 04:36:58 UTC
From Comment 2, Comment 5, Comment 6, you can see Krita's current default fonts for CJK languages under Windows are not a great choice, especially for small fonts.

Krita uses small fonts for its dockers/panels. This decision creates a serious usability issue for Windows CJK users -- they can't read the texts without squinting.

Even with the new Windows default CJK fonts, smaller fonts are just not a good fit for CJK languages. The characters pack so many strokes. They are hard to read when small in any cases.
Comment 8 Tyson Tan 2021-06-18 04:43:19 UTC
To improve this, we can consider the following measures:

1) Change default fonts for CJK languages.

2) Increase the docker/panel's font sizes for CJK languages.

3) Add an option to specifically customize docker/panel's font size.

4) Let the translator to assign a default font list and font sizes.
Comment 9 Tyson Tan 2021-06-18 04:50:33 UTC
Krita under macOS also uses serif fonts for CJK users. The fonts are all vector, so they are more readable than what's on Windows, but still looks out of place and ugly. It might benefit from the same improvements as well.
Comment 10 Shinjo Park 2021-06-20 15:08:28 UTC
Created attachment 139545 [details]
Korean default font
Comment 11 Shinjo Park 2021-06-20 15:18:28 UTC
(In reply to Shinjo Park from comment #10)
> Created attachment 139545 [details]
> Korean default font

Not mentioned in comment #7 is Korean font, which is also different from Chinese/Japanese. Krita is using Gulim/굴림 for all UI elements on Windows, which used to be default up till Windows XP, replaced by Malgun Gothic/맑은 고딕 starting from Windows Vista. The desktop and taskbar contains text in Malgun Gothic, looking differently from what is inside Krita. The glyph inside the menu bar is coming from the bitmap of Gulim 8pt, which is considered smaller than what Korean users expected even back then (Gulim 9pt). Docker texts are even smaller than that.

I don't have Mac by myself, so I am not 100% sure of the font situation there.

(In reply to Tyson Tan from comment #8)
> 4) Let the translator to assign a default font list and font sizes.

As far as I know Qt's default fonts are suboptimal for CJK. In fact, Telegram Desktop had the similar problem regarding font selection. They maintain their own patches for Qt 5.12/5.15.

Github issue: https://github.com/telegramdesktop/tdesktop/issues/7773
Patch itself: https://github.com/desktop-app/patches/blob/master/qtbase_5_15_2/0005-fix-cjk-font-fallback.patch
Comment 12 Tyson Tan 2021-06-20 15:32:35 UTC
(In reply to Shinjo Park from comment #11)
> (In reply to Shinjo Park from comment #10)
> > Created attachment 139545 [details]
> > Korean default font
> 
> Not mentioned in comment #7 is Korean font, which is also different from
> Chinese/Japanese. Krita is using Gulim/굴림 for all UI elements on Windows,
> which used to be default up till Windows XP, replaced by Malgun Gothic/맑은 고딕
> starting from Windows Vista. The desktop and taskbar contains text in Malgun
> Gothic, looking differently from what is inside Krita. The glyph inside the
> menu bar is coming from the bitmap of Gulim 8pt, which is considered smaller
> than what Korean users expected even back then (Gulim 9pt). Docker texts are
> even smaller than that.
> 
> I don't have Mac by myself, so I am not 100% sure of the font situation
> there.
> 
> (In reply to Tyson Tan from comment #8)
> > 4) Let the translator to assign a default font list and font sizes.
> 
> As far as I know Qt's default fonts are suboptimal for CJK. In fact,
> Telegram Desktop had the similar problem regarding font selection. They
> maintain their own patches for Qt 5.12/5.15.
> 
> Github issue: https://github.com/telegramdesktop/tdesktop/issues/7773
> Patch itself:
> https://github.com/desktop-app/patches/blob/master/qtbase_5_15_2/0005-fix-
> cjk-font-fallback.patch

Sorry for not mentioning Korean in my comments -- I can only read Chinese and Japanese. Thank you for filling in the missing piece.

One common thing about Krita's default fonts for CJK language: TOO SMALL. XD

The Qt patch you mentioned can be really valuable. Thanks!
Comment 13 Tyson Tan 2021-06-22 13:09:31 UTC
The new default fonts are now patched in thanks to Alvin: 
Bug 427733
https://invent.kde.org/graphics/krita/commit/40c1cd91f30ae8dbb3febf244b1dc721762e07bd

See also:
https://bugreports.qt.io/browse/QTBUG-58610
Comment 14 Alvin Wong 2021-06-23 16:34:07 UTC
(In reply to Tyson Tan from comment #0)
> 1) Font size for docker panels are too small.
> Docker panel's font size is about 25% smaller than those of the Menu and
> dialogues. I've received many complains from CJK users that they just
> couldn't make the panels readable on Hi-Dpi displays without making the
> dialogues unusable. It'd be nice to have an option to customize fonts for
> each major UI element types individually.

It's nowhere near 25% smaller -- the font size of the dockers is 0.9 times the point size of the regular UI font. Though I agree that 8.1 pt can be a bit small.

I think we can consider just not using a smaller font size at all or only for CJK localization. I wonder how non-CJK users think about the smaller font.


> 2) Docker title letters doesn't change immediately after a UI font change.
> After changing the UI font, we must first undock-and-redock a docker, or
> restart Krita to see the changes in Docker titles. This confused a lot of
> user into thinking the options were broken. If this is not a problem we can
> fix, it'd nice to have a note next to the options telling people the restart
> Krita after a font change.

I'll give that a look when I have time. It should be fixable.


> 3) Give each language a translatable default font list string, so that the
> translators can assign proper fonts for their region. Krita's default font,
> although looking nice under English, will automatically fallback to the
> ugly, ancient CJK default font under CJK locales. It leaves a very bad first
> impression for new users.

I don't think it is the appropriate way to do it, as translators can't know what fonts are available on the users' systems. It also gets complicated when the user specifies fallback languages.


> 4) Move the Font settings into an individual tab in Krita's settings
> dialogue. This will make it much easier to discover for new users. Most
> people don't even know Krita allows UI font customization till this date.

I guess we need more than two options to make them worth having their own tab.


(In reply to Tyson Tan from comment #9)
> Krita under macOS also uses serif fonts for CJK users. The fonts are all
> vector, so they are more readable than what's on Windows, but still looks
> out of place and ugly. It might benefit from the same improvements as well.

I cannot help with this as I know nothing about macOS at all.
Comment 15 Tyson Tan 2021-06-24 01:59:02 UTC
Hi Alvin, information in Comment 0 is obsolete and has been replaced by Comment 1 and below. However, fixing Bug 427733, you have already fixed almost everything we talked about. 

Docker title font not changing until restart:
It seemed to have been fixed by something else.

macOS font issue:
The macOS issue was not that big of a deal. The system using vector fonts was the saving grace. Since you allowed Krita to use a Black type, sans-serif CJK default font, I can totally expect you have fixed that one as well. I might have a check next time when I have my hands on a macOS machine.

Font settings tab:
After Bug 427733, this is not needed. I only suggest that because before your fix, the first thing EVERY CJK user wants to do under Windows, was to change Krita's dang default font. It needed to be more discoverable because of that. After your fix, I bet nobody will ever feel the need to change the fonts at all.

Font list for translators:
Also not needed after Bug 427733.

The only thing left, is the small font used in Docker.

For western language, the current small font is the best size:

1) Their letters have fewer strokes, and thus more readable in smaller sizes. 
2) It'll look ugly and unprofessional if we make the docker font size larger for western languages. 
3) Compared to CJK languages, western languages generally need more, longer words to describe something. They can't afford to go big.

Therefore, I recommend not to change the docker font size for all languages.

We only need an option to customize docker font size separately, and that's it for this bug report.

Personally I don't even think we "need" that now after Bug 427733. Hi-DPI works well with the new default fonts, they are pretty readable as is. 

Please feel free to close this bug if you decided to do so. And thank you for all the hardwork you've done for Windows CJK users.
Comment 16 Alvin Wong 2021-06-24 09:10:49 UTC
(In reply to Tyson Tan from comment #15)
> 
> Docker title font not changing until restart:
> It seemed to have been fixed by something else.

That's not true, there are a multitude of UI elements not reacting to the font change. However, it won't be easy to fix all of them.


> macOS font issue: [...]

Just to be clear, I haven't touched anything macOS-related.


> Font settings tab: [...]
> 
> Font list for translators: [...]

Okay.


> The only thing left, is the small font used in Docker.
> 
> [...]
> 
> We only need an option to customize docker font size separately, and that's
> it for this bug report.
> 
> Personally I don't even think we "need" that now after Bug 427733. Hi-DPI
> works well with the new default fonts, they are pretty readable as is. 

I think we should have an option for this. But since we are in string freeze, I'll probably delay this to 5.1.
Comment 17 Tyson Tan 2021-06-24 09:33:37 UTC
Thanks for the explanation!