FreeCol / freecol

FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.
GNU General Public License v2.0
588 stars 173 forks source link

Ugly text rendering #21

Closed Beep6581 closed 4 years ago

Beep6581 commented 6 years ago

Hello

The text rendered in all panels is ugly: imgur-2018_04_25-17 00 19

The text rendered in tooltips is nice (see the model.option.useXRender tooltip): imgur-2018_04_25-17 00 42

Can I do anything to make the text render nicely?

nightly-2018-04-07-4-g d4c258852

$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (IcedTea 3.7.0) (Gentoo icedtea-3.7.0)
OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode)
HighwayofLife commented 6 years ago

Seems like an anti-alias setting is disabled or turned off.

Beep6581 commented 6 years ago

Adding this to the command line solved it: -Dawt.useSystemAAFontSettings=on

More options: https://wiki.archlinux.org/index.php/Java_Runtime_Environment_fonts#Basic_settings

My full launcher command-line:

java -Xmx2G -Dsun.java2d.opengl=true -jar "$HOME/programs/code-freecol/FreeCol.jar" --freecol-data "$HOME/programs/code-freecol/data"

imgur-2018_04_29-09 54 13

imgur-2018_04_29-09 54 28

I will leave the closing of the issue to you.

Beep6581 commented 5 years ago

Now I add a freecol alias to ~/.bashrc as follows:

alias freecol='java -Xmx1G -Dsun.java2d.opengl=true -Dawt.useSystemAAFontSettings=on -jar "$HOME/programs/code-freecol/FreeCol.jar" --freecol-data "$HOME/programs/code-freecol/data"'

When I want to run freecol, I just type "freecol" without having to cd anywhere.

mpope042 commented 4 years ago

Yep, Java/OS/whatever defaults change and make FreeCol look ugly. Not a lot we can do about it, but thanks Beep6581 for finding the work around.