Ugly fonts in Java applications on Ubuntu

后端 未结 6 1925
北海茫月
北海茫月 2021-01-29 18:57

Help me, please. It\'s screen of my Netbeans:\"enter PyCharm:

相关标签:
6条回答
  • 2021-01-29 19:09

    So... Seems my problem is solved.

    Step 1, Install and configure Infinality for better font rendering in Linux

    sudo add-apt-repository ppa:no1wantdthisname/ppa
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install fontconfig-infinality
    

    Step 2., Install OpenJDK7 with font fixes in Ubuntu

    sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
    sudo apt-get update
    sudo apt-get upgrade
    

    NetBeans: screenshot with improved fonts

    Step 3: Applies nice font style linux

    sudo /etc/fonts/infinality/infctl.sh setstyle linux
    
    0 讨论(0)
  • 2021-01-29 19:12

    I suggest changing the choice of font in the program's settings. You can also install the windows fonts on Ubuntu if you prefer these.

    In both cases you should be able to chose File -> Settings and search for font and change it to whatever you like.

    I use a proportional font in IntelliJ CE and it looks fine to me in Ubuntu.

    0 讨论(0)
  • 2021-01-29 19:13

    Try adding

    export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp'
    

    to your ~/.bashrc

    A more detailed discussion can be found here.

    0 讨论(0)
  • 2021-01-29 19:22

    After hours of searching and experimenting, I finally found a working solution!!! No need to mess up with fontforge, no need to patch your jdk, which is not allowed on a corporate workstation.

    1. REQUIRED Remove openjdk and install oracle jdk.
    2. Download deb from http://ppa.launchpad.net/no1wantdthisname/ubuntu/pool/main/f/fontconfig-infinality/
    3. Install it: sudo dpkg -i *.deb
    4. Enable osx font smoothing: sudo /etc/fonts/infinality/infctl.sh setstyle
    5. Reboot your system sudo reboot lightgdm

    If you are an Android Studio (Intellij) user, try add the following lines to your studio(64).vmoptions:

    -Dawt.useSystemAAFontSettings=on
    -Dswing.aatext=true
    -Dsun.java2d.xrender=true
    
    0 讨论(0)
  • 2021-01-29 19:24

    Old topic but for future visits, here is a solution that works:

    # Install both infinality and fontfix'ed JDK.
    sudo add-apt-repository ppa:no1wantdthisname/ppa
    sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix
    sudo apt-get update
    sudo apt-get install fontconfig-infinality openjdk-7-jdk
    # Apply a font style that looks good.
    sudo /etc/fonts/infinality/infctl.sh setstyle linux
    # And reboot the system.
    sudo reboot
    

    source : Demian Ferreiro in solution

    0 讨论(0)
  • 2021-01-29 19:26

    As of version release 2016.1, JetBrains is including / bundling a JRE that has the font rendering corrected.

    :)

    Scott

    0 讨论(0)
提交回复
热议问题