![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Way Too Much Ubuntu
![]() Join Date: Jun 2006
Location: Houston, Texas
Beans: 292
Ubuntu 7.04 Feisty Fawn
|
HOWTO: Improve font rendering; premade debs and instructions to patch yourself
New Foreword (Oct 30, 2006):
Note that since I have upgraded to Edgy I am now using mlind's edgy respository myself (see below) and I think these patches should still work on edgy (actually I know they will because they came from an edgy forum originally), so if you'd like to patch the debs yourself I think the instructions should still work. But I would just use mlind's repos. Foreword: The instructions below are for people who are using the compiz repositories for their font packages. They might also work for people who are not using the compiz repositories, but if you are not using compiz and want to patch the debs yourselves, you should definitely follow the instructions I made for people not using compiz that are found here: http://ubuntuforums.org/showthread.p...14#post1402014 Edit: Compiz seems to have taken these font packages out of their repositories since I wrote this howto (several days ago), so the binaries should still work, but please follow the patching instructions in the link above and not the ones below, as you will not be able to get the latest versions of the packages to work with the patches below in the default ubuntu repositories. Thanks. If you would like to add the compiz repositories and try the instructions below (the font packages are a little newer there, not sure what differences this would make, I use compiz on my system so I patched the compiz packages), do this: Code:
sudo gedit /etc/apt/sources.list Code:
# XGL and Compiz deb http://www.beerorkid.com/compiz/ dapper main deb http://xgl.compiz.info/ dapper main deb-src http://xgl.compiz.info/ dapper main Code:
deb http://www.elisanet.fi/mlind/ubuntu dapper fonts deb-src http://www.elisanet.fi/mlind/ubuntu dapper fonts Code:
deb http://www.elisanet.fi/mlind/ubuntu edgy fonts deb-src http://www.elisanet.fi/mlind/ubuntu edgy fonts --- This is based on this thread: http://www.ubuntuforums.org/showthread.php?t=178737 and also this thread: http://www.ubuntuforums.org/showthread.php?t=180647 but unfortunately those debs do not work after the latest updates, and I did not find any other instructions on how to patch them yourselves. If you'd just like to install these patched font packages, make a "fonts" directory in your home directory, save the attachments there, open a Terminal, and type the following commands: Code:
cd fonts tar xvjf fontdebs1.tar.bz2 tar xvjf fontdebs2.tar.bz2 sudo dpkg -i *.deb sudo cp local.conf /etc/fonts Now, the really fun part: HOWTO PATCH THEM YOURSELF 1. Get these patches (these are from this thread: http://www.ubuntuforums.org/showthread.php?t=235526) http://www.magiclinux.org/people/sun...by-default.txt http://www.magiclinux.org/people/sun...cleartype.diff Also, the following commands should install everything (I hope) you need to compile the packages: Code:
sudo apt-get install build-essential devscripts fakeroot sudo apt-get build-dep libcairo2 libxft2 libfreetype6 Code:
mkdir fonts cd fonts apt-get source libcairo2 libxft2 libfreetype6 Code:
dch -i 4. Now patch the sources. Here is what you do: For libcairo, the file you downloaded (0001-something) is actually an email, you need to edit it with gedit and get rid of the headers down to the line that reads 6b0d... Now: Code:
cd libcairo-1.2.2 [or whatever version you got] patch -p1 < pathtoyour0001filewiththeemailheadersremoved For libxft, the patch is already in the right format. Do this: Code:
cd libxft-2.1.8.2 [or whatever version you got] patch -p1 < pathtoyourlibXft-2.1.10-etcpatchfile Finally, for libfreetype, it is a little more complicated since there is no patch. Basically, what you do is this. In the directory created (freetype-2.2.1 for example) there will be a file called freetype-2.2.1.tar.bz2. You will extract it, edit the appropriate file, adn then re-create the tar.bz2 archive. Here is how you can do it: Code:
cd freetype-2.2.1
tar xvjf freetype-2.2.1.tar.bz2
gedit freetype-2.2.1/src/autofit/aflatin.c
Now edit the file, find the part that reads:
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
Change that to:
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
Find the part that reads:
if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
Change that to:
if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;
Now, do:
tar cvjf freetype-2.2.1.tar.bz2 freetype-2.2.1/*
rm -rf freetype-2.2.1
Code:
gedit debian/rules
Find the line that reads:
# patch -p1 -d $(freetype_u) -i $(patchdir)/030-bytecode-interpreter.diff
And take out the # at the beginning of the line so it reads:
patch -p1 -d $(freetype_u) -i $(patchdir)/030-bytecode-interpreter.diff
5. Make the packages: In each package directory, just type: Code:
dpkg-buildpackage -rfakeroot -us -uc Misha Last edited by misha680; October 30th, 2006 at 11:45 PM.. |
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() Join Date: Nov 2004
Beans: 68
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Hi,
Thaks for those packages. Those patches are sooo much needed once you get used to them... When using your packages some dependency errors are found for libcairo2-dev and libxft-dev (if I remember correctly this happened with your first set of patches too). Those broken packages must be removed in order to keep packages database sane. This is a little annoying because it's not possible to install some other dev packages (in order to compile some Gnome/Gtk stuff). Apart from this they seem to work fine. Thanks |
|
|
|
|
|
#3 | |
|
Way Too Much Ubuntu
![]() Join Date: Jun 2006
Location: Houston, Texas
Beans: 292
Ubuntu 7.04 Feisty Fawn
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Hmm... would you mind posting more info about the dependency errors?
Thanks Misha Quote:
|
|
|
|
|
|
|
#4 |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Dapper's freetype doesn't use any automated patching system and rules file looks ugly as hell. You can put the patch to debian/patches and add this to debian/rules build-stamp: section.
Code:
# lcd rendering patch patch -p1 -d $(freetype_u) -i $(patchdir)/libfreetype-no-stem-snapping.patch For xft packge, you can use dpatch or quilt for easy patching without modifying the original source. To use quilt
__________________
Building on Ubuntu using [pbuilder] Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox] Last edited by mlind; August 19th, 2006 at 09:30 PM.. |
|
|
|
|
|
#5 | |
|
Way Too Much Ubuntu
![]() Join Date: Jun 2006
Location: Houston, Texas
Beans: 292
Ubuntu 7.04 Feisty Fawn
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Oops, didn't notice that my libcairo2 source is from the compiz source deb repository:
Code:
deb-src http://xgl.compiz.info/ dapper main Misha Quote:
|
|
|
|
|
|
|
#6 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Quote:
__________________
Building on Ubuntu using [pbuilder] Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox] |
|
|
|
|
|
|
#7 |
|
Way Too Much Ubuntu
![]() Join Date: Jun 2006
Location: Houston, Texas
Beans: 292
Ubuntu 7.04 Feisty Fawn
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Hmm... so the patches I linked to don't even seem to work with the 1.0.4 version of libcairo at all (at least for me). Did you get them to work? If not, maybe you (or someone else) can let me know what the dependency problems are, so that I can just include those debs from the xgl repos?
Thanks Misha |
|
|
|
|
|
#8 | |
|
Skinny Extra Sweet Ubuntu
![]() Join Date: Nov 2005
Beans: 2,325
Ubuntu Intrepid Ibex (testing)
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Quote:
__________________
Building on Ubuntu using [pbuilder] Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox] |
|
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Apr 2006
Beans: 59
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
I get ugly "super bold" when using these patches, even when using your local.conf. Also "sudo dpkg-reconfigure fontconfig" doesn't show any options anymore. Any ideas?
|
|
|
|
|
|
#10 |
|
Dipped in Ubuntu
![]() Join Date: Jul 2005
Beans: 601
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO: Improve font rendering; premade debs and instructions to patch yourself
Any screenshots to show the improvements?
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|