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 ... 26, 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Aug 01, 2012 3:48 pm    Post subject: Reply with quote

mrpdaemon wrote:
bad performance with cairo-1.12 without gradients patch

Nvidia 304.30 sounds promising:
Quote:
Fixed a problem where RENDER Glyphs operations would exhibit severe performance issues in certain cases, such as when used with gradients by Cairo and Chromium.

Except that 304.30 makes SDL-based games all blue :!:
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: Sat Aug 11, 2012 7:11 pm    Post subject: Reply with quote

When '52-infinality.conf' is enabled the fonts seems very tiny on some programs like conky and xchat. I need to change the font size from 9 to 13 to take the normal/old 9 size.

I don't know if it's a bug or purposeful. :?:

Code:
 [1]   10-autohint.conf *
  [4]   10-sub-pixel-rgb.conf *
  [8]   11-lcdfilter-default.conf *
  [11]  20-fix-globaladvance.conf *
  [12]  20-unhint-small-dejavu-sans-mono.conf *
  [13]  20-unhint-small-dejavu-sans.conf *
  [14]  20-unhint-small-dejavu-serif.conf *
  [15]  20-unhint-small-vera.conf *
  [17]  30-metric-aliases.conf *
  [18]  30-urw-aliases.conf *
  [19]  31-cantarell.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 *
  [29]  58-corefonts.conf *
  [30]  59-google-droid-sans-mono.conf *
  [31]  59-google-droid-sans.conf *
  [32]  59-google-droid-serif.conf *
  [33]  60-latin.conf *
  [39]  65-fonts-persian.conf *
  [41]  65-nonlatin.conf *
  [42]  69-unifont.conf *
  [43]  70-no-bitmaps.conf *
  [45]  80-delicious.conf *
  [47]  90-synthetic.conf *
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: Sat Aug 11, 2012 7:48 pm    Post subject: Reply with quote

alexcortes wrote:
When '52-infinality.conf' is enabled the fonts seems very tiny on some programs like conky and xchat. I need to change the font size from 9 to 13 to take the normal/old 9 size.

I don't know if it's a bug or purposeful. :?:

When I was glancing through the Infinality installation (before I ultimately decided to abandon it), I noticed that Infinality can force a DPI for font rasterization that differs from the DPI advertised by the X server. The X server by default will calculate its DPI as a function of your monitor's resolution and physical size, which it retrieves from the monitor by EDID. So if your X server is running at a DPI much different than the font DPI forced by Infinality, then your fonts will end up rasterizing at a noticeably different size than they would if FreeType were using the X server's DPI.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Aug 11, 2012 8:03 pm    Post subject: Reply with quote

If you have e.g. this rule:
Code:
   <match target="pattern">
      <edit name="dpi" mode="assign">
         <double>72</double>
      </edit>
   </match>

Then delete it - that's my advice.
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: Sat Aug 11, 2012 9:39 pm    Post subject: Reply with quote

PaulBredbury wrote:
If you have e.g. this rule:
Code:
   <match target="pattern">
      <edit name="dpi" mode="assign">
         <double>72</double>
      </edit>
   </match>

Then delete it - that's my advice.


Without that rule the issue is solved, but the fonts seems more sharpen at all. So, I'll look what is better...

EDIT: I'm using 15.6 display with 1366x768 native resolution.

Code:
x11-drivers/nvidia-drivers-302.17-r1  USE="acpi (multilib) -tools"


Thanks! :D
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Wed Aug 15, 2012 1:18 pm    Post subject: Reply with quote

I finally had some time to review the integration of the fontconfig scripts from infinality in gentoo. Here are a few comments :

  1. Configuring the fonts is really too complicated
    3 eselect scripts (fontconfig, infinality, lcdfilter) is too much. For me, there should be only 2 : one to configure fontconfig (which already exists) and one to configure freetype (the lcdfilter one, but the name is misleading).

  2. Custom configurations are overridden by infinality ones
    Because of the precedence order, some settings from ~/.fonts.conf and /etc/fonts/local.conf are overridden by settings from infinality's scripts.

  3. Some fontconfig scripts are now useless
    Settings from fontconfig's 10-* scripts are completely overridden by settings from infinality's 50-base-rendering-*.

  4. Some infinality scripts are mostly empty (42-repl-global.conf and 65-override.conf)

  5. Some scripts are duplicated between infinality and fontconfig (31-cantarell.conf and 20-fix-cantarell.conf)

All in all, I don't like the way the scripts have been integrated in gentoo. For sure, it's easily maintainable because it strictly follows what's provided by infinality but it makes configuring the fonts a bigger mess than it was. What I suggest is not to have 2 sets of scripts (fontconfig's and infinality's) but only the fontconfig one with the inifinality scripts correctly integrated to it. For this purpose, some of the scripts should be removed, some should be added to the fontconfig ebuild, some others should be added to the liberation-fonts, dejavu, corefonts ebuilds, ...
_________________
OGMRip - LCD filtering (Wiki)
Back to top
View user's profile Send private message
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 140

PostPosted: Thu Aug 16, 2012 11:30 am    Post subject: Reply with quote

+1
It's complicated and unclear the way it is now. I'm unsure what I'm using right now and what will happen when I change things using eselect fontconfig.

For some reason, now I get ugly fonts in the GUI of some java applications, like the menu and other widgets in tvbrowser though the tv guide looks fine. It was looking good before.


Edit: How about a wiki guide for eselect fontconfig that tells you what to do to correctly configure infinality instead of the other two eselect modules?
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: Thu Aug 16, 2012 1:33 pm    Post subject: Reply with quote

IMO if there are just one separated script with the options that are now on lcdfilter script and when selecting one of that it's just auto change the options needed on the others scripts would be the more simple way at user side, but may not at dev side.

Thanks! :-)
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Sun Aug 19, 2012 1:47 pm    Post subject: Reply with quote

Printing with cups was failing with an error from ghostscript.
Code:
D [19/Aug/2012:17:27:22 +0800] [Job 83] Start rendering...
D [19/Aug/2012:17:27:22 +0800] [Job 83] Set job-printer-state-message to "Start rendering...", current level=INFO
D [19/Aug/2012:17:27:22 +0800] [Job 83] Processing page 1...
D [19/Aug/2012:17:27:22 +0800] [Job 83] Set job-printer-state-message to "Processing page 1...", current level=INFO
D [19/Aug/2012:17:27:22 +0800] [Job 83] Error: /invalidfont in /findfont
D [19/Aug/2012:17:27:22 +0800] [Job 83] Operand stack:
D [19/Aug/2012:17:27:22 +0800] [Job 83] F14572_0   1   1   --nostringval--   Helvetica
D [19/Aug/2012:17:27:22 +0800] [Job 83] Execution stack:
D [19/Aug/2012:17:27:22 +0800] [Job 83] %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1882   1   3   %oparray_pop   1881   1   3   %oparray_pop   1865   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1840   5   4   %oparray_pop
D [19/Aug/2012:17:27:22 +0800] [Job 83] Dictionary stack:
D [19/Aug/2012:17:27:22 +0800] [Job 83] --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:84/200(L)--   --dict:67/75(L)--
D [19/Aug/2012:17:27:22 +0800] [Job 83] Current allocation mode is local
D [19/Aug/2012:17:27:22 +0800] [Job 83] Last OS error: 2
D [19/Aug/2012:17:27:22 +0800] [Job 83] GPL Ghostscript 9.05: Unrecoverable error, exit code 1
D [19/Aug/2012:17:27:22 +0800] [Job 83] Rendering completed
D [19/Aug/2012:17:27:22 +0800] [Job 83] Set job-printer-state-message to "Rendering completed", current level=INFO
D [19/Aug/2012:17:27:22 +0800] [Job 83] prnt/hpcups/HPCupsFilter.cpp 528: cupsRasterOpen failed, fd = 0
D [19/Aug/2012:17:27:22 +0800] [Job 83] prnt/backend/hp.c 839: ERROR: null print job total=0
D [19/Aug/2012:17:27:22 +0800] [Job 83] End of messages


The advice in this post helped me in getting rid of the error. It requires one to enable Type 1 fonts by commenting out a section of /etc/fonts/infinality/infinality.conf
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Sun Aug 19, 2012 2:30 pm    Post subject: Reply with quote

Yup, same error when dealing with PostScript output from older applications, and same fix (had to do "fc-cache -f" as root for the change to take effect).
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
^marcs
Apprentice
Apprentice


Joined: 09 Mar 2005
Posts: 169

PostPosted: Mon Aug 20, 2012 9:16 am    Post subject: Reply with quote

PaulBredbury wrote:
mrpdaemon wrote:
bad performance with cairo-1.12 without gradients patch

Nvidia 304.30 sounds promising:
Quote:
Fixed a problem where RENDER Glyphs operations would exhibit severe performance issues in certain cases, such as when used with gradients by Cairo and Chromium.

Except that 304.30 makes SDL-based games all blue :!:


Now nvidia 304* is in ~arch, any noticeable changes on that problem?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Aug 21, 2012 2:10 am    Post subject: Reply with quote

I finally got around to trying those settings... but urxvt's still broken for me. It looks like at least it's not just me either.

The one thing really annoying me is I've got libXft 2.3 on another machine and urxvt works fine there. The useflags are identical, I've even tried copying the config from that *exactly* including matching the user and local.conf and .Xresources, and nothing changed.

Edit
OK, I changed the USE to rxvt-unicode[+alt-font-width,-vanilla] and now the text's legible again. I'm not entirely comfortable with having to use different USEflags on different installs to get the same behaviour, but at this point I've given up trying to look for logical explanations.
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 Aug 26, 2012 3:48 pm    Post subject: Reply with quote

bi3l wrote:
I finally had some time to review the integration of the fontconfig scripts from infinality in gentoo. Here are a few comments :

  1. Configuring the fonts is really too complicated
    3 eselect scripts (fontconfig, infinality, lcdfilter) is too much. For me, there should be only 2 : one to configure fontconfig (which already exists) and one to configure freetype (the lcdfilter one, but the name is misleading).

  2. Custom configurations are overridden by infinality ones
    Because of the precedence order, some settings from ~/.fonts.conf and /etc/fonts/local.conf are overridden by settings from infinality's scripts.

  3. Some fontconfig scripts are now useless
    Settings from fontconfig's 10-* scripts are completely overridden by settings from infinality's 50-base-rendering-*.

  4. Some infinality scripts are mostly empty (42-repl-global.conf and 65-override.conf)

  5. Some scripts are duplicated between infinality and fontconfig (31-cantarell.conf and 20-fix-cantarell.conf)

All in all, I don't like the way the scripts have been integrated in gentoo. For sure, it's easily maintainable because it strictly follows what's provided by infinality but it makes configuring the fonts a bigger mess than it was. What I suggest is not to have 2 sets of scripts (fontconfig's and infinality's) but only the fontconfig one with the inifinality scripts correctly integrated to it. For this purpose, some of the scripts should be removed, some should be added to the fontconfig ebuild, some others should be added to the liberation-fonts, dejavu, corefonts ebuilds, ...


Thanks, that is some good feedback. I'm all for improving the user experience. I decided to keep the infinality and lcdfilter (I'm open to renaming this) eselect modules separate for maximum flexibility (which after all is The Gentoo Way). But if there are better ways of doing things, please come with specific improvement proposals, and we can probably work something out.

(If anyone was wondering why I was unresponsive this month: I was on holiday.)
_________________
"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
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Aug 31, 2012 4:02 pm    Post subject: Reply with quote

Word of warning, I updated chromium 21 -> 22 days ago and it's absolutely wrecked font rendering. Looks like they screwed up gamma correction or something; dark text on light looks anorexic and washed out, and light text on dark looks too emboldened.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Aug 31, 2012 6:12 pm    Post subject: Reply with quote

Firefox 15 needs cairo patched, to compile with --enable-system-cairo. Again.
Back to top
View user's profile Send private message
inch
n00b
n00b


Joined: 04 Mar 2012
Posts: 17

PostPosted: Sun Oct 14, 2012 5:34 pm    Post subject: Reply with quote

I emerged freetype with the infinality flag and it works. However, where is the configuration file "infinality.sh"?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Oct 14, 2012 8:42 pm    Post subject: Reply with quote

LFS have updated the cairo patch for cairo 1.12.4, to work with firefox 16.0.1 compiled with --enable-system-cairo :)

For cairo 1.12.4, there's also these 2 upstream patches to include - here's a patch file which includes them both.

Edit: cairo 1.12.6 is out, with bugfixes.


Last edited by PaulBredbury on Mon Oct 22, 2012 10:44 pm; edited 1 time in total
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 Oct 15, 2012 2:40 pm    Post subject: Reply with quote

Thanks! I hope to find some time within the next few days to bump cairo and look into its open issues.
_________________
"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
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Oct 16, 2012 1:17 am    Post subject: fonts look like crap Reply with quote

hey,

useiing open sauce radeon here and my fonts look like arse. With nvidia blobs fonts look beautiful outta box. With nouveau and open sauce radeon fonts look absolutely awfull. Why is that?

To illustrate the problem. htop on nvidia blob fonts are neatly compact, like with proper spacing. When I use nouveau or rad op sauce htop on urxvt characters are all spaced out making htop mad huge. I think is a combination of larger space between characters and characters themeselves taking more pixels.

Inconsolata used to look lovely with nvidia blob now with radeon I was forced to change it.

Also as I type now in the browser fonts have a bluish offset. This bluish offset is also present in urxvt.

Where to start troubleshooting this problem??? What are the commands I can try to get immediate results??

It's clearly seen on the character "m" on the terminal.

thx!!

Also, dunno whether has to do with fonts or what but before adding:

Code:

URxvt*depth: 32


my terminal was awfully slow, dmesg was like line per line and when compiling and having the terminal in fullscreen would bring my system down to halt. Now dmesg is instant. When I would list a folder with many files in colors moving the cursor on the terminal with arrows would be painfully slow and X cpu usage shoot thru the roof!! In general was any terminal activity that would slow down X, such as scrolling ncmpcpp songs list.

Now the only slow down I've experienced is when the terminal is filled with colored names and then I have to move the cursor on the promp, X cpu usage jumps to almos 50% usage. Scrolling ncmpcpp songs list with down/up arrows also result in 50% cpu usage.

UPDATE!!

Code:
Xft.autohint:               0
Xft.dpi:                    96
Xft.antialias:              1
#Xft.rgba:                   rgb
Xft.hinting:                true
Xft.hintstyle:              hintslight
Xft.lcdfilter:              lcddefault


now trying with commented line.

Code:
#Xft.rgba:                   rgb


But that still isn't related with the bluish offset on the browser :/
Anybody know how to find out my subpixel RGB structure??
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Oct 16, 2012 1:21 am    Post subject: Deleted duplicate post Reply with quote

..

Last edited by _______0 on Tue Oct 16, 2012 2:36 am; edited 2 times in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Oct 16, 2012 1:38 am    Post subject: Re: fonts look like crap Reply with quote

________________________0 wrote:
characters are all spaced out

Probably your DPI (dots per inch) setting was correct with the Nvidia blob, and wrong with Radeon - Google it.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Oct 16, 2012 2:30 am    Post subject: how to find out?? Reply with quote

PaulBredbury wrote:

Probably your DPI (dots per inch) setting was correct with the Nvidia blob, and wrong with Radeon - Google it.


good call. but google what exactly???

thnx in advanced.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Nov 03, 2012 6:52 pm    Post subject: Reply with quote

I notice that Gentoo and Arch both compile cairo with --disable-xlib-xcb, due to mysterious crashing in Gnome.

In cairo 1.12.4, 1.12.6 and current git, I get occasional font corruption on a line of text, which usually makes the font look slightly bolder (appears often on this page), but it's fixed if I instead compile with --enable-xlib-xcb :)

Edit: LFS' cairo-1.12.4-expose_snapshot-1.patch still works with cairo 1.12.6 and current git.

Edit2: Bah, my solution slows down firefox's rendering, so I'll stick with cairo 1.12.2 for now, as with Debian and Ubuntu.

Edit3: Firefox's rendering seems better (no slowdown), with cairo git upto this commit.

Edit4: Nah, still got occasional font corruption with cairo git - I'll stick with cairo 1.12.2

Edit5: cairo 1.12.10 has same problem, so I'm still sticking with cairo 1.12.2

Edit6: Hooray, finally fixed, I think by firefox 21 :D
Edit7: This is using cairo from git, rather than cairo 1.12.14. I tried cairo 1.12.14 briefly, and it seemed to have a bit of text corruption, whereas a git checkout has been perfect.
_________________
Improve your font rendering and ALSA sound


Last edited by PaulBredbury on Tue Jul 02, 2013 3:22 pm; edited 3 times in total
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Dec 19, 2012 11:58 am    Post subject: google what???? Reply with quote

google what???

:?:
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Jan 02, 2013 8:24 pm    Post subject: Reply with quote

damn! too many steps to get fonts right :/

basically all is controlled via these two??

Code:
eselect infinality
eselect lcdfilter


how do changes take effect?

what do you reccomend for 1080p monitor?

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 ... 26, 27, 28, 29  Next
Page 27 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