Java Swing Hebrew font scaling problem with high dpi screen scaling

157 views Asked by At

Some Hebrew (Ivrit) characters take two unicode characters to display. This is fine at 100% scaling of my Java Swing Application. But at higher resolution (can be choosen in Windows 10 for example) the characters are seperated into two. This is the code:

DataButton jButton = new DataButton(
        "<html><span>" + unicode + "</span></html>", unicode);

I had to use the html tags in order to make it display correctly at all.

What can I do about this problem? (I am using Nimbus and openJava 14)

Ivrit Keyboards

2

There are 2 answers

2
AudioBubble On

Simply make images from the letters and display them as icons on the buttons.

1
AudioBubble On