Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO]Freetype subpixel font rendering - lcd monitors Pt 2
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 25, 26, 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Sun Jul 29, 2012 12:29 pm    Post subject: Reply with quote

PaulBredbury wrote:
yngwin wrote:
necessary patches have been applied

I wait years, bitching as appropriate, then ya spell my name wrong :x

My apologies. Should be fixed now.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
danilo2
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2010
Posts: 75

PostPosted: Sun Jul 29, 2012 2:46 pm    Post subject: Reply with quote

thank you! I disabled the rule "70-no-bitmaps.conf " and now the bitmap fonts are available (I hope this does not break any antialiasing or something).

Hypnos -> thank you :) Could you tell me please if configuring everything as described in yours link should I keep the ~/.fonts.conf file and if having lcd-filtering toolchain breaks something?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Sun Jul 29, 2012 2:58 pm    Post subject: Reply with quote

danilo2 wrote:
Hypnos -> thank you :) Could you tell me please if configuring everything as described in yours link should I keep the ~/.fonts.conf file and if having lcd-filtering toolchain breaks something?

I would move my ~/.fonts.conf while plaing with the infinality settings. Then, after you've optimized those settings, you can reintroduce a ~/.fonts.conf to tweak the rendering.

I'm not sure what you mean by "lcd-filtering toolchain" -- you mean from the lcd-filtering overlay? I wouldn't mix and match without knowing exactly what patches go in the packages. Before following MeisterP's instructions, replace your packages from lcd-filtering overlay with the packages from the main Portage tree. revdep-rebuild, log out/back in and make sure everything functions normally. Then, follow MeisterP's instruction to get his ebuild set working.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Sun Jul 29, 2012 6:17 pm    Post subject: Reply with quote

Okay, it is done: infinality patched packages are all in the official portage tree now!
You will need to get these versions:

media-libs/freetype-2.4.10-r1 with USE=infinality (this should pull in the fontconfig and eselect packages)
media-libs/fontconfig-infinality-20120619
app-admin/eselect-infinality-1
app-admin/eselect-lcdfilter-1
x11-libs/cairo-1.12.2-r3 (or 1.10.2-r3 if you want to stay with the old version for some reason)

I will be maintaining these packages, so if there are any issues or updates, let me know.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF


Last edited by yngwin on Mon Jul 30, 2012 6:05 am; edited 1 time in total
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Sun Jul 29, 2012 7:55 pm    Post subject: Reply with quote

Hello,

After updating from lcd-filtering overlay to official portage tree version, I got this message (when I open a terminal):

Code:
-bash: /usr/lib/ft-settings.sh: No such file or directory


Thanks!!! :)
Back to top
View user's profile Send private message
mrpdaemon
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2004
Posts: 134

PostPosted: Mon Jul 30, 2012 12:03 am    Post subject: Reply with quote

yngwin, thanks for all the hard work. I'd like to upgrade to the portage versions (using the lcdfilter overlay right now), but the issue from bug #428358 is holding me back (bad performance with cairo-1.12 without gradients patch). It would be awesome if we could push that patch to the portage version to make things smooth again.
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Mon Jul 30, 2012 6:07 am    Post subject: Reply with quote

mrpdaemon wrote:
bug #428358 is holding me back (bad performance with cairo-1.12 without gradients patch). It would be awesome if we could push that patch to the portage version to make things smooth again.

I just did. Get 1.12.2-r3 please.

I also changed the useflag on freetype from lcdfilter to infinality due to bug #428548.

I have updated my post above for clarity.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Mon Jul 30, 2012 6:14 am    Post subject: Reply with quote

alexcortes wrote:
After updating from lcd-filtering overlay to official portage tree version, I got this message (when I open a terminal):

Code:
-bash: /usr/lib/ft-settings.sh: No such file or directory

I take it something in your bash profile is calling that. It's a file that is installed by the lcd-filtering overlay only. You should remove whatever wants to call that, and use eselect-lcdfilter instead.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 30, 2012 7:36 pm    Post subject: Reply with quote

Oh, I've looked at bash* but I miss one. 8)

Thanks!!!
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Mon Jul 30, 2012 8:25 pm    Post subject: Reply with quote

I just gave it a go and it did improve my fonts alot. I want to thank everyone :) Here are my Notes
Looks like we need to put together a wiki entry if there is not one already.
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Jul 30, 2012 9:22 pm    Post subject: Reply with quote

Looks interesting. I have two serious problems after installing though:

  • .pfb fonts no longer work at all.
  • urxvt is now completely unreadable (and it's even worse than in those old screenshots) because these patches require libXft >= 2.3.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Tue Jul 31, 2012 12:14 am    Post subject: Reply with quote

Ant P. wrote:
Looks interesting. I have two serious problems after installing though:

  • .pfb fonts no longer work at all.
  • urxvt is now completely unreadable (and it's even worse than in those old screenshots) because these patches require libXft >= 2.3.
I too had spaced out fonts in urxvt. They got fixed (immediately) after I set eselect fontconfig, infinality, and lcdfilter.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
^marcs
Apprentice
Apprentice


Joined: 09 Mar 2005
Posts: 169

PostPosted: Tue Jul 31, 2012 11:16 am    Post subject: Reply with quote

I'm definitely noticing performance drop after installing cairo-1.12.2-r3, most notably in firefox - for the moment I have reverted to -r2 and everything is working fine as it used to.

PS. Thanks for getting those patches into main tree
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Jul 31, 2012 1:20 pm    Post subject: Reply with quote

ppurka wrote:
I too had spaced out fonts in urxvt. They got fixed (immediately) after I set eselect fontconfig, infinality, and lcdfilter.

Can you post `for i in fontconfig infinality lcdfilter; do eselect $i list | grep '*'; done`? I've tried a bunch of settings, even with infinality turned off, and got nowhere. The only thing that's worked for me is libXft-2.2.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Tue Jul 31, 2012 3:33 pm    Post subject: Reply with quote

Here you go:
Code:
~» for i in fontconfig infinality lcdfilter; do
for... eselect $i list | grep '*'
for... done
Available fontconfig .conf files (* is enabled):
  [2]   10-autohint.conf *
  [5]   10-sub-pixel-rgb.conf *
  [9]   11-lcdfilter-default.conf *
  [13]  20-unhint-small-dejavu-sans.conf *
  [14]  20-unhint-small-dejavu-sans-mono.conf *
  [15]  20-unhint-small-dejavu-serif.conf *
  [16]  20-unhint-small-vera.conf *
  [18]  30-metric-aliases.conf *
  [19]  30-urw-aliases.conf *
  [20]  40-nonlatin.conf *
  [21]  45-latin.conf *
  [22]  49-sansserif.conf *
  [23]  50-user.conf *
  [24]  51-local.conf *
  [25]  52-infinality.conf *
  [26]  57-dejavu-sans.conf *
  [27]  57-dejavu-sans-mono.conf *
  [28]  57-dejavu-serif.conf *
  [29]  60-latin.conf *
  [36]  65-nonlatin.conf *
  [38]  70-no-bitmaps.conf *
  [41]  90-synthetic.conf *
  [2]   infinality *
  [3]   infinality *

_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jul 31, 2012 5:16 pm    Post subject: Reply with quote

I've been using the "lcd-filtering" overlay for years, but the latest update forced me off of it and back onto the vanilla Portage version of FreeType. The rendering of DejaVu Sans Mono in Konsole became unbearable (for me) after the latest update (to freetype-2.4.10 with +lcdfilter). I also tried freetype-2.4.10-r1 with +infinality, and it was different, but still not usable.

For the benefit of all who wish to compare, I took screen shots of the same directory listing in Konsole, perfectly aligned to the exact pixel. I recommend opening these images in separate tabs and flipping back and forth between the tabs to compare.

http://www.mattwhitlock.com/freetype-2.4.10-r1_-infinality.png — okay; like it was before 2.4.10
Baseline for comparison. Has a yellowish tinge, but the letter forms are nice and consistent.

http://www.mattwhitlock.com/freetype-2.4.10_+lcdfilter.png — unusable
A great many glyphs are squished horizontally, notably the 'P'. Some glyphs look better, notably the 'w'. However, in glyphs that have "curly tails," such as '2', '6', '9', 'J', 'S', 'e', etc., the tails seem to disappear into nothing rather than coming to a nice defined end. It's as though FreeType is hinting the tips down to a single subpixel rather than leaving them at a full pixel width. Imagine a sharp, pointy end versus a flat, butt end. The 'e' looks like it has a severe "overbite."

http://www.mattwhitlock.com/freetype-2.4.10-r1_+infinality.png — unusable
This is even worse. Some glyphs are no longer square, notably the 'u'. The vertical strokes now seem thicker than the curved parts of the glyphs, notably on the 'J' and the 'p'.

I'll keep the yellow tinge if it means I can keep glyphs with consistent stroke thickness and tails that reach all the way to the edge of the glyph's bounding box rather than trailing off prematurely.

Note: This post is not meant to disparage the hard work of the people making these patches or maintaining the overlays. I just don't like the latest results of their efforts. Matter of taste.


Last edited by mwhitlock on Tue Jul 31, 2012 6:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jul 31, 2012 5:30 pm    Post subject: Reply with quote

mwhitlock wrote:
squished horizontally, notably the 'P'

This is probably INFINALITY_FT_STEM_ALIGNMENT_STRENGTH - try setting that to 0.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jul 31, 2012 6:04 pm    Post subject: Reply with quote

PaulBredbury wrote:
mwhitlock wrote:
squished horizontally, notably the 'P'

This is probably INFINALITY_FT_STEM_ALIGNMENT_STRENGTH - try setting that to 0.

The "freetype-2.4.10-r1_+infinality.png" that I posted is with all Infinality settings disabled.
Code:
# eselect fontconfig disable 52-infinality.conf
# rm /etc/env.d/99lcdfilter
# env-update
# /etc/init.d/xdm restart

Code:
$ echo "*$INFINALITY_FT_STEM_ALIGNMENT_STRENGTH*"
**
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jul 31, 2012 6:23 pm    Post subject: Reply with quote

mwhitlock wrote:
rm /etc/env.d/99lcdfilter

I don't think that's what Infinality intended, so I doubt it gives optimum results. Heck, ya need to check the sourcecode to see what "fallback" configuration values are used.

Infinality does *not* auto-detect your eyesight and monitor condition - ya need to configure it yourself.
Back to top
View user's profile Send private message
danilo2
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2010
Posts: 75

PostPosted: Tue Jul 31, 2012 6:27 pm    Post subject: Reply with quote

Hypnos wrote:

Code:
#  cave-resolve -1x freetype fontconfig-infinality --no-dependencies-from fontconfig-infinality



Is it possible in gentoo's emerge? I connot find any option allowing to disable dependencies form some packages.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 87
Location: New Hampshire, USA

PostPosted: Tue Jul 31, 2012 6:27 pm    Post subject: Reply with quote

A general observation: a huge glaring problem that I see with this method of configuring the Infinality feature set is that it operates outside of Fontconfig, so there is no way to specify Infinality settings on a font-by-font basis. For example, I can't set INFINALITY_FT_STEM_ALIGNMENT_STRENGTH only for font family "DejaVu Sans Mono" at normal or lighter weight and 12 pt or smaller size. If Infinality were configured via Fontconfig, as "lcdfilter" is, such font matching-specific overrides would be possible.

But this is a moot point for me, as even by tweaking/discarding the global Infinality settings, I can't figure out how to make FreeType with "+infinality" render my terminal font the same as FreeType with "-infinality", even when I've disabled all Infinality-provided Fontconfig tweaks and have omitted all INFINALITY_* environment variables. My understanding is that omitting the environment variables is supposed to make FreeType use its default behavior, but in fact the resulting rendering is very different.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Jul 31, 2012 6:38 pm    Post subject: Reply with quote

danilo2 wrote:
Is it possible in gentoo's emerge? I connot find any option allowing to disable dependencies form some packages.

Maybe use /etc/portage/profile/package.provided ? See "man portage"
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jul 31, 2012 6:47 pm    Post subject: Reply with quote

mwhitlock wrote:
If Infinality were configured via Fontconfig, as "lcdfilter" is, such font matching-specific overrides would be possible.

I have pointed that out previously in this thread.

Quote:
render my terminal font the same as FreeType with "-infinality"

I suggest using Infinality's own forum.
Back to top
View user's profile Send private message
IvanMajhen
Guru
Guru


Joined: 10 Jun 2006
Posts: 392
Location: Croatia

PostPosted: Tue Jul 31, 2012 7:29 pm    Post subject: Reply with quote

Does somebody know how to setup this:
http://aur.archlinux.org/packages.php?ID=26641&comments=all&detail=1

I patched poppler and rebuilded okular, but after that okular won't open pdf files. I'm not happy how fonts look in pdf files.
Acroread look much better.
Back to top
View user's profile Send private message
omidxo
n00b
n00b


Joined: 23 Feb 2005
Posts: 71

PostPosted: Wed Aug 01, 2012 3:24 am    Post subject: Reply with quote

mwhitlock wrote:
My understanding is that omitting the environment variables is supposed to make FreeType use its default behavior, but in fact the resulting rendering is very different.

Numerous switches bewildered me just like opening a Pandora's box.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 25, 26, 27, 28, 29  Next
Page 26 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum