Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fontconfig-ultimate - improve font rendering without hassle
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
fau
n00b
n00b


Joined: 01 Apr 2010
Posts: 74

PostPosted: Wed Jun 11, 2014 9:37 pm    Post subject: fontconfig-ultimate - improve font rendering without hassle Reply with quote

Hi,
Here is my attempt to bring fontconfig-ultimate project to Gentoo. Read more about it on author's homepage: http://bohoomil.com/ or below.
It's supposed to be hassle-free so I'll try to keep it short :-)

Screenshots

They may look bad if your monitor doesn't have RGB subpixel layout. Test it here.

Motivation

Probably like most of you I've run into many problems with font rendering on Gentoo. Fontconfig / freetype updates used to break it fairly often and I cba to configure everything manually. Eventually I've decided to deal with it for good. In the process I ran into fontconfig-ultimate project, wrote an ebuild and lived happily ever after.
Looks great, doesn't noticeably change with updates and doesn't require me to maintain it.

Installation

  1. If you want to preserve your current settings you can make a backup copy of /etc/fonts/conf.d
    Code:
    $ cp -ar /etc/fonts/conf.d ~/

  2. Emerge media-fonts/infinality-ultimate-meta and follow instructions.
    Code:
    $ emerge infinality-ultimate-meta

    Quote:
    1. Disable all rules but 52-infinality.conf using eselect fontconfig
    2. Enable one of "ultimate" presets using eselect infinality
    3. Select ultimate lcdfilter settings using eselect lcdfilter

Keep in mind that some web browsers have internal font rendering engine. Eg. so as to use freetype with firefox you need to compile it with system-cairo use-flag.

Some details after all

The package consists of:
1. A set of configuration files for fontconfig and lcdfilter fine tunning font rendering. Default fontconfig configuration is quite rough and specific fonts need some tweaks to look good. These are provided here.
2. A set of font replacement rules for generic font families (serif, sans, monospace, cursive, fantasy). ultimate-ms and ultimate-free presets use microsoft free internet fonts and their metric-compatible libre alternatives. fonts-extra use-flag installs replacements for even more font families.

All fonts are individually configured for best looks.
Keep in mind that specialized printing and rendering software (such as ghostscript, libreoffice, document viewers, some browsers) use their own fonts and rendering engines so they wont get affected unless compiled with special use-flags (system-cairo for firefox).

Let me know what you think. Please report bugs to me for now because Gentoo's version differs from original.

References


Last edited by fau on Sat May 09, 2015 12:14 pm; edited 3 times in total
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Thu Jun 12, 2014 10:35 am    Post subject: Reply with quote

fau, it would be great to have ib-fonts collection in Gentoo also.
Back to top
View user's profile Send private message
fau
n00b
n00b


Joined: 01 Apr 2010
Posts: 74

PostPosted: Thu Jun 12, 2014 2:20 pm    Post subject: Reply with quote

Yes it would be cool - especially for non-latin scripts.
However there are some difficulties and I don't think it will happen unless a gentoo dev picks it up. Adding gazzilion font ebuilds to sunrise and maintaining them isn't an option now.
There are 138 fonts in ib-fonts and the total number of fonts in portage is 169 atm. This puts things into perspective :-)
I'll work on adding some more fonts from portage as dependencies though. Now with pfl things will get easier.

This is why I asked if there was a standalone font manager. This would be the best solution for now.

edit: Keep in mind that all default fonts for five standard font families are pulled in as dependencies by fonts-free and fonts-ms use-flag. Some other fonts from ib-meta-extended-lt are pulled too if you enable fonts-extra use-flag.
Back to top
View user's profile Send private message
Astronaut
n00b
n00b


Joined: 06 Oct 2012
Posts: 38
Location: RA 14h 15m 40s | Dec 19° 10.932'

PostPosted: Sun Jul 13, 2014 1:19 am    Post subject: Reply with quote

Hello Fau! I've installed the overlay weeks ago, wasn't aware of this post.

Thanks a lot for your efforts, fonts are remarkably better now
Back to top
View user's profile Send private message
shazeal
Apprentice
Apprentice


Joined: 03 May 2006
Posts: 206
Location: New Zealand

PostPosted: Sat Aug 16, 2014 10:12 pm    Post subject: Reply with quote

Great stuff, I was using the standard infinality settings before but they looked like a blurred mess compared to these settings!

Thanks! :D
_________________
CFLAGS="-OmgWTFR1CE --fun-lol-loops --march=asmx86go"
Back to top
View user's profile Send private message
spectromas
n00b
n00b


Joined: 13 Jul 2014
Posts: 50

PostPosted: Thu Dec 04, 2014 2:28 am    Post subject: Reply with quote

Is there any chance you could update the 9999 build, it doesn't seem to work.
Back to top
View user's profile Send private message
spectromas
n00b
n00b


Joined: 13 Jul 2014
Posts: 50

PostPosted: Fri Dec 05, 2014 9:39 pm    Post subject: Reply with quote

I have fixed the 9999 ebuild, it was actually very simple. I think I have everything included and going where it should go:

https://drive.google.com/open?id=0B66bbQPlW2N9SXQ0NXRURXVWVzg


I can see a massive difference with this version, the odd kerning that existed for some fonts has been fixed and everything just looks so much better. I also downloaded most of the infinality-bundle fonts and and I think they're helping.

I'm interested in making an ebuild of for the fonts bundle, one ebuild for the whole lot would be ok? When I downloaded and extracted them all they had a lot of unnecessary stuff with them, mainly for the Arch packages, any suggestions on the best way to cherry pick the fonts and nothing else?
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: Thu Dec 18, 2014 7:37 am    Post subject: Reply with quote

If any of you want to help get this into the official Gentoo tree, please contact me, so we can work out details. And maybe you can help proxy-maintain (since my time is limited). Let's get the best possible font rendering into Gentoo!
_________________
"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
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Thu Dec 18, 2014 8:13 pm    Post subject: Reply with quote

Thanks fau.
Both Thunderbird and Firefox fonts are way better than before.

There's only one thing that hasn't improved:
Some characters are either blueish or redish.
This also occurs in text writers be it libreoffice,kate,kwrite or editra,even text in Gimp!
I wonder what could cause this.
Gerard.

Edit: The blueish and redish fonts I also had before.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Tue Dec 30, 2014 1:56 pm    Post subject: Reply with quote

yngwin wrote:
If any of you want to help get this into the official Gentoo tree, please contact me, so we can work out details. And maybe you can help proxy-maintain (since my time is limited). Let's get the best possible font rendering into Gentoo!

What should be done?
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: Sat Jan 03, 2015 3:17 am    Post subject: Reply with quote

gerard82 wrote:
There's only one thing that hasn't improved:
Some characters are either blueish or redish.
This also occurs in text writers be it libreoffice,kate,kwrite or editra,even text in Gimp!
I wonder what could cause this.
Gerard.

Edit: The blueish and redish fonts I also had before.

Try different sub-pixel settings. eselect fontconfig has several options for 10-sub-pixel-*. One of them should be correct for your display. (Tho I'm not sure at this point if that is overridden by infinality.)
_________________
"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: Sat Jan 03, 2015 10:04 pm    Post subject: Reply with quote

I looked into what infinality was doing once - it overrides just about everything in conf.d when it's enabled. Pollutes the environment too! (ick)
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1752
Location: PB, Germany

PostPosted: Fri Feb 27, 2015 2:54 pm    Post subject: Reply with quote

Thanks for this hint, I will try this fontconfig, before I was following this guide. But some pages in firefox where improved, some others got worse..

What is a good setup for eselect infinality and lcdfilter? Looking at /etc/fonts/infinality/infinality.conf I see all are based on Arial, but Linux is using the DejaVu fonts which I prefer. So current I have set both to "linux".

And then how do I test that easily after switching? Do I need to restart X, the WM, or just an application?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1752
Location: PB, Germany

PostPosted: Thu Mar 05, 2015 4:04 pm    Post subject: Reply with quote

I have this setup, setting linux fonts and ubuntu lcd:
Code:
# for mod in infinality lcdfilter;do eselect $mod show;done
Current style symlink:
  /etc/fonts/infinality/styles.conf.avail/linux
Current lcdfilter style symlink:
  /usr/share/eselect-lcdfilter/env.d/ubuntu
I'm still not content ans fonts are not sharp. Previously I preferred DejaVu fonts, now I try to find out what default Sans fonts are pointing to. This should be DejaVu as said here:
Code:
# grep Linux /etc/fonts/infinality/infinality.conf
      Linux           - subpixel AA, sans=DejaVu Sans

# grep family /etc/fonts/infinality/conf.d/20-aliases-default-linux.conf
      <family>sans-serif</family>
         <family>DejaVu Sans</family>
      <family>serif</family>
         <family>Liberation Serif</family>
      <family>monospace</family>
         <family>Liberation Mono</family>
But switching the default font in Xfce between Sans and DejaVu (book or condensed) results in different fonts. So what font is Sans aliased here actually?
Then only DejaVu Sans book looks sharp, the condensed starts blurring, same for the Droid Fonts. Another sharp font I found after all the new font deps that came from fontconfig-ultimate, is Noto Sans.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Sat Apr 04, 2015 6:59 am    Post subject: Reply with quote

any news, updates ?
Back to top
View user's profile Send private message
alacheesu
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2005
Posts: 113

PostPosted: Sat Apr 04, 2015 2:51 pm    Post subject: Reply with quote

the ebuild is currently broken as app-admin/eselect-lcdfilter and app-admin/eselect-infinality have been moved from app-admin to app-eselect.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Sat Apr 04, 2015 4:49 pm    Post subject: Reply with quote

i've beed using this ebuild (slightly corrected) since it was published here
Back to top
View user's profile Send private message
Astronaut
n00b
n00b


Joined: 06 Oct 2012
Posts: 38
Location: RA 14h 15m 40s | Dec 19° 10.932'

PostPosted: Tue Apr 14, 2015 11:30 am    Post subject: Reply with quote

The ebuild is working fine here! I think that with newer releases bohoomil is patching freetype too

https://github.com/bohoomil/fontconfig-ultimate/releases

I'm satisfied with infinality, however on KDE, I had to increase the font size like in this pic, even though my dpi was set correctly
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Tue Apr 14, 2015 12:00 pm    Post subject: Reply with quote

Astronaut, could you post the used ebuild here?
Back to top
View user's profile Send private message
Astronaut
n00b
n00b


Joined: 06 Oct 2012
Posts: 38
Location: RA 14h 15m 40s | Dec 19° 10.932'

PostPosted: Tue Apr 14, 2015 12:28 pm    Post subject: Reply with quote

Yes here it is


https://bpaste.net/show/826525618c99
Back to top
View user's profile Send private message
yoshi314
l33t
l33t


Joined: 30 Dec 2004
Posts: 850
Location: PL

PostPosted: Wed Apr 15, 2015 9:29 am    Post subject: Reply with quote

gerard82 wrote:
Thanks fau.
Both Thunderbird and Firefox fonts are way better than before.

There's only one thing that hasn't improved:
Some characters are either blueish or redish.
This also occurs in text writers be it libreoffice,kate,kwrite or editra,even text in Gimp!
I wonder what could cause this.
Gerard.

Edit: The blueish and redish fonts I also had before.


I believe you need to set different subpixel aliasing than typical. Check here to find out : http://www.lagom.nl/lcd-test/subpixel.php
_________________
~amd64
shrink your /usr/portage with squashfs+aufs
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Sat Apr 18, 2015 4:44 pm    Post subject: Reply with quote

Astronaut,
Code:
MY_PV=$(replace_version_separator 3 "-")
?
Back to top
View user's profile Send private message
Astronaut
n00b
n00b


Joined: 06 Oct 2012
Posts: 38
Location: RA 14h 15m 40s | Dec 19° 10.932'

PostPosted: Sun Apr 19, 2015 10:21 pm    Post subject: Reply with quote

Perfect Gentleman,

Sorry, that's because I omitted the ebuild name +version:

I used media-libs/fontconfig-ultimate-2.11.1.13
Back to top
View user's profile Send private message
fau
n00b
n00b


Joined: 01 Apr 2010
Posts: 74

PostPosted: Sun Apr 26, 2015 3:43 pm    Post subject: Reply with quote

Sorry guys, I'm gonna update the ebuild and contact yngwin soon. Please report critical breakages in the bugzilla entry (linked in the first post) next time, so I get notifications.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon Apr 27, 2015 12:19 am    Post subject: Reply with quote

One small correction for the ebuild:

there's no media-fonts/libertine-ttf :idea:

but

media-fonts/libertine


Also the following thread might be useful:

https://forums.gentoo.org/viewtopic-t-503698-highlight-linguas.html

(setting linguas via /etc/portage/package.use)


Thank you very much for keeping it up-to-date :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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