You are not logged in.

#26 2016-07-10 17:23:50

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: freetype2 2.6.4-2 is broken

It seems this release should have been better received a new major version. Some more info here:

http://lists.nongnu.org/archive/html/fr … 00064.html

My understanding is that upstream with new v40 TrueType interpreter now recommends antialiasing + SLIGHT hinting + FT2_SUBPIXEL_HINTING=2 (+ lcddefault and proper RGB setting) AND
only few modern font families that focus on vertical hinting like ttf-libertine. This should give a better user experience than the old style full hinting. It will take me some time to get
used to it. Cantarell font looks very sharp and clean here. Other fonts look blurry and much worse than with former FreeType release. Full hinting seems a bit worse at all with this release no matter what subpixel rendering you use.

I'm still looking for a nice font familiy supporting all styles (sans/mono/serif) that looks clean with this release.

Offline

#27 2016-07-10 19:45:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,215

Re: freetype2 2.6.4-2 is broken

He talks about the slowness of v38 used by infinality, but i really never noticed that... we have gliph cache right?
That said, it will lead me to think that infinality patched freetype will continue to look as usual since it uses v38 rasterizer; am i right?

Last edited by kokoko3k (2016-07-10 19:46:22)


Help me to improve ssh-rdp !

Offline

#28 2016-07-10 21:44:18

madigens
Member
Registered: 2015-12-06
Posts: 4

Re: freetype2 2.6.4-2 is broken

Liberation, not Libertine!

I recommend slight, lcddefault and the new v40 interpreter if you are using hintfull (== hintmedium in cairo and Qt and probably all other toolkits because there is no medium in FT). The interpreter is not active if you're using slight, that's where the autohinter resides smile

If you're used to the very sharp DejaVu and core web fonts, slight and the new hintfull will probably be a slap across the face. Give it enough of a chance and it will grow on you like fungus ^_^ Cantarell is an OpenType/CFF font by the way and therefore permanently "slight" so to speak wink The sharpness comes from its' design.

Basically, you can use whatever font you want, it's just that the core web fonts, DejaVu and for unfathomable reasons, Ubuntu show their original design goals... Compare e.g. the look of Arial and Liberation-Sans on Windows in a browser with DirectWrite enabled if you have the chance. Liberation-Sans has a much smoother look.

The slowness is evident in ftbench. FT is an library also aimed at embedded applications and v38 can be multiple times slower depending on the font, it's complex and it's unmaintained. It just didn't feel good to make it the default wink It is also not going anywhere anytime soon, so if you want to continue using it, go ahead.

I'm still looking for a nice font familiy supporting all styles (sans/mono/serif) that looks clean with this release.

Liberation, Noto smile Though DejaVu is fine, too. You just have to get used to the new look. Maybe Roboto, too. Oh, OH! I forgot about Source * Pro, go use it! I prefer the OpenType version smile

I say mostly, because it worked for some applications (Firefox, HexChat, Rhythmbox, Vim, Gnome Tweak Tool) but not for others (Gnome Files/Nautilus, Gnome Terminal).

Go check the hinting settings in gnome-tweak-tool, GNOME/GTK apps use that and ignore fontconfig.

Last edited by madigens (2016-07-10 21:55:29)

Offline

#29 2016-07-11 15:00:04

hussam
Member
Registered: 2006-03-26
Posts: 571
Website

Re: freetype2 2.6.4-2 is broken

Potomac wrote:

with "FT2_SUBPIXEL_HINTING=0" setting in /etc/environment the results are almost good, but it's not as good as freetype 2.6.3 version, some fonts are a little too bold, but to see the difference between 2.6.4 and 2.6.3 version the user must have a very good eye and a good LCD screen

I tried that. Fonts look randomly smudged on my new LCD especially ones with a vertical line such as L or I or D.

Offline

#30 2016-07-11 15:04:47

ratcheer
Member
Registered: 2011-10-09
Posts: 833

Re: freetype2 2.6.4-2 is broken

I tried various combinations of suggestions from the posts of this thread, and I think I finally arrived at a situation I like.

I changed antialias from false to true. I already had hintslight and rgb. Then I edited /etc/security/pam_env.conf and added "FT2_SUBPIXEL_HINTING DEFAULT=2".

Everything looks great. The only real problem I was having before was file upload dialogs and such. The fonts looked very spidery and washed out.

Tim

Offline

#31 2016-07-11 17:25:50

madigens
Member
Registered: 2015-12-06
Posts: 4

Re: freetype2 2.6.4-2 is broken

Guys yikes FT2_SUBPIXEL_HINTING shouldn't do anything if you're using hintslight, it will only have an effect with hintmedium and hintfull (the same thing in all toolkits I know). hintslight triggers the autohinter and gives you the "Ubuntu look". Using hintfull/medium and FT2_SUBPIXEL_HINTING=0 gives you the 2.6.3 rendering.

Offline

#32 2016-07-11 17:34:07

ratcheer
Member
Registered: 2011-10-09
Posts: 833

Re: freetype2 2.6.4-2 is broken

@madigens - Hmmm. I changed to hintmedium, restarted X, and I see no difference. Everything still looks good, but the same as with hintslight,

What a murky pond we swim in.

Tim

Offline

#33 2016-07-11 19:44:30

madigens
Member
Registered: 2015-12-06
Posts: 4

Re: freetype2 2.6.4-2 is broken

I remember leaving a rogue hinting configuration file in /etc/fonts/conf.d or something and getting really weird results that I couldn't reproduce later. Font configuration is a big mess and it itches me to rip it out across the entire stack. Maybe it's best if you reset /etc/fonts/conf.d/ to the distro default, move your local .config/fontconfig/fonts.conf somewhere else, do not set FT2_SUBPIXEL_HINTING anywhere and start fresh.

Last edited by madigens (2016-07-11 19:45:00)

Offline

#34 2016-07-12 14:17:56

heftig
Developer
From: Germany
Registered: 2010-04-19
Posts: 152

Re: freetype2 2.6.4-2 is broken

2.6.5 changed the default back to FT2_SUBPIXEL_HINTING=0.

2.7 will return to 2.6.4's rendering by default and remove FT2_SUBPIXEL_HINTING in favor of upstream's configuration method, which has a different syntax. We will install a file /etc/profile.d/freetype2.sh to configure it, including a brief documentation.

ratcheer wrote:

@madigens - Hmmm. I changed to hintmedium, restarted X, and I see no difference. Everything still looks good, but the same as with hintslight,

What a murky pond we swim in.

Tim

If gnome-settings-daemon is running, the org.gnome.settings-daemon.plugins.xsettings hinting setting in GSettings will override fontconfig in GTK apps (GTK3 apps on Wayland do this even without gnome-settings-daemon; the reason is that the "XSETTINGS" communication path between GSD and GTK through X selections is gone and was hacked around).

There may also be a setting "Xft.hintstyle" in the Xresources (xrdb -q) that will affect any app using Xft to load fonts.

Last edited by heftig (2016-07-12 14:30:08)

Offline

#35 2016-07-12 15:33:04

ratcheer
Member
Registered: 2011-10-09
Posts: 833

Re: freetype2 2.6.4-2 is broken

@heftig - I do not have a gnome-settings-daemon running. I do have xft settings in .Xresources, but they match what I have in fonts.conf, exactly.

Thanks,
Tim

Offline

#36 2016-09-11 12:04:01

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

heftig wrote:

2.6.5 changed the default back to FT2_SUBPIXEL_HINTING=0.

2.7 will return to 2.6.4's rendering by default and remove FT2_SUBPIXEL_HINTING in favor of upstream's configuration method, which has a different syntax. We will install a file /etc/profile.d/freetype2.sh to configure it, including a brief documentation.

There may also be a setting "Xft.hintstyle" in the Xresources (xrdb -q) that will affect any app using Xft to load fonts.

I just upgraded (against my better judgment I suppose)  to freetype2 2.7-2 and edited the /etc/profile.d/freetype2.sh, trying each of 35, 38 and 40 settings.  I just cannot notice ANY difference between these 3 values; AND my fonts are back to being screwed up.

I had resolved this font issue with previous version (freetype2-2.6.5-2) by using the fix recommended in this thread, namely create /etc/profile.d/extra.sh with

  export FT2_SUBPIXEL_HINTING=0  # Classic mode 

After installing freetype2 2.7-2, commenting out that line in extras.sh (which should just be a dead file now), again, fonts are back to being messed up....

What am I missing?

Offline

#37 2016-09-11 12:23:57

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: freetype2 2.6.4-2 is broken

stef_204, read the simple instructions.

Here's a patch I made and am using, to force Infinality rendering on in freetype 2.7:

cat freetype-2.7-infinality.patch
diff -Naur a/devel/ftoption.h b/devel/ftoption.h
--- a/devel/ftoption.h	2016-09-02 07:19:35.000000000 +0100
+++ b/devel/ftoption.h	2016-09-10 15:59:12.654590166 +0100
@@ -674,9 +674,8 @@
   /*                                                                       */
   /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
   /*                                                                       */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1     */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2     */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING     ( 1 | 2 )
 
 
   /*************************************************************************/

Offline

#38 2016-09-11 13:09:49

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

brebs wrote:

stef_204, read the simple instructions.

Here's a patch I made and am using, to force Infinality rendering on in freetype 2.7:

cat freetype-2.7-infinality.patch
diff -Naur a/devel/ftoption.h b/devel/ftoption.h
--- a/devel/ftoption.h	2016-09-02 07:19:35.000000000 +0100
+++ b/devel/ftoption.h	2016-09-10 15:59:12.654590166 +0100
@@ -674,9 +674,8 @@
   /*                                                                       */
   /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
   /*                                                                       */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1     */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2     */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING     ( 1 | 2 )
 
 
   /*************************************************************************/

I have read the "simple" instructions--to me, nothing seems simple where freetype2 is involved.

 # Uncomment and configure below
#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

which is exactly what I did.

If I read your reply correctly, you are using compile-time options.  So I need to patch freetype2 then?

Can you please provide a link to instructions?

Last edited by stef_204 (2016-09-11 14:15:06)

Offline

#39 2016-09-11 14:25:13

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,215

Re: freetype2 2.6.4-2 is broken

Sorry to jump into this, but what does infinality rendering means?
Does freetype honours all INFINALITY_* environment vars that way or what?
...still using ultimate packages here.


Help me to improve ssh-rdp !

Offline

#40 2016-09-11 14:47:21

Potomac
Member
Registered: 2011-12-25
Posts: 519

Re: freetype2 2.6.4-2 is broken

stef_204 wrote:

  So I need to patch freetype2 then?

Can you please provide a link to instructions?

no need to patch,

what you need to do is :

- edit the file /etc/profile.d/freetype2.sh by uncommenting the line #export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

- set "35" instead of "40" : export FREETYPE_PROPERTIES="truetype:interpreter-version=35"

- and finally reboot or logout, it's important because sometimes the changes made in freetype configuration need a reboot/logout

Last edited by Potomac (2016-09-11 14:49:55)

Offline

#41 2016-09-11 15:03:49

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

Potomac wrote:
stef_204 wrote:

  So I need to patch freetype2 then?

Can you please provide a link to instructions?

no need to patch,

what you need to do is :

- edit the file /etc/profile.d/freetype2.sh by uncommenting the line #export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

- set "35" instead of "40" : export FREETYPE_PROPERTIES="truetype:interpreter-version=35"

- and finally reboot or logout, it's important because sometimes the changes made in freetype configuration need a reboot/logout

@potomac

As described in my previous post of today, I have already done all that PRIOR to posting here.  It is  not working for me, the 3 settings seem to have no impact on my system.
Example, "dejavu sans mono " is now horrible, after upgrading to freetype2-2.7-2

Last edited by stef_204 (2016-09-11 15:09:12)

Offline

#42 2016-09-11 15:19:26

stefan
Member
Registered: 2013-03-22
Posts: 93

Re: freetype2 2.6.4-2 is broken

brebs wrote:

stef_204, read the simple instructions.

This actually worked for me.

Note that there's no reason to reboot (this is not Windows!) fora
quick test.  Just type at the shell prompt (this is Linux!)

    $ FREETYPE_PROPERTIES="truetype:interpreter-version=35" xterm

This gives me the nice look I've had before.

Last time I ran into this issue, it was suggested on this forum to add
a file

    $ cat /etc/fonts/local.conf
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
            <!-- Disable the effects of 10-hinting-slight.conf -->
            <match target="font">
                    <test name="hintstyle" compare="eq">
                            <const>hintslight</const>
                    </test>
                    <edit name="hintstyle" mode="delete"/>
            </match>
    </fontconfig>

which still needs to be present for this to work.

I get the impression that every now and then a new means to configure
freetype (or any other system component) is invented for no good
reason.  And than we have to sort out this crap here...

Offline

#43 2016-09-11 15:28:37

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

stefan wrote:
brebs wrote:

stef_204, read the simple instructions.

This actually worked for me.

Note that there's no reason to reboot (this is not Windows!) fora
quick test.  Just type at the shell prompt (this is Linux!)

    $ FREETYPE_PROPERTIES="truetype:interpreter-version=35" xterm

This gives me the nice look I've had before.

Last time I ran into this issue, it was suggested on this forum to add
a file

    $ cat /etc/fonts/local.conf
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
            <!-- Disable the effects of 10-hinting-slight.conf -->
            <match target="font">
                    <test name="hintstyle" compare="eq">
                            <const>hintslight</const>
                    </test>
                    <edit name="hintstyle" mode="delete"/>
            </match>
    </fontconfig>

which still needs to be present for this to work.

I get the impression that every now and then a new means to configure
freetype (or any other system component) is invented for no good
reason.  And than we have to sort out this crap here...

It's great that it works for you but it doesn't for me.

I have the xml file, in this location:

% cat .config/fontconfig/fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <!-- Disable the effects of 10-hinting-slight.conf -->
        <match target="font">
                <test name="hintstyle" compare="eq">
                        <const>hintslight</const>
                </test>
                <edit name="hintstyle" mode="delete"/>
        </match>
</fontconfig>

Edit: pasted the full file including last line

Last edited by stef_204 (2016-09-11 16:10:57)

Offline

#44 2016-09-11 15:42:00

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: freetype2 2.6.4-2 is broken

kokoko3k wrote:

Does freetype honour all INFINALITY_* environment vars?

No - freetype 2.7 doesn't have any of the tweakable Infinality settings that Ultimate has.

Grep the source code for "getenv", to see more detail. The only similar var is:

./src/base/ftinit.c:    env = ft_getenv( "FREETYPE_PROPERTIES" );

Personally, I might go back to (an old version of) Ultimate.

Edit: stef_204, your config file is missing at the end:

</fontconfig>

Last edited by brebs (2016-09-11 15:51:19)

Offline

#45 2016-09-11 15:46:14

anthon
Member
Registered: 2013-05-13
Posts: 34

Re: freetype2 2.6.4-2 is broken

stefan wrote:

Note that there's no reason to reboot (this is not Windows!) fora
quick test.

Personnally I had to reboot (a logout would probably have sufficed though), otherwise, while I noticed a change, my fonts would be all blurry. But maybe what stef_204 is experiencing is diffferent because he can't even see a difference between the different modes.

Offline

#46 2016-09-11 16:08:04

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

brebs wrote:

Edit: stef_204, your config file is missing at the end:

</fontconfig>

Thanks, just checked but it's not, I just screwed up the pasting.

So are you able to provide more troubleshooting steps or suggestions for me?

Offline

#47 2016-09-11 18:20:06

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

anthon wrote:

But maybe what stef_204 is experiencing is diffferent because he can't even see a difference between the different modes.

Would seem that way....

I have tried it again, starting from scratch, checked xml config file, checked the value in /etc/profile.d/freetype2.sh and that line is un-commented, logged out, rebooted, etc.

No noticeable changes between the 35,38 and 40 values on my box with freetype2-2.7-2. And font still messed up.

Again, back to freetype2-2.6.5-2 AND /etc/profile.d/extras.sh with this line:

export FT2_SUBPIXEL_HINTING=0  # Classic mode

and all seems normal with that setup.

So there is something going on here with  freetype2-2.7-2 that my system doesn't like.

Offline

#48 2016-09-11 18:50:41

stefan
Member
Registered: 2013-03-22
Posts: 93

Re: freetype2 2.6.4-2 is broken

anthon wrote:
stefan wrote:

Note that there's no reason to reboot
(this is not Windows!) for a quick test.

Personnally I had to reboot

Sorry, let me clarify: If it has to do with environment variables,then
for *testing* which variables actually do have an effect, it should
not be required to even log out.

Having checked which variables need change, and to make them
permanent, one has to go bejond the point where they are set, i.e., if
set in something like ~/.progile, then a logout is probably required.


stef_204 wrote:

It's great that it works for you but it doesn't for me.

Well, sorry.  I'm also quite frustrated about fontconfig biting me
every now and then.  And I've only posted what fixed it for me.  I'm
not at all insinuating it would be your fault.


stef_204 wrote:

I have the xml file, in this location:

% cat .config/fontconfig/fonts.conf

Hmm, I have no idea whether the location or the different DOCTYPE do
play a role.  Here's my environment, note that it also contains
`FT2_SUBPIXEL_HINTING=0`.  I have no idea what else could have an
effect...

    $ env
    XDG_VTNR=1
    XDG_SESSION_ID=c1
    SSH_AGENT_PID=519
    TERM=xterm
    SHELL=/bin/bash
    FVWM_USERDIR=/home/sk/.fvwm
    HOSTDISPLAY=tauhou:0
    WINDOWID=18874402
    XTERM_SHELL=/bin/bash
    USER=sk
    LS_COLORS=no=00:fi=00:bd=01;30:cd=01;30:di=1;34:do=40;33:ex=00;31:pi=40;33:ln=target:or=40;33;01:so=40;33:
    SSH_AUTH_SOCK=/tmp/ssh-bOCfA6onRTmI/agent.518
    MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
    FT2_SUBPIXEL_HINTING=0
    MAIL=/var/spool/mail/sk
    PATH=/home/sk/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    FREETYPE_PROPERTIES=truetype:interpreter-version=35
    QT_IM_MODULE=xim
    PWD=/home/sk
    LANG=en_US.UTF-8
    XTERM_LOCALE=en_US.UTF-8
    XTERM_VERSION=XTerm(325)
    SHLVL=3
    XDG_SEAT=seat0
    HOME=/home/sk
    LESS=-i -j10 -M -R
    LOGNAME=sk
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
    FVWM_MODULEDIR=/usr/lib/fvwm/2.6.6
    WINDOWPATH=1
    DISPLAY=:0
    XDG_RUNTIME_DIR=/run/user/1000
    GTK_IM_MODULE=xim
    NO_AT_BRIDGE=1
    XAUTHORITY=/home/sk/.Xauthority
    _=/usr/bin/env

Offline

#49 2016-09-11 19:29:36

stef_204
Member
Registered: 2014-08-15
Posts: 37

Re: freetype2 2.6.4-2 is broken

stefan wrote:

I'm also quite frustrated about fontconfig biting me
every now and then.

Seems after every freetype2 upgrade, with the constant flip-flopping upstream, etc.
And frustrating is certainly a good choice of words....

I have no idea whether the location or the different DOCTYPE do
play a role.

It does actually, one affects user settings, the other system settings.

Here's my environment, note that it also contains
`FT2_SUBPIXEL_HINTING=0`

Same here.

Last edited by stef_204 (2016-09-11 19:30:53)

Offline

#50 2016-09-11 21:22:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: freetype2 2.6.4-2 is broken

*Look* at the source code. FT2_SUBPIXEL_HINTING is not in the source code, so it is irrelevant.

What you want, with freetype 2.7, is e.g.:

export FREETYPE_PROPERTIES="truetype:interpreter-version=38"

Offline

Board footer

Powered by FluxBB