You are not logged in.
Hi,
I'm looking for help with configuring infinality to render fonts in the same way original freetype does. Hope it's possible.
I need freetype infinality to be able to use java with infinality patches, but I do like font rendering of an original freetype.
So far I tried built-in configurations (ultimate[1..5], osx), and none of them looks like original freetype. ultimate4 is the most pleasant to my eyes, but still, different. I guess my option is a custom configuration, but there are too many options for bold experiments.
Thanks in advance for help.
Last edited by eDio (2016-02-07 12:26:40)
Offline
So the obvious question is .. why use infinality if you want the original rendering?
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
I need freetype infinality to be able to use java with infinality patches
Freetype infinality is installed with jdk/jre-infinality. Tbh, I haven't checked if those are required only in build-time or in run-time too, but anyway, installing freetype2-infinality and then reverting back every time I update java doesn't sound like fun ![]()
Offline
Oh, sorry I've missed that. Can you spot a noticeable difference between jre-infinality and jre when using:
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export FT2_SUBPIXEL_HINTING=1
If yes, perhaps reference this thread in the infinality one:
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Alad, thanks for response. I haven't tried FT2_SUBPIXEL_HINTING, but I guess, it shouldn't impact Java/Swing applications. Afaik, the problem with java, is that it does not use freetype to render fonts, but has its own mechanisms for font rendering.
And yes, difference between patched and unpatched jre is tremendous (btw, infinality patches are included in jre7 openjdk but its support is disabled in Archlinux due to numerous bug reports from users. Jre8 openjdk doesn't have --enable-infinality config option. I thought it is enabled implicitly, but judging from rendering results, it is not).
Back to the issue: I found a script bundled with freetype infinality
/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-genericIt provides bundles of env variables, that infinality respects. There are more than 10 bundles including ones named "Ubuntu", "Linux", "Disabled", so I have few options to try.
All is left, is to figure out the best way to execute that script.
Although, idea of the solution is clear now, I'll write back and mark thread solved, when I have fully working solution.
Offline
Documentation in bundled scripts suggest something like the following
1. copy /usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh to /etc/X11/xinit/xinitrc.d
2. edit it setting export INFINALITY_FT="custom"
3. copy /usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic to /etc/profile.d adding .sh to name (important! Archlinux /etc/profile sources only files ending with .sh)
4. edit copied file setting export USE_STYLE = "your_style_here".
I'm not sure, why INFINALITY_FT is suggested to be set for xprofile, and all the rest variables for profile. Guess, that's just a mistake in documentation.
It is perfectly possible to declare and source everything on per-user basis in home dir. All INFINALITY_* variable take effect on application startup, so to see how new style looks, it's enough to just export new values and restart application.
Currently I'm on a slight customization of VANILLA style. It's hard to say now, if it really looks like original freetype2 (as I don't have any screenshots to compare and don't have time to experiment), but VANILLA produces clean glyphs with no dark spots in places of joints (UBUNTU style had this, looks a bit dirty), and, what's most important, with more accurate kerning (the thing that drove me insane with infinality from very start).
Offline
Addition:
It is also important to remove everything infinality-related from /etc/fonts/conf.d because it installs several substitutions which a far from good to my taste and turns on full hinting or autohinter for some fonts.
I installed original package, made a copy of conf.d, then installed infinality again, and replaced conf.d content with the backup.
Just in case, I ended up with this:
export INFINALITY_FT_FILTER_PARAMS="11 22 38 22 11"
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH=0
export INFINALITY_FT_FRINGE_FILTER_STRENGTH=0
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH=0
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH=0
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH=0
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0
export INFINALITY_FT_STEM_FITTING_STRENGTH=0
export INFINALITY_FT_GAMMA_CORRECTION="0 100"
export INFINALITY_FT_BRIGHTNESS="0"
export INFINALITY_FT_CONTRAST="0"
export INFINALITY_FT_USE_VARIOUS_TWEAKS=false
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0
export INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS=falseIt has filter array from UBUNTU preset, but turns off all other «improvements» which lead to inaccurate rendering (dark spots on joints, terrible kerning). I compared with original freetype2 — my preset is just slightly softer (due to ubuntu filter, and I like it).
Offline