You are not logged in.
Influenced by a user of Rocky Linux here:
https://forums.rockylinux.org/t/ugly-fo … ation/8734
I'm trying to improve font rendering on OmegaT. Font rendering for me isn't as poor as for that user, but still is janky compared to the rest of my OS, see pic at the bottom of this post, next to a comparison of the same text in different apps (I'm running Gnome, and have used this from the Manjaro wiki to improve font rendering: https://wiki.manjaro.org/index.php/Impr … Rendering). Unlike for that user, font rendering on the Flatpak of OmegaT is also poor.
Per this page on the Arch Wiki:
https://wiki.archlinux.org/title/Java_R … ment_fonts
I should be able to add something like this to ~/.bashrc :
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp'and OmegaT, as a Java application, should render fonts with the specified anti-aliasing. However, fonts are rendered exactly as before adding the code to .bashrc (see image below).
The environment variable is active:
$ printenv
[...truncated..]
_JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=gaspIs there any reason that OmegaT (or any other Java application) wouldn't be responding to this variable?
https://i.imgur.com/YQiebdl.png
https://i.imgur.com/odwi8xo.png
Last edited by V1del (2024-04-20 12:02:38)
Offline
Please post thumbnails instead of huge pictures, see https://wiki.archlinux.org/title/Genera … s_and_code .
Are you using https://aur.archlinux.org/packages/omegat ?
awt is rather old and was used a lot in java 6/ 7/ 8 times, what java version are you running omegat with ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thanks for the heads-up - I thought it was important to show the font rendering in detail here, but that could have been done with a smaller screenshot, you're right.
I installed OmegaT from here (Linux with 64-bit JRE): https://omegat.org/download - the package includes a .sh file. I installed with this, I believe it just links to an executable. Perhaps this could be the reason it seems immune to environment variables?
I use this download rather than the AUR version as it plays nicer with the Gnome dash. Install is also way faster (instantaneous, in fact).
$ java -version
Picked up _JAVA_OPTIONS: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
openjdk version "22" 2024-03-19
OpenJDK Runtime Environment (build 22)
OpenJDK 64-Bit Server VM (build 22, mixed mode, sharing)Offline
Are you starting it from the terminal that gives you that printenv? otherwise if from a graphical session, chances are your .bashrc isn't sourced. There are more globally relevant spots that display managers will also source: https://wiki.archlinux.org/title/Enviro … s#Per_user
Offline
I was starting it from the Gnome dash, not the terminal. Here's the output when starting from the terminal:
$ omegat
Picked up _JAVA_OPTIONS: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Apr 20, 2024 2:35:04 PM tokyo.northside.logging.LoggingEventDecoratorActive performLog
INFO:
===================================================================
OmegaT-6.1.0_0_ade8dc7 (20/04/2024, 14:35) Locale English (United Kingdom)
Apr 20, 2024 2:35:04 PM tokyo.northside.logging.LoggingEventDecoratorActive performLog
INFO: Java: Eclipse Adoptium ver. 17.0.9, executed from '/opt/omegat/jre'
60978: Info: Jar used for plugins: file:/opt/omegat/OmegaT_6.1.0/modules/aligner-omegat.jar (PLUGIN_LOAD_JAR) Where it evidently is sourcing the .bashrc. Setting
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp'there makes fonts render markedly worse when OmegaT is launched from terminal: they are unchanged when launching from Gnome dash.
So this confirms that launching from Gnome dash does not source .bashrc. What it doesn't explain is why the sourced font settings have suboptimat results. Possibly that's just a limitation of Java on Linux.
Last edited by Amicar (2024-04-20 13:01:12)
Offline
FWIW I've never seen "gasp" the general reccommendation is "on": https://wiki.archlinux.org/title/Java#B … _rendering
While it apparently is a valid option, there are some others: https://docs.oracle.com/javase/8/docs/t … ml#aaFonts
Last edited by V1del (2024-04-20 13:35:29)
Offline
https://wiki.archlinux.org/title/Java_R … p_settings
Try "lcd", it looks like the only difference is subpixel hinting, but idk. whether any of that will get you use fontconfig hinting strategies or java is limited to internal stuff.
Use _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=off' to make sure it's applied (you're not gonna miss that)
Offline