View previous topic :: View next topic |
Author |
Message |
IvanMajhen Guru
Joined: 10 Jun 2006 Posts: 392 Location: Croatia
|
Posted: Sat Mar 15, 2008 1:13 pm Post subject: |
|
|
For openoffice? |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Thu Mar 20, 2008 10:46 pm Post subject: |
|
|
I've got an interesting problem. I've got x11-libs/cairo and x11-libs/libXft from the fonts overlay, and I have a custom ebuild to apply the patch from freedesktop #13566 that vonr mentioned above. I've added the "lcdfilter" stuff to my ~/.fonts.conf and it all works great. My fonts look lovely. No problems there.
The problem I have is that text rendering is SLOW. Really slow. I can see the text redrawing line by line in a TreeView widget, for example. I ran some tests using GtkPerf and it is not my imagination. The test that shows the problem for me is the GtkDrawingArea - Text test. It takes ~23 seconds to complete. This is on my desktop, which has a nVidia Ti4800 in it (NV28). I'm using nvidia's proprietary drivers, x11-drivers/nvidia-drivers-96.43.01. I wish I could use the newer versions, but this card isn't supported by them.
I also have a laptop set up in exactly the same way, with identical ebuilds and /etc/fonts/* configuration. The text rendering is also excellent. It looks exactly like my desktop. The difference is that the same GtkPerf test takes < 2 seconds, and text rendering is not slow at all. The laptop has a Intel GMA950 / 945GM graphics chip in it, which should be slower than the one in my desktop.
I've heard that slow text rendering can be caused by lack of RENDER acceleration. I'm pretty sure I have the acceleration turned on. This is the output of grep -i render /var/log/Xorg.0.log
Code: | X.Org Font Renderer : 0.5
Module class: X.Org Font Renderer
ABI class: X.Org Font Renderer, version 0.5
Module class: X.Org Font Renderer
ABI class: X.Org Font Renderer, version 0.5
(**) NVIDIA(0): Option "RenderAccel" "true"
(**) NVIDIA(0): Enabling RENDER acceleration
(II) Initializing built-in extension RENDER
|
I've heard rumors that there are problems with the nvidia drivers on certain chipsets, but that nvidia just ignores the bug reports. I may be completely wrong in this regard.
Any ideas on how to make my text rendering faster? |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Mar 21, 2008 4:01 am Post subject: |
|
|
Try e.g.:
Code: | nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 |
See thread. |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Fri Mar 21, 2008 7:39 am Post subject: |
|
|
PaulBredbury wrote: | Try e.g.:
Code: | nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 |
See thread. |
Thanks. I read through that thread, and the one about the beta drivers. I guess the acceleration (GlyphCache) thing is only for 8xxx and 9xxx series cards. I'm stuck on the legacy 96.43.05 drivers. Oh well.
Thanks for the help, though. At least I know where to look now |
|
Back to top |
|
|
m.s.w Apprentice
Joined: 19 Sep 2004 Posts: 190 Location: Kraków, Poland
|
Posted: Sat Mar 22, 2008 4:17 pm Post subject: |
|
|
I see that there is cairo-1.5.12.ebuild in boniek's font-overlay, but it doesn't want to upgrade. I have cairo in package.keywords but still it doesn't go. What should I do to have it? _________________ Mark Twain said it best:
"If you have to swallow a frog, don't stare at it too long!" |
|
Back to top |
|
|
OmSai l33t
Joined: 30 Sep 2007 Posts: 605 Location: Manchester, CT, USA
|
Posted: Sat Mar 22, 2008 6:30 pm Post subject: |
|
|
Auto patching of the cairo-1.5.12.ebuild fails
I updated the ebuild in the overlay:
Code: | # date
Sat Mar 22 14:20:09 EDT 2008
# layman -S
* Running command "/usr/bin/svn update "/usr/portage/local/layman/font-overlay""...
At revision 7.
*
* Success:
* ------
*
* Successfully synchronized overlay "font-overlay". |
But the newspr patch doesn't work after src_unpack. Here's the relevant emerge output:
Code: | >>> Unpacking source...
>>> Unpacking cairo-1.5.12.tar.gz to /var/tmp/portage/x11-libs/cairo-1.5.12/work
* Applying cairo-1.5.12-newspr.patch.bz2 ...
* Failed Patch: cairo-1.5.12-newspr.patch.bz2 !
* ( /var/tmp/portage/x11-libs/cairo-1.5.12/temp/21365.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/x11-libs/cairo-1.5.12/temp/cairo-1.5.12-newspr.patch.bz2-21365.out
*
* ERROR: x11-libs/cairo-1.5.12 failed.
* Call stack:
* ebuild.sh, line 49: Called src_unpack
* environment, line 2740: Called epatch 'src_unpack'
* environment, line 1531: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
* The die message:
* Failed Patch: cairo-1.5.12-newspr.patch.bz2!
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/x11-libs/cairo-1.5.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/x11-libs/cairo-1.5.12/temp/environment'. |
Relevant attachments:
cairo-1.5.12-newspr.patch.bz2-21365.out
build.log
environment
Code: | # emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-zen4-g4bbcf6dd x86_64)
=================================================================
System uname: 2.6.24-zen4-g4bbcf6dd x86_64 AMD Athlon(tm) 64 Processor 3800+
Timestamp of tree: Sat, 22 Mar 2008 16:47:01 +0000
ccache version 2.4 [enabled]
app-shells/bash: 3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python: 2.4.4-r9, 2.5.1-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/rc.d /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d /usr/share/X11"
CXXFLAGS="-march=athlon64 -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks fixpackages metadata-transfer nostrip sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ "
LINGUAS="hi"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/font-overlay /usr/local/portage /usr/local/overlays/xfce4-svn"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd amd64 apache2 avi berkdb cdr cli cracklib crypt cups dbus directfb divx divx4linux dri dts dvd dvdnav dvdread encode fame firefox flac fortran gdbm gif gmedia gpm gtk hal iconv ipod ipv6 isdnlog jpeg ldap libnotify live lm_sensors logitech-mouse mad matroska mesa midi mjpeg mmx mp3 mpeg mplayer mudflap ncurses newspr nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp oss pam pcre pdf png pppd python qt3 qt4 quicktime readline realmedia reflection samba scanner sdl session spell spl sse sse2 ssl startup-notification subtitles svg swat tcpd tetex theora tiff truetype type1 unicode vorbis wma wmp xanim xcomposite xorg xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias auth_mysql" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hi" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
I'm able to use cairo-1.4.14 from the overlay. _________________ Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it. |
|
Back to top |
|
|
vonr Guru
Joined: 23 Mar 2006 Posts: 300
|
Posted: Sun Mar 23, 2008 10:49 am Post subject: |
|
|
OmSai wrote: | Auto patching of the cairo-1.5.12.ebuild fails |
Just use these ebuilds. The tarball contains ebuilds for x11-libs/cairo-1.5.12 with the patch i posted earlier as well as an ebuild for media-libs/fontconfig-2.5.0-r1 with the patch from freedesktop #13566. Please note that the fontconfig ebuild also needs "fontconfig-2.3.2-docbook.patch" from the tree. You'll need both these ebuilds for the lcd filtering to work.
You'll also need to modify your /etc/fonts/local.conf or equivalent to contain something like this:
Code: | <!-- Enable freetype's new subpixel filter. Currently, only a cairo
version containing the patches from freedesktop #10301 respects this
setting. Fontconfig needs to be patched using the patches from freedesktop
#13566 for this to work; 2.6 will contain this functionality by default. -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match> |
|
|
Back to top |
|
|
OmSai l33t
Joined: 30 Sep 2007 Posts: 605 Location: Manchester, CT, USA
|
Posted: Sun Mar 23, 2008 2:17 pm Post subject: |
|
|
Thank you, vonr!
dman777 wrote: | I would love to try these patches! Is there a tutorial on how to apply these patches? | Here you go -
I'm assuming you downloaded the tarball vonr mentioned to your /tmp and you are logged in as root.
Make the directories: | mkdir -p /usr/local/portage/x11-libs/cairo/files
mkdir -p /usr/local/portage/media-libs/fontconfig/files |
The ebuilds you place in the /usr/local/portage/ folder takes precedence over the versions in the portage tree. So...
Put the ebuilds and patches to their appropriate locations: | tar -xvf /tmp/lcd-filtering.tar.bz2
cd /tmp
cp cairo-1.5.12.ebuild /usr/local/portage/x11-libs/cairo/
cp cairo-lcd-filtering.patch /usr/local/portage/x11-libs/cairo/files/
cp fontconfig-2.5.0-r1.ebuild /usr/local/portage/media-libs/fontconfig/
cp fontconfig-lcdfilter-config.patch /usr/local/portage/media-libs/fontconfig/files/
cp /usr/portage/media-libs/fontconfig/files/fontconfig-2.3.2-docbook.patch /usr/local/portage/media-libs/fontconfig/files/ |
** Make sure your ~arch is included in the ebuilds!
** It only has ~x86 by default in the tarball.
I'm using amd64, so I simply added ~amd64 to the KEYWORDS like:
Code: | KEYWORDS=""~x86 ~amd64" | Implement this step (for you arch, if it is not x86) in both the cairo-1.5.12.ebuild and fontconfig-2.5.0-r1.ebuild
Now you have to create the Digests and Manifests for Portage (here's why)...
Create Digests and Manifests: | cd /usr/local/portage/x11-libs/cairo/
ebuild cairo-1.5.12.ebuild manifest
ebuild cairo-1.5.12.ebuild digest
cd /usr/local/portage/media-libs/fontconfig/
ebuild fontconfig-2.5.0-r1.ebuild manifest
ebuild fontconfig-2.5.0-r1.ebuild digest |
All that remains now is to add the ~arch keywords per package to your /etc/portage/package.keywords
Replace ~amd64 with whatever your arch is.
Create Digests and Manifests: | cd /etc/portage/
echo "x11-libs/cairo ~amd64" >> package.keywords
echo "media-libs/fontconfig ~amd64" >> package.keywords |
Modify your /etc/fonts/local.conf or equivalent as vonr said in the post above.
I actually use /etc/fonts/conf.d/51-local.conf
[edit]I've omploaded mine for you to make life easier[/edit]
Finally emerge!
Install packages: | emerge -Dav x11-libs/cairo
emerge -Dav media-libs/fontconfig |
_________________ Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it. |
|
Back to top |
|
|
vonr Guru
Joined: 23 Mar 2006 Posts: 300
|
Posted: Sun Mar 23, 2008 11:06 pm Post subject: |
|
|
FYI I've updated the ebuilds in the tarball to re-contain their original keywords (well, not exactly: I've dropped fontconfig to ~arch). These ebuilds come from my own local overlay and I only use them on x86 hardware... |
|
Back to top |
|
|
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Mon Mar 24, 2008 9:03 am Post subject: |
|
|
Thanks guys for the new ebuild. Unfortunately, these patches dont seem to make any difference to my system. I have installed the vonr ebuilds on my amd64 system:
Code: |
# emerge -pv cairo fontconfig
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] media-libs/fontconfig-2.5.0-r1 USE="xml -doc" 0 kB [1]
[ebuild R ] x11-libs/cairo-1.5.12 USE="X glitz opengl svg -debug -directfb -doc -test -xcb" 0 kB [1]
Total: 2 packages (2 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage
|
I have also created the local.conf file in /etc/fonts. In my kde i have specified full hinting. Unfortunately, after this the fonts i get on the screen are so thin, that sometimes they are not very readable. This is what it looks like http://i29.tinypic.com/15e9x51.png
Is this what it is supposed to be like with these patches? |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Mar 24, 2008 9:15 am Post subject: |
|
|
trumee wrote: | Is this what it is supposed to be like? |
Yes. Read this thread from the beginning, with reference to "DPI". |
|
Back to top |
|
|
vonr Guru
Joined: 23 Mar 2006 Posts: 300
|
Posted: Mon Mar 24, 2008 10:49 am Post subject: |
|
|
Updated the tarball with an ebuild for cairo-1.5.14. |
|
Back to top |
|
|
Rikz Tux's lil' helper
Joined: 06 Oct 2003 Posts: 103
|
Posted: Wed Mar 26, 2008 11:58 am Post subject: |
|
|
What about libXft, should I still use newspr patch? Or it is enough to use patched cairo and fontconfig. |
|
Back to top |
|
|
vonr Guru
Joined: 23 Mar 2006 Posts: 300
|
Posted: Wed Mar 26, 2008 8:35 pm Post subject: |
|
|
Rikz wrote: | What about libXft, should I still use newspr patch? Or it is enough to use patched cairo and fontconfig. |
Yes, in order for the nice lcd filtering to work for non-cairo apps you'll need to use a patched libXft. |
|
Back to top |
|
|
niick Tux's lil' helper
Joined: 09 Mar 2006 Posts: 93
|
Posted: Sat Mar 29, 2008 7:53 pm Post subject: |
|
|
Could someone please post an ebuild for openoffice, to enable the nice font rendering. I tried to apply the patch to the 2.4.0 ebuild but it failed |
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sat Mar 29, 2008 8:31 pm Post subject: |
|
|
OmSai,
Thank you so much for taking the time to write that tutorial! It is perfect. Thank you again!
I have a question, copied and pasted the following into my /etc/fonts/local.conf:
<?xml version="1.0"?>
<!-- Enable freetype's new subpixel filter. Currently, only a cairo
version containing the patches from freedesktop #10301 respects this
setting. Fontconfig needs to be patched using the patches from freedesktop
#13566 for this to work; 2.6 will contain this functionality by default. -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
But I get a error when I launch an application like firefox:
"Fontconfig warning: "local.conf", line 9: invalid constant used : lcddefault"
Any suggestions?
Thanks,
-Darin |
|
Back to top |
|
|
m.s.w Apprentice
Joined: 19 Sep 2004 Posts: 190 Location: Kraków, Poland
|
Posted: Sat Mar 29, 2008 8:49 pm Post subject: |
|
|
dman777,
it means, that you don't use this patched cairo and fontconfig. _________________ Mark Twain said it best:
"If you have to swallow a frog, don't stare at it too long!" |
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sat Mar 29, 2008 9:01 pm Post subject: |
|
|
I don't understand. I used the fontconfig that was patched and included in vonr's package. |
|
Back to top |
|
|
m.s.w Apprentice
Joined: 19 Sep 2004 Posts: 190 Location: Kraków, Poland
|
Posted: Sun Mar 30, 2008 11:41 am Post subject: |
|
|
Just check it once again, which version of fontconfig and cairo you emerged. Just focus and follow once again above instructions. I did it and it worked. Check if you don't have >x11-libs/cairo-1.4.6 in your /etc/portage/package.mask _________________ Mark Twain said it best:
"If you have to swallow a frog, don't stare at it too long!" |
|
Back to top |
|
|
IvanMajhen Guru
Joined: 10 Jun 2006 Posts: 392 Location: Croatia
|
Posted: Sun Mar 30, 2008 12:26 pm Post subject: |
|
|
niick wrote: | Could someone please post an ebuild for openoffice, to enable the nice font rendering. I tried to apply the patch to the 2.4.0 ebuild but it failed |
I have ebuild for 2.4.0 that works. Send me PM with yours e-mail and I'll send it to you. |
|
Back to top |
|
|
m.s.w Apprentice
Joined: 19 Sep 2004 Posts: 190 Location: Kraków, Poland
|
Posted: Sun Mar 30, 2008 2:09 pm Post subject: |
|
|
IvanMajhen - sent it to me, I will host it. _________________ Mark Twain said it best:
"If you have to swallow a frog, don't stare at it too long!" |
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sun Mar 30, 2008 3:13 pm Post subject: |
|
|
The version in vonr's package is cairo 1.4.14...not cairo 1.4.6 as you mentioned. Is that a problem?
Here's what I have emerged:
localhost ~ # emerge -pv x11-libs/cairo
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] x11-libs/cairo-1.4.14 USE="X glitz svg -debug -directfb -doc -newspr -opengl -xcb" 0 kB [1]
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/portage/local/layman/font-overlay
localhost ~ # emerge -pv media-libs/fontconfig
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] media-libs/fontconfig-2.5.0-r1 USE="-doc -xml" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
localhost ~ # |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Mar 30, 2008 3:27 pm Post subject: |
|
|
I've created a patch for cairo-ubuntu 1.5.14, to compile with libtool versions 1.5* and 2.2 - see pkgbuild
Edit: Fixed link, thanks to stupid AUR.
Last edited by PaulBredbury on Wed Sep 17, 2008 7:30 pm; edited 1 time in total |
|
Back to top |
|
|
IvanMajhen Guru
Joined: 10 Jun 2006 Posts: 392 Location: Croatia
|
Posted: Sun Mar 30, 2008 4:40 pm Post subject: |
|
|
m.s.w wrote: | IvanMajhen - sent it to me, I will host it. |
Send me e-mail on PM. |
|
Back to top |
|
|
OmSai l33t
Joined: 30 Sep 2007 Posts: 605 Location: Manchester, CT, USA
|
Posted: Sun Mar 30, 2008 5:39 pm Post subject: |
|
|
PaulBredbury wrote: | I've created a patch for cairo-ubuntu 1.5.14, to compile with libtool versions 1.5* and 2.2 - see pkgbuild and its patch | Could someone please ebuild this? _________________ Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it. |
|
Back to top |
|
|
|