Bug 473161

Summary: UI Font in Krita 5.3 is not correct
Product: [Applications] krita Reporter: grum999
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshot of main Krita window
Screenshot of settings

Description grum999 2023-08-08 17:06:09 UTC
Created attachment 160838 [details]
Screenshot of main Krita window

SUMMARY
With last nightly krita-5.3.0-prealpha-c29c1f3fc0-x86_64.appimage, UI font is totally weird and unusable

STEPS TO REPRODUCE
Execute Krita

OBSERVED RESULT
UI Font is not normal

EXPECTED RESULT
UI Font is system font 

SOFTWARE/OS VERSIONS
Krita
 Version: 5.3.0-prealpha (git c29c1f3)
 Hidpi: false

Qt
  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.19.0-45-generic
  Pretty Productname: KDE neon 5.27
  Product Type: neon
  Product Version: 22.04
  Desktop: KDE
  Appimage build: Yes

ADDITIONAL INFORMATION
- No problem with Krita 5.2-Beta1 appimage 
- Trying to define settings to use another font does nothing (even after restart)
Comment 1 grum999 2023-08-08 17:06:47 UTC
Created attachment 160839 [details]
Screenshot of settings

In settings trying to set another font does nothing
Comment 2 grum999 2023-08-08 17:09:25 UTC
Note: at startup, in terminal, I have this message:
```
Fontconfig error: Cannot load default config file: No such file: (null)
```

Don't know if it's related or not
Comment 3 Dmitry Kazakov 2023-08-09 09:33:50 UTC
Git commit 021c1641a8d5e15454f92fdbccf3f8ebdb718450 by Dmitry Kazakov.
Committed on 09/08/2023 at 11:33.
Pushed by dkazakov into branch 'master'.

Fix initialization of the fontconfig embedded into AppImage

Since we embed our own fontconfig into the appimage we should make sure
that it fetches the corrent fonts.conf file from the system location.

M  +40   -19   krita/main.cc

https://invent.kde.org/graphics/krita/-/commit/021c1641a8d5e15454f92fdbccf3f8ebdb718450
Comment 4 Dmitry Kazakov 2023-08-09 09:34:11 UTC
Git commit 0cef5cb1fd9542e4dad48a8ec5374ea84f6eb34c by Dmitry Kazakov.
Committed on 09/08/2023 at 11:33.
Pushed by dkazakov into branch 'krita/5.2'.

Fix initialization of the fontconfig embedded into AppImage

Since we embed our own fontconfig into the appimage we should make sure
that it fetches the corrent fonts.conf file from the system location.

M  +40   -19   krita/main.cc

https://invent.kde.org/graphics/krita/-/commit/0cef5cb1fd9542e4dad48a8ec5374ea84f6eb34c
Comment 5 grum999 2023-08-10 12:48:34 UTC
It's Ok now, many thanks :-) 

Grum999