achaphiv / ppa-fonts

165 stars 11 forks source link

Switch back to infinality (probably bohoomil's patches) instead of freetype 2.6.4's new engine? #28

Closed achaphiv closed 8 years ago

achaphiv commented 8 years ago

I recently updated the Xenial (16.04) package to freetype 2.6.5 and enabled the new hinting engine.

From what I've seen thus far, it's better than the default rendering.

Whether it's worse than infinality remains to be seen. If anyone thinks rendering has gotten worse, post here.

squallliu commented 8 years ago

Rendering the effect is worse than the old version, because the fontconfig is not updated? Hope to return the old version or provide the old version download.

achaphiv commented 8 years ago

Hmm, which version are you on? I messed up packaging.

TiZ-HugLife commented 8 years ago

I didn't know not using infinality was an option? I thought infinality was the entire point of this repo. I can't stand regular freetype artificial emboldening, the X-only is much better. I know I've lost infinality somehow when I start seeing ugly bold fonts.

squallliu commented 8 years ago

All versions of the bold is too bold,how to improve?

TiZ-HugLife commented 8 years ago

All versions? I just know that by default, infinality uses X-only emboldening that also doesn't increase character widths. That behavior looks beautiful to me so that's all I'm after.

squallliu commented 8 years ago

ppa6 ppa7 ppa8 same, look at the picture. image image

TiZ-HugLife commented 8 years ago

With ppa7, try opening a terminal, doing export INFINALITY_FT_USE_VARIOUS_TWEAKS=true, and running an application with that.

achaphiv commented 8 years ago

ppa8 looks okay to me: ppa8

It looks like you're using the Ubuntu font, and that still looks okay to me: ppa8-ubuntu

However, I'll make a ppa9 ppa10 with bohoomil's infinality patch again just to compare.

squallliu commented 8 years ago

ppa10 looks perfect. Thank you for hard work. image image

TiZ-HugLife commented 8 years ago

Yessss, love that X-only emboldening. Thank you so much!

greatquux commented 8 years ago

Version 2.7 offers even more control since it allows compilation of both the old code and the new code and the ability to control rendering at runtime using the FREETYPE_PROPERTIES environment variable (see https://sourceforge.net/projects/freetype/files/freetype2/2.7/).

TiZ-HugLife commented 8 years ago

That would be great if we could have both. There are a lot of desirable behaviors that are only in infinality. Despite the fact that the last version looked pretty good, it'd be incomplete without them.

achaphiv commented 8 years ago

There's now a new build: 2.7-0ubuntu0ppa3.

TiZ-HugLife commented 8 years ago

I can't find any documentation on what properties are actually available to change.

achaphiv commented 8 years ago

Hmm, I'm not seeing a difference with the example listed in the release notes.

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h#n78

mentions

Just search for FT_Property_Set.

greatquux commented 8 years ago

In addition to enabling that, you also have to compile both interpreters. TT_CONFIG_OPTION_SUBPIXEL_HINTING must be defined as '3' so that both interpreters are compiled in and available at runtime.


From: achaphiv [notifications@github.com] Sent: Saturday, September 10, 2016 1:43 AM To: achaphiv/ppa-fonts Cc: Mike Russo; Comment Subject: Re: [achaphiv/ppa-fonts] Switch back to infinality (probably bohoomil's patches) instead of freetype 2.6.4's new engine? (#28)

Hmm, I'm not seeing a difference with the example listed in the release notes.

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h#n78http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h#n78

mentions

Just search for FT_Property_Set.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/achaphiv/ppa-fonts/issues/28#issuecomment-246091285, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABlEhnkJvWpE4z73NJTtVe7S8hcZ7sYsks5qokOQgaJpZM4J2fJW.

achaphiv commented 8 years ago

The patch already does that

#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )
squallliu commented 8 years ago

The same configuration, 2.7 looks good, but worse than the previous version, how tuning? I downgrade down to 2.6.5 ppa10 for the time being.

2.6.5 ppa10 image 2.7 ppa3 image

achaphiv commented 8 years ago

I don't know how you (and many others) get such different results. Are you guys using custom fontconfig settings?

Right now I'm at

TiZ-HugLife commented 8 years ago

@squallliu How'd you re-enable X-only emboldening on 2.7?

squallliu commented 8 years ago

I use win7 style. export INFINALITY_FT_FILTER_PARAMS="20 20 30 20 20" environment settings set. Removed 72 to 74 lines of the 70-forced-synthetic.conf file.

TiZ-HugLife commented 8 years ago

Okay, but isn't infinality disabled by default on 2.7? How'd you re-enable it?

squallliu commented 8 years ago

Sorry, I don't know that. I just want to bold more smooth. My configuration referred to this link https://bbs.archlinux.org/viewtopic.php?id=139543 Sorry, my English is very poor, I hope you can understand.

squallliu commented 8 years ago

@achaphiv INFINALITY* environment variables do not seem work on 2.7

drps commented 8 years ago

May be i've missed some old configurations but 2.6.1 version with fontconfig-infinality looks better than 2.7 without fontconfig-infinality in most cases for me. It will be great if i could enable/config renderer options on 2.7

greatquux commented 8 years ago

@achaphiv Did you happen to see the way TT_CONFIG_OPTION_SUBPIXEL_HINTING was defined in the patches from archfan's repository? For some reason it defines it twice.

See https://github.com/archfan/infinality_bundle/blob/acb83b884f46b4c54a5529376592739f929e0fbe/01_freetype2-iu/0002-infinality-2.7-2016.09.09.patch

lines 62 and 63: +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )

TiZ-HugLife commented 8 years ago

@squallliu, are you positive you haven't used FREETYPE_PROPERTIES or a fontconfig option to disable Y emboldening and advance widths, or better yet, to just turn the infinality renderer back on? One of the huge gains in X-only emboldening is that the i character is discernible from the l character, whereas in the default case, the stem and dot blur together a bit. Setting truetype:interpreter-version=38 in FREETYPE_PROPERTIES seems to do nothing at all.

I really, really want that X-only emboldening, haha.

squallliu commented 8 years ago

@TiZ-EX1 No, I only used the INFINALITY_FT_FILTER_PARAMS and force fake bold instead of the font's default bold.

achaphiv commented 8 years ago

@achaphiv Did you happen to see the way TT_CONFIG_OPTION_SUBPIXEL_HINTING was defined in the patches from archfan's repository? For some reason it defines it twice.

Yeah, I noticed. The 2nd #define should just overwrite the first, right?

achaphiv commented 8 years ago

There's definitely something wrong with the patch for freetype 2.7, but I can't see what's missing. It's almost entirely the same as 2.6.5.

achaphiv commented 8 years ago

Oh, wow I see it.

He forgot to #define FT_CONFIG_OPTION_INFINALITY_PATCHSET in the actual ftoption.h. It was only defined in the the devel version.

Freetype 2.7-0ubuntu0ppa4 should be working again.

squallliu commented 8 years ago

@achaphiv I have been updated to 2.7 ppa4, the problem has been fixed.

greatquux commented 8 years ago

Infinality patchset is working again in 2.7 ppa4. The FREETYPE_PROPERTIES environment variable still has no effect though, but I think most people prefer the "old" rendering anyway!

achaphiv commented 8 years ago

I think the original intent of this issue has been fulfilled. Rendering problems can go in separate issues.

achaphiv commented 8 years ago

@greatquux Surprising, FREETYPE_PROPERTIES does cause a visible difference when antialiasing is turned off.

https://github.com/achaphiv/ppa-fonts/issues/29#issuecomment-247732039

greatquux commented 8 years ago

Huh., that's surprising as it doesn't seem to have any effect for me (I export version 40, then run the 'waterfall' font demonstration program, then export with version 35 and run waterfall again which starts a new process and they look exactly the same). I'm also not sure the second #define overwrites the first, but in any case it doesn't really matter for me, as long the Infinality environment variables are respected, all our fonts look great again. :) Thanks for making this PPA and updating it to the latest version (now we can upgrade to 16.10!)