How to make Flatpaks understand japanese? (plus Okular)

As the title says.
Recently I switched from Neon to Tuxedo and noticed that flatpaks can understans japanese characters and this is something I need them to be able to do. On Neon it worked and I think I did anything to make it work so I don’t understand why isn’t working on Tuxedo.

In addition, if possible, on Neon Okular was able to read and show both standalone avif images as avif images inside compacted files. Now o Tuxedo it can only handle the standalone images, but not when it’s inside compacted files.
I also don’t understand why.

Already asked around about the two issues and tried a few things, didn’t worked.

Hi - which Flatpak applications are you using? Are you seeing that the distribution-packaged version can render those characters OK, but the Flatpak can’t?

Can you describe the things you mentioned that you’ve tried so far? Also, have you changed any font settings from the system defaults after installing?

It looks like others have experienced at least something related to this issue across a few different applications:

In general, the fact that it worked in Neon and isn’t working in Tuxedo OS would lead me to assume that it has something to do with how Tuxedo packages or configures its distribution - unfortunately I don’t see much in the way of general user forums for Tuxedo OS, presumably because the OS is almost exclusively targeted toward its own hardware customers.

People recommended me to copy CJK fonts to the Flatpak folder, ~/.local/share/fonts/. I did, or at least I think I did, I may have copied to the wrong folder.

I was wondering if I could solve this using the Application Permission settings. Added /usr/share/fonts/ to “Filesystem Access” but also didn’t worked, I got out of ideas.

Hmm, those might have been the first part of a solution with one or two other steps, perhaps? For example, see the comment here describing an override that some folks needed after copying fonts into the home directory font folder: Brave doesn't show CJK and Khmer fonts · Issue #315 · flathub/com.brave.Browser · GitHub

If your distribution-packaged applications don’t have the same issue, and if the issue did not occur in Neon, then I would guess these issues lie somewhere between the packaging of those Flatpak applications and the way in which Tuxedo has installed or configured flatpak and the xdg-desktop-portal. Are your CJK fonts visible and rendering OK in the System Settings > Font Management window?

Yes, it works correctly on everything except flatpaks.

I asked on r/Tuxedocomputers by I’m still waiting for feedback.

Came across your post. I don’t read/write in japanese but I tested it on Tuxedo OS by copy pasting some japanese from wikipedia on some flatpak apps (libreoffice, marknote, and also look at those pages in flatpak’s chromium) without problems. I have Noto CJK font installed system wide (in /usr/share/fonts) without special configuration.

By the way ~/.local/share/fonts is not a flatpak folder, it is where you put fonts as a user (there is other ressources folder ~/.local/share/ like icons and themes for the user). The specific flatpak folder or under ~/.var/apps/ but you shouldn’t have to install there, normally flatpak as a way to use ressource in ~/.local/share and /usr/share. Recently I add problem on a system with flatpak apps not using my icon theme installed in ~/.local/share/icons the fact append to be that I didn’t directly copied my icon folder in there but just created a symlinks to another location where I put the icons and flatpak seems not to follow symbolic links. So really copying the folder solved it for me (in case you have done the same with your fonts).

1 Like

This isn’t really related to the font issue, but the locale testing techniques there might be useful: Flatpak integration | Developer

1 Like

Also I recently tested installing Emacs through flatpaks (even building it) and it add no problem getting my users fonts (manually installed in ~/.local). Or my emacs config (with some tweaks like symlink ~/.emacs.d to my config in ~/.config). I may had some issue with locale but I should look further.