Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[HOWTO]Freetype subpixel font rendering - lcd monitors Pt 2

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
720 posts
  • Page 17 of 29
    • Jump to page:
  • Previous
  • 1
  • …
  • 15
  • 16
  • 17
  • 18
  • 19
  • …
  • 29
  • Next
Author
Message
Infinality
n00b
n00b
User avatar
Posts: 24
Joined: Thu Aug 12, 2010 1:21 am
Location: Wisconsin, USA
Contact:
Contact Infinality
Website

  • Quote

Post by Infinality » Sat Oct 09, 2010 4:51 am

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;"
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Sat Oct 09, 2010 5:46 am

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:
0x60
This looks even better, thanks.
Top
bi3l
Apprentice
Apprentice
User avatar
Posts: 268
Joined: Thu Feb 06, 2003 10:37 am
Location: France

  • Quote

Post by bi3l » Sat Oct 09, 2010 12:38 pm

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)
Top
jcTux
Apprentice
Apprentice
User avatar
Posts: 276
Joined: Tue Dec 29, 2009 3:57 pm
Location: Tours, France

  • Quote

Post by jcTux » Sat Oct 09, 2010 1:39 pm

I have no more crashes with okular.
Top
KejPi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Sat Jan 17, 2004 1:48 pm
Location: Prague, Czech republic

  • Quote

Post by KejPi » Sat Oct 09, 2010 1:40 pm

Wouldn't it be better to increase revision in this case so that people not following this thread know about changes?
hidentity.org
Top
Infinality
n00b
n00b
User avatar
Posts: 24
Joined: Thu Aug 12, 2010 1:21 am
Location: Wisconsin, USA
Contact:
Contact Infinality
Website

  • Quote

Post by Infinality » Sat Oct 09, 2010 1:45 pm

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. ;)
Top
KejPi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Sat Jan 17, 2004 1:48 pm
Location: Prague, Czech republic

  • Quote

Post by KejPi » Sat Oct 09, 2010 1:51 pm

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
Top
jsevilleja
n00b
n00b
Posts: 14
Joined: Fri May 21, 2010 5:39 pm

unaligned fonts

  • Quote

Post by jsevilleja » Sat Oct 09, 2010 6:28 pm

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.
Top
KejPi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Sat Jan 17, 2004 1:48 pm
Location: Prague, Czech republic

Re: unaligned fonts

  • Quote

Post by KejPi » Sat Oct 09, 2010 6:33 pm

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
Top
jsevilleja
n00b
n00b
Posts: 14
Joined: Fri May 21, 2010 5:39 pm

Re: unaligned fonts

  • Quote

Post by jsevilleja » Sat Oct 09, 2010 6:46 pm

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
Top
KejPi
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Sat Jan 17, 2004 1:48 pm
Location: Prague, Czech republic

Re: unaligned fonts

  • Quote

Post by KejPi » Sat Oct 09, 2010 6:58 pm

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
Top
jsevilleja
n00b
n00b
Posts: 14
Joined: Fri May 21, 2010 5:39 pm

Re: unaligned fonts

  • Quote

Post by jsevilleja » Sat Oct 09, 2010 7:12 pm

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. :)
Top
equilibrium
Apprentice
Apprentice
User avatar
Posts: 213
Joined: Sun Jun 29, 2003 10:31 am
Location: UK
Contact:
Contact equilibrium
Website

  • Quote

Post by equilibrium » Sat Oct 09, 2010 10:27 pm

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
Top
tallica
Apprentice
Apprentice
User avatar
Posts: 152
Joined: Fri Jul 27, 2007 2:52 pm
Location: Lublin, POL

  • Quote

Post by tallica » Sun Oct 17, 2010 12:10 am

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

Infinality, thanks!
Gentoo ~AMD64 | Audacious
Top
legogogo
n00b
n00b
Posts: 2
Joined: Sat May 08, 2010 6:34 pm

  • Quote

Post by legogogo » Mon Oct 18, 2010 4:14 pm

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

http://lostpic.net/images/653ab65c1dce0 ... 23a105.png
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Sat Oct 23, 2010 5:48 am

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 :)
Top
bi3l
Apprentice
Apprentice
User avatar
Posts: 268
Joined: Thu Feb 06, 2003 10:37 am
Location: France

  • Quote

Post by bi3l » Sat Oct 23, 2010 10:03 am

Updated LCD Filtering accordingly.
OGMRip - LCD filtering (Wiki)
Top
tallica
Apprentice
Apprentice
User avatar
Posts: 152
Joined: Fri Jul 27, 2007 2:52 pm
Location: Lublin, POL

  • Quote

Post by tallica » Sun Oct 24, 2010 1:11 am

bi3l, Do you use the lcdfilter patch for poppler? I can't get Evince to use it...
Gentoo ~AMD64 | Audacious
Top
bi3l
Apprentice
Apprentice
User avatar
Posts: 268
Joined: Thu Feb 06, 2003 10:37 am
Location: France

  • Quote

Post by bi3l » Sun Oct 24, 2010 10:13 am

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)
Top
tallica
Apprentice
Apprentice
User avatar
Posts: 152
Joined: Fri Jul 27, 2007 2:52 pm
Location: Lublin, POL

  • Quote

Post by tallica » Sun Oct 24, 2010 11:36 am

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.
Last edited by tallica on Sun Oct 24, 2010 1:31 pm, edited 2 times in total.
Gentoo ~AMD64 | Audacious
Top
vnekontakta
n00b
n00b
Posts: 1
Joined: Sun Oct 24, 2010 9:33 am

  • Quote

Post by vnekontakta » Sun Oct 24, 2010 1:06 pm

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.youpi ... 36d635.png
Bigger: http://youpic.su/view.php?id=s001.youpi ... 4979f9.png

Or from here http://www.ienews.ru/pochemu_putin_krab.html :
http://youpic.su/view.php?id=s001.youpi ... 1f1726.png

Bold small letter looks fine.
In system this letter also broken:
http://youpic.su/view.php?id=s001.youpi ... af5a1f.png
Top
tallica
Apprentice
Apprentice
User avatar
Posts: 152
Joined: Fri Jul 27, 2007 2:52 pm
Location: Lublin, POL

  • Quote

Post by tallica » Sun Oct 24, 2010 3:48 pm

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: Select all

--- 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
Last edited by tallica on Sun Oct 24, 2010 6:38 pm, edited 3 times in total.
Gentoo ~AMD64 | Audacious
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Sun Oct 24, 2010 3:58 pm

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.
Top
mbar
Advocate
Advocate
User avatar
Posts: 2000
Joined: Wed Jan 19, 2005 9:45 am
Location: Poland

  • Quote

Post by mbar » Sun Oct 24, 2010 7:45 pm

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.
Top
pezed
n00b
n00b
Posts: 31
Joined: Thu Oct 16, 2003 9:24 am

  • Quote

Post by pezed » Mon Nov 01, 2010 1:57 am

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.
Top
Post Reply

720 posts
  • Page 17 of 29
    • Jump to page:
  • Previous
  • 1
  • …
  • 15
  • 16
  • 17
  • 18
  • 19
  • …
  • 29
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy