You are not logged in.

#1 2024-10-21 18:14:45

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

[SOLVED] Java Applications UI broken

Solution: Half a year back I set up emoji font. I did this by overriding sans-serif and serif fonts with Apple Emoji font. My logic was the following: when an app requests a font to render emoji, it will get Apple Emoji font as intended. When an app renders a letter, it would fallback to other fonts.

What actually happened.

Apple Emoji is Bitmap font! Many apps use some library in their Graphics stack, which does not support scaling of Bitmap fonts. So, when application tries to render any text with size other than Apple Emoji's native size, it fails and DOES NOT fallback to other fonts. Further more, java apps silence the error! But Chrome (and electron based apps) work well with such setup. Probably, they handle the error or just use another library.

---------------------------

protege and stm32cubeide packages does not work. They both are written in java and has horribly broken UI (see screens). My friends who use PopOS does not have such issues with these apps.
Also, both applications report no errors

(could not post this directly as an image, so here is link to img on google drive)
https://drive.google.com/file/d/1nHjZQD … sp=sharing

I am using KDE Plasma with Wayland session. Protege launches as Xwayland client.

I am ready to share any information that might help in here

Linux: 6.11.3-arch1-1
Plasma: 6.2.0

Last edited by owl-from-hogvarts (2024-10-22 14:52:13)

Offline

#2 2024-10-21 18:28:36

cryptearth
Member
Registered: 2024-02-03
Posts: 1,214

Re: [SOLVED] Java Applications UI broken

as someone with experience in java development - this is not an OS issue - this is some rather BAD ui code done in some gui designer with auto code generation without someone looking over it afterwards - and only ever tested it on thier own system - and luckly it worked for them
please report to the upstream devs of the application to fix thier gui crap code

Offline

#3 2024-10-21 19:11:40

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

Re: [SOLVED] Java Applications UI broken

Unfortunately, this seems like an issue on my side. All Java UI applications which use swing are broken

Offline

#4 2024-10-21 19:16:47

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] Java Applications UI broken

https://wiki.archlinux.org/title/HiDPI# … plications ?
Or missing fonts?
What do those UIs look like on the "good" system?

I am using KDE Plasma with Wayland session. Protege launches as Xwayland client.

What about plasma on X11?

Offline

#5 2024-10-21 19:21:22

cryptearth
Member
Registered: 2024-02-03
Posts: 1,214

Re: [SOLVED] Java Applications UI broken

could be some scaling you set which bad gui code not properly react to
proper coded ui DOES take desktop scaling correctly into account and does not screw up like this

Offline

#6 2024-10-21 19:33:27

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

Re: [SOLVED] Java Applications UI broken

On good systems both Protege, stm32cubeide and other swing applications look great

Offline

#7 2024-10-21 19:34:39

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

Re: [SOLVED] Java Applications UI broken

Using these
> java -Dsun.java2d.uiScale=2 -jar some_swing_application.jar
settings for scaling does not fix ui. It just makes it twice as big.

Offline

#8 2024-10-21 19:35:23

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

Re: [SOLVED] Java Applications UI broken

It may be font issue, definitely. But I could not even imagine which fonts are missing because java apps do not report it

Offline

#9 2024-10-21 19:55:21

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] Java Applications UI broken

On good systems both Protege, stm32cubeide and other swing applications look great

I meant more like a screenshot…

seth wrote:

What about plasma on X11?

But I could not even imagine which fonts are missing because java apps do not report it

Compare your fonts to the ones available on the good system?

Offline

#10 2024-10-21 20:15:54

owl-from-hogvarts
Member
Registered: 2024-10-21
Posts: 6

Re: [SOLVED] Java Applications UI broken

I've solved the problem... I have no more words.

Half a year back I set up emoji font. I did this by overriding sans-serif and serif fonts with Apple Emoji font. My logic was the following: when an app requests a font to render emoji, it will get Apple Emoji font as intended. When an app renders a letter, it would fallback to other fonts.

What actually happened.

Apple Emoji is Bitmap font! Many apps use some library in their Graphics stack, which does not support scaling of Bitmap fonts. So, when application tries to render any text with size other than Apple Emoji's native size, it fails and DOES NOT fallback to other fonts. Further more, java apps silence the error! But Chrome (and electron based apps) work well with such setup. Probably, they handle the error or just use another library.

Offline

#11 2024-10-21 20:27:51

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] Java Applications UI broken

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB