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 ... 16, 17, 18 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Infinality
n00b
n00b


Joined: 12 Aug 2010
Posts: 24
Location: Wisconsin, USA

PostPosted: Sat Oct 09, 2010 4:51 am    Post subject: Reply with quote

Even though I specifically pointed out that this particular patch (20101004-2) was probably broken, I still hate to have people spinning their wheels with problems and bugs. You guys are kind of my "beta testers" as I get the most feedback out of you. I check the Gentoo and Archlinux forums pretty regularly, but if you find an issue, feel free to make a post on my blog.

---

Also, on an unrelated note, I do like the Gibson filter you have been pushing { 0x1c, 0x38, 0x55, 0x38, 0x1c }, but I've found that at least on my monitor, it looks better with 0x60 in the middle. I think the FIR filter is very dependent on one's monitor contrast and gamma. On my monitor at work, I'm pretty sure the default Gibson filter would look much nicer. That's what you get when you buy a cheap monitor. ;)

I'm working on a "membership/sigmoidal function" filter to precede the FIR filter, which does a pretty good job of duplicating the "Microsoft graininess", for those that prefer it that way. Basically it lowers values less than half intensity, and raises those above half intensity. If you want to tinker with it here it is:

val = 256.0 /(1.0+exp(-(10.0*(val/256.0-.5))));

It goes right before the line "pix = fir[0] + weights[0] * val;"
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Oct 09, 2010 5:46 am    Post subject: Reply with quote

Quote:
hate to have people spinning their wheels with problems and bugs

This single, huge, public thread is primarily for users, and tweakers (e.g. me). We want to know what works stably, and what doesn't, and what might look better with tweaks (and how to apply those tweaks). It's the best single source of info for the state-of-the-art in font rendering under Linux, AFAIK.

This thread, at risk of stating the obvious, serves a different purpose to a developer's forum or blog.

You changed freetype-add-subpixel-hinting-infinality-20101008-1.patch without calling it "-2", so I mentioned the filesize, to reduce confusion for the users.

The bug report on the firefox-crashing URL was already present.

Users will bitch & moan mercilessly, unless everything looks and works perfectly (which will never happen with fonts, until screens have 600+ DPI instead of ~120) :twisted:

Quote:
0x60

This looks even better, thanks.
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sat Oct 09, 2010 12:38 pm    Post subject: Reply with quote

I've updated the overlay with the last patchset (including paul's gibson filter improved by infinality) but I haven't changed the version of the ebuild (you have to manually reemerge freetype after updating the overlay : emerge -1 freetype).
_________________
OGMRip - LCD filtering (Wiki)
Back to top
View user's profile Send private message
jcTux
Apprentice
Apprentice


Joined: 29 Dec 2009
Posts: 276
Location: Tours, France

PostPosted: Sat Oct 09, 2010 1:39 pm    Post subject: Reply with quote

I have no more crashes with okular.
Back to top
View user's profile Send private message
KejPi
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2004
Posts: 122
Location: Prague, Czech republic

PostPosted: Sat Oct 09, 2010 1:40 pm    Post subject: Reply with quote

Wouldn't it be better to increase revision in this case so that people not following this thread know about changes?
_________________
hidentity.org
Back to top
View user's profile Send private message
Infinality
n00b
n00b


Joined: 12 Aug 2010
Posts: 24
Location: Wisconsin, USA

PostPosted: Sat Oct 09, 2010 1:45 pm    Post subject: Reply with quote

KejPi wrote:
Wouldn't it be better to increase revision in this case so that people not following this thread know about changes?


I debated updating the version number here, and probably should have, but I figured since it was only an hour or so since the initial release, I could squeeze it in without anyone noticing. ;)
Back to top
View user's profile Send private message
KejPi
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2004
Posts: 122
Location: Prague, Czech republic

PostPosted: Sat Oct 09, 2010 1:51 pm    Post subject: Reply with quote

Well, a general rule says that you should not release two different things with the same ID (version number). At the end breaking this rule usually leads to some confusion.
But I don't want to complain - I am happy I can use it :-)
_________________
hidentity.org
Back to top
View user's profile Send private message
jsevilleja
n00b
n00b


Joined: 21 May 2010
Posts: 14

PostPosted: Sat Oct 09, 2010 6:28 pm    Post subject: unaligned fonts Reply with quote

I've followed the wiki from lcd-filtering overlay with the fonts.conf from infinality, and now everything looks great. The only problem I've found, is, that in konsole, for example, when I'm typing, the bash "cursor" (I don't know if you guys call it "cursor") always goes two or three spaces ahead the keys. This also causes that the columns from the output of an "ls -la /" aren't aligned. How can I solve this? Thanks.
Back to top
View user's profile Send private message
KejPi
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2004
Posts: 122
Location: Prague, Czech republic

PostPosted: Sat Oct 09, 2010 6:33 pm    Post subject: Re: unaligned fonts Reply with quote

jsevilleja wrote:
The only problem I've found, is, that in konsole, for example, when I'm typing, the bash "cursor" (I don't know if you guys call it "cursor") always goes two or three spaces ahead the keys. This also causes that the columns from the output of an "ls -la /" aren't aligned. How can I solve this? Thanks.

I had this problem too - solved by choosing different font - monotype (I think this is the default one) does not work good.
_________________
hidentity.org
Back to top
View user's profile Send private message
jsevilleja
n00b
n00b


Joined: 21 May 2010
Posts: 14

PostPosted: Sat Oct 09, 2010 6:46 pm    Post subject: Re: unaligned fonts Reply with quote

KejPi wrote:
jsevilleja wrote:
The only problem I've found, is, that in konsole, for example, when I'm typing, the bash "cursor" (I don't know if you guys call it "cursor") always goes two or three spaces ahead the keys. This also causes that the columns from the output of an "ls -la /" aren't aligned. How can I solve this? Thanks.

I had this problem too - solved by choosing different font - monotype (I think this is the default one) does not work good.


Sorry, but, exactly, how did you do that? Thanks
Back to top
View user's profile Send private message
KejPi
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jan 2004
Posts: 122
Location: Prague, Czech republic

PostPosted: Sat Oct 09, 2010 6:58 pm    Post subject: Re: unaligned fonts Reply with quote

jsevilleja wrote:

Sorry, but, exactly, how did you do that? Thanks

Konsole -> Settings -> Set profiles -> Change -> Look -> Change font
Sorry for probably not correct translation, I am using localised version of KDE
_________________
hidentity.org
Back to top
View user's profile Send private message
jsevilleja
n00b
n00b


Joined: 21 May 2010
Posts: 14

PostPosted: Sat Oct 09, 2010 7:12 pm    Post subject: Re: unaligned fonts Reply with quote

KejPi wrote:
jsevilleja wrote:

Sorry, but, exactly, how did you do that? Thanks

Konsole -> Settings -> Set profiles -> Change -> Look -> Change font
Sorry for probably not correct translation, I am using localised version of KDE


Solved, thanks. I thought that you were referring to change the local.conf. :)
Back to top
View user's profile Send private message
equilibrium
Apprentice
Apprentice


Joined: 29 Jun 2003
Posts: 213
Location: UK

PostPosted: Sat Oct 09, 2010 10:27 pm    Post subject: Reply with quote

PaulBredbury wrote:
Here's my ~/.fonts.conf for Infinality's rendering, which is the best rendering - but, use Infinality's own configuration, since he does a better job than me.

For posterity, here's my old ~/.fonts.conf for Ubuntu's rendering.

I just installed the changes/configs etc as suggested, rebooted and am just amazed at how much better fonts look :D
_________________
kernel 4.15.17-1-equk | i3wm | github
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sun Oct 17, 2010 12:10 am    Post subject: Reply with quote

Another update: http://www.infinality.net/blog/?p=208 (Freetype Autohint Enhancement Patch)

Infinality, thanks!
_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
legogogo
n00b
n00b


Joined: 08 May 2010
Posts: 2

PostPosted: Mon Oct 18, 2010 4:14 pm    Post subject: Reply with quote

Why if firefox fonts is not like in other system? How it change?

http://lostpic.net/images/653ab65c1dce062f39325710a323a105.png
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Oct 23, 2010 5:48 am    Post subject: Reply with quote

There's a security bug and new 20101022 Infinality patches, so here's an all-in-one patch (freetype-2.4.3-20101023-2-brebs.patch.bz2) to apply to vanilla freetype2-2.4.3 - it includes:
    freetype-add-subpixel-hinting-infinality-20101022-1.patch
    freetype-enable-subpixel-hinting-infinality-20100909-1.patch
    freetype-enhance-emboldening-infinality-20101022-1.patch
    freetype-auto-autohint-for-non-tt-hinted-fonts-infinality-20101002-1.patch
    freetype-enhance-autohint-infinality-20101022-1.patch
    freetype-use-modified-gibson-filter-infinality-20101022-1.patch
    freetype-2.2.1-enable-valid.patch
    freetype2-git-20101023 (from: git diff a5a32c15c594d57b9a512e3b50721caedb5697bc), which includes the security fix.
    sed -i -r 's:.*(#.*TT_CONFIG_OPTION_SUBPIXEL_HINTING.*) .*:\1:' include/freetype/config/ftoption.h - to ensure that Infinality's experimental stuff is enabled
    sed -i -r 's:.*(#.*SYSTEM_ZLIB.*) .*:\1:' include/freetype/config/ftoption.h - To use system ZLIB
    rm -f include/freetype/config/ftoption.h.orig src/base/ftobjs.c.orig src/truetype/ttinterp.c.orig - To remove useless files

So, this is the latest of everything including the kitchen sink, in terms of patches to freetype2 :)
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sat Oct 23, 2010 10:03 am    Post subject: Reply with quote

Updated LCD Filtering accordingly.
_________________
OGMRip - LCD filtering (Wiki)
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sun Oct 24, 2010 1:11 am    Post subject: Reply with quote

bi3l, Do you use the lcdfilter patch for poppler? I can't get Evince to use it...
_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sun Oct 24, 2010 10:13 am    Post subject: Reply with quote

No, I have not maintained poppler's ebuild in LCD filtering for a while. Do you want me to update it ?
_________________
OGMRip - LCD filtering (Wiki)
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sun Oct 24, 2010 11:36 am    Post subject: Reply with quote

I've already bumped it in my local overlay. It cleanly apply to poppler 0.14.4 although Evince doesn't seem to care... all I get is monochrome antialiasing :/

EDIT:
Looks like Evince needs patching, I'm working on it right now.
_________________
Gentoo ~AMD64 | Audacious


Last edited by tallica on Sun Oct 24, 2010 1:31 pm; edited 2 times in total
Back to top
View user's profile Send private message
vnekontakta
n00b
n00b


Joined: 24 Oct 2010
Posts: 1

PostPosted: Sun Oct 24, 2010 1:06 pm    Post subject: Reply with quote

Hello! Yesterday after updating freetype library from lcd-filtering overlay i noticed that cyrillic small letter "у" looks broken in browser when html page using Trebuchet MS from corefont package (in both Firefox-3.6.9 and Chromium-7.0.517.41). When i downgraded from freetype-2.4.3 to 2.4.2 (same lcd-filtering overlay) problem is gone, but fonts looks not so good like with freetype-2.4.3. I use x86_64 system.

Screenshot from page http://www.linux.org.ru/ :
http://youpic.su/view.php?id=s001.youpic.su/pictures/1287853200/0605bbf0ea438d144fd1d3514e36d635.png
Bigger: http://youpic.su/view.php?id=s001.youpic.su/pictures/1287853200/cbb6d64778e54f646ba4e15fd44979f9.png

Or from here http://www.ienews.ru/pochemu_putin_krab.html :
http://youpic.su/view.php?id=s001.youpic.su/pictures/1287853200/ad8dccef17767343156886fd041f1726.png

Bold small letter looks fine.
In system this letter also broken:
http://youpic.su/view.php?id=s001.youpic.su/pictures/1287853200/1bfd315a6473171a6cf80383cbaf5a1f.png
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sun Oct 24, 2010 3:48 pm    Post subject: Reply with quote

Ok, I've found a patch: https://bbs.archlinux.org/viewtopic.php?id=82529 I've applied it against Evince 2.30.3, but I'm not 100% satisfied: http://ompldr.org/vNXd1bw/evince.png

Code:
--- a/backend/pdf/ev-poppler.cc   Sun Oct 24 15:06:16 2010 +0200
+++ b/backend/pdf/ev-poppler.cc   Sun Oct 24 17:44:39 2010 +0200
@@ -379,10 +379,24 @@
 
 #ifdef HAVE_POPPLER_PAGE_RENDER
    cairo_t *cr;
+   cairo_font_options_t *options;
 
    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                      width, height);
+
+   memset (cairo_image_surface_get_data (surface), 0xff,
+      cairo_image_surface_get_height (surface) *
+      cairo_image_surface_get_stride (surface));
+
+   options = cairo_font_options_create ();
+   cairo_surface_get_font_options (surface, options);
+   cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_SUBPIXEL);
+   cairo_font_options_set_subpixel_order (options, CAIRO_SUBPIXEL_ORDER_RGB);
+   cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE);
+   
    cr = cairo_create (surface);
+   cairo_set_font_options (cr, options);
+   cairo_font_options_destroy (options);
 
    switch (rc->rotation) {
            case 90:


Setting CAIRO_HINT_STYLE_NONE/FULL/SLIGHT doesn't seem to make any difference. Is there anything that I can improve?

EDIT:
Difference between Evince and Gnome-terminal rendering: http://ompldr.org/vNXd4aw
_________________
Gentoo ~AMD64 | Audacious


Last edited by tallica on Sun Oct 24, 2010 6:38 pm; edited 3 times in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 24, 2010 3:58 pm    Post subject: Reply with quote

vnekontakta wrote:
cyrillic small letter "у" looks broken in browser when html page using Trebuchet MS

Yeah, looks broken to me too. It's been reported in Infinality's new forum.
Back to top
View user's profile Send private message
mbar
Veteran
Veteran


Joined: 19 Jan 2005
Posts: 1983
Location: Poland

PostPosted: Sun Oct 24, 2010 7:45 pm    Post subject: Reply with quote

Inconsolata Medium (12 points) has also the letter "m" rendering broken.
EDIT: at least when it's colored (not black), do "ls -la" on directory with files with "m" in filename.
Back to top
View user's profile Send private message
pezed
n00b
n00b


Joined: 16 Oct 2003
Posts: 31

PostPosted: Mon Nov 01, 2010 1:57 am    Post subject: Reply with quote

After updating the overlay and emerging world today I noticed my fonts looked bad. I reverted back to "bf61c65" which is from September and now things look back to how they should. Not sure whats going on here:

Example (load them in seperate tabs to quickly switch between them to see the differences):

Fonts how they look using "bf61c65" (what I consider to be "good" rendering):
http://www.imgbin.org/index.php?page=image&id=2720

Fonts using HEAD:
http://www.imgbin.org/index.php?page=image&id=2719

Notice how bad the bold e's appear, the bold s's appear too thin, overall the fonts seem too tall. Guess I'll just stick with the older revision for now but just curious, are these changes intentional or some misconfiguration on my end?
Thanks.
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 ... 16, 17, 18 ... 27, 28, 29  Next
Page 17 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