You are not logged in.

#1 2024-05-10 19:40:17

unsignedzero
Member
Registered: 2014-10-06
Posts: 28

[SOLVED] Very slow UI when seeing Japanse fonts on LibreOffice

Hello,

I have two different linux box (one being a desktop with a modern Nvidia GPU and one being a laptop with Intel Iris) running Arch Linux. I've setup the laptop ages ago and everything works fine and a month ago setup my desktop in a similar fashion by copying /home and installing mostly the same packages. I had an odd issue where on my desktop, when I use LibreOffce Calc to display Japanese fonts it takes forever to scroll the sheet and it's rather sluggish when typing or even selecting cells. On my laptop and desktop when running Windows, I have had no issues. Both boxes are running cinnamon.

I checked in journalctl -fb and got no issues and I'm curious where I should go to debug this issue. My guess is that the fontconfig is not configured properly and rendering the Japanese font in a very slow way? Is there an easy way to debug or view direct logs of this issue? Just to clarify the font IS readable and also I tested the file under Openoffice on the desktop under linux and it works fine without any slow downs. The slowdown occurs when there is any Japanese font on the screen and is fine afterwards if I'm not displaying it. All actions, scrolling, selecting and even typing are slowed when Japanese fonts are on the screen

EDIT: I tried using the flatpak org.libreoffice.LibreOffice and it DOES NOT help. I also tried --safe-mode and that doesn't help either.

The issue is that some fonts are making it take a lot longer to render. This is what I ran that fixed it below. Do note that wqy-zenhei is recommended to get CJK font support for steam which is why I've installed it. ttf-sazanami on Localization/Japanese states

This is outdated and not maintained any more, but may be defined as a fallback font on several environments.

and is causing issues on my current system so I've removed it too.

pacman --remove wqy-zenhei ttf-sazanami

Here is a list of all my fonts I have installed for CJK that work. I've omitted /usr/share/fonts/ in the path and the output is from running fc-list :charset=30a6 file.

Packages

adobe-source-code-pro-fonts
adobe-source-han-sans-jp-fonts
adobe-source-han-sans-otc-fonts
adobe-source-han-serif-otc-fonts
adobe-source-sans-fonts
adobe-source-serif-fonts
ttf-hanazono
ttf-hannom
ttf-sawarabi-mincho

Fonts

OTF/ipag.ttf
OTF/ipagp.ttf
OTF/ipam.ttf
OTF/ipamp.ttf
TTF/HAN NOM A.ttf
TTF/HanaMinA.ttf
TTF/sawarabi-mincho-medium.ttf
adobe-source-han-sans/SourceHanSans.ttc
adobe-source-han-sans/SourceHanSansJP-Bold.otf
adobe-source-han-sans/SourceHanSansJP-ExtraLight.otf
adobe-source-han-sans/SourceHanSansJP-Heavy.otf
adobe-source-han-sans/SourceHanSansJP-Light.otf
adobe-source-han-sans/SourceHanSansJP-Medium.otf
adobe-source-han-sans/SourceHanSansJP-Normal.otf
adobe-source-han-sans/SourceHanSansJP-Regular.otf
adobe-source-han-serif/SourceHanSerif-Bold.ttc
adobe-source-han-serif/SourceHanSerif-ExtraLight.ttc
adobe-source-han-serif/SourceHanSerif-Heavy.ttc
adobe-source-han-serif/SourceHanSerif-Light.ttc
adobe-source-han-serif/SourceHanSerif-Medium.ttc
adobe-source-han-serif/SourceHanSerif-Regular.ttc
adobe-source-han-serif/SourceHanSerif-SemiBold.ttc
noto-cjk/NotoSansCJK-Black.ttc
noto-cjk/NotoSansCJK-Bold.ttc
noto-cjk/NotoSansCJK-DemiLight.ttc
noto-cjk/NotoSansCJK-Light.ttc
noto-cjk/NotoSansCJK-Medium.ttc
noto-cjk/NotoSansCJK-Regular.ttc
noto-cjk/NotoSansCJK-Thin.ttc
noto-cjk/NotoSerifCJK-Black.ttc
noto-cjk/NotoSerifCJK-Bold.ttc
noto-cjk/NotoSerifCJK-ExtraLight.ttc
noto-cjk/NotoSerifCJK-Light.ttc
noto-cjk/NotoSerifCJK-Medium.ttc
noto-cjk/NotoSerifCJK-Regular.ttc
noto-cjk/NotoSerifCJK-SemiBold.ttc

Last edited by unsignedzero (2024-05-11 06:34:06)


Just another zero here. Carry on.

Offline

#2 2024-05-10 20:14:47

seth
Member
Registered: 2012-09-03
Posts: 63,521

Re: [SOLVED] Very slow UI when seeing Japanse fonts on LibreOffice

Compare the coverage on good and bad system:

fc-list :charset=30a6

Offline

#3 2024-05-11 01:02:42

unsignedzero
Member
Registered: 2014-10-06
Posts: 28

Re: [SOLVED] Very slow UI when seeing Japanse fonts on LibreOffice

seth wrote:

Compare the coverage on good and bad system:

fc-list :charset=30a6

Thanks for the quick reply. I've ran it and it looks like the bad system has strictly more fonts than the good system. Would you recommend I uninstall the additional fonts to see if that resolve the problem?

I also ran font-config-info and besides the different screen sizes, I see different default fonts in GSettings and also under Fontconfig. In the bad system, I'm using Noto Sans which has Japanese support under fc-list :charset=30a6 as you pointed out earlier. In the good system I see Nimbus Sans which does not have Japanese support. The ODS file I'm using is identical for both.

Is it possible that having too many fonts is an issue?


Just another zero here. Carry on.

Offline

#4 2024-05-11 05:51:47

unsignedzero
Member
Registered: 2014-10-06
Posts: 28

Re: [SOLVED] Very slow UI when seeing Japanse fonts on LibreOffice

I'm back and yeah you are correct. It seems that one of the fonts I've installed it causing it to slow down.

Here are a list of all the good fonts that cause no issues and ones that do for experimentation. Do note that wqy-zenhei is recommended to get CJK font support for steam.

Good fonts

noto-fonts-cjk 
ttf-hanazono
otf-ipafont 

Bad fonts

wqy-zenhei
ttf-sazanami 

Last edited by unsignedzero (2024-05-11 06:29:33)


Just another zero here. Carry on.

Offline

#5 2024-05-11 07:03:00

seth
Member
Registered: 2012-09-03
Posts: 63,521

Re: [SOLVED] Very slow UI when seeing Japanse fonts on LibreOffice

wqy-zenhei is explicitly a "Chinese Outline Font" and doesn't even provide full CJK coverage - the wiki is most likely inaccurate here and somebody just added a font that they installed to get CJK coverage relevant to them.
Both bad fonts contain relatively large font files (wqy-zenhei being a 17MB ttc, ie. ttf collection) but idk whether that throws LO off.

If you want to keep any of those fonts you could make sure to just prefer one of the "good" ones, https://wiki.archlinux.org/title/Font_c … ault_fonts resp. look at eg. /usr/share/fontconfig/conf.default/65-wqy-zenhei.conf and see whether that actually moves the font up in the resolution chain and in that case delete and Ingore the file

Offline

Board footer

Powered by FluxBB