LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to Optimize Fonts in Slackware (https://www.linuxquestions.org/questions/slackware-14/how-to-optimize-fonts-in-slackware-640468/)

Daedra 05-07-2008 03:04 AM

How to Optimize Fonts in Slackware
 
The bulk of the information in this thread can now be viewed at Dugan's webpage http://duganchen.ca/writings/slackware/fonts


My Patches/info for 13.37 can be found at post #212 and beyond




A while back during 12.0 I made this post about getting "cleartype" like results with slackware fonts, you can view the original post here http://www.linuxquestions.org/questi...kware.-539868/
I got some emails asking for updated packages for 12.1 so I decided to post them and give a quick detail of what I have done...

First let me just say I think that slackwares default font rendering is great but I have always thought that font rendering is the one thing that windows did better than linux but that really is no longer the case because most of the fonts technologies that make the fonts look good in windows are now available for linux. The problem though is that those technologies are patented and cannot be made available "out of the box". Keep in mind also that you should only do or use the patches/packages if you live in a country where the patent doesn't apply or you have a license to do so. Ok on to the good stuff.

(All patches and packages will be found at bottom of page)

1) You need to recompile freetype to include sub-pixel rendering and bytecode interpreter enabled, by default they are not enabled.

2) You need to recompile cairo with the sub-pixel rendering patch applied to the source. The patch was made by David Turner a few years ago and the patch was never updated. Luckily the guys over at arch linux have maintained the patch and have updated to work with cairo-1.4.14.

3) You need to recompile libXft with the sub-pixel rendering patch.

4) after all 3 packages are updated you need to set fonts DPI to something sane, 96x96 is what windows uses and is what I recommend, there are many ways to do this but I am only going to explain 2. the first way is to start xorg with the command "startx -dpi 96" you can also edit /usr/bin/startx/ and change to this

sysserverrc=/usr/lib/X11/xinit/xserverrc
defaultclient=xterm
defaultserver=/usr/bin/X
defaultclientargs=""
defaultserverargs="-dpi 96"
clientargs=""
serverargs=""

save and close, restart X

or if you are using the nvidia drivers you can edit your xorg.conf file and under the "device" section you can add this

Option "DPI" "96 x 96"

There are other ways to change your dpi these are just the easiest IMO.
to test that the dpi is set correctly type this command

xdpyinfo | grep resolution
if it says 96x96 you good.

UPDATE ++ I just wanted to add that 96x96 is not necessarily the correct DPI it is just was the most common back in the CRT days, but now with LCD's and such depending on what your dot pitch is your native DPI could be as low as 75 or all the way up to 105+. For those of you that have a nvidia card and are using the latest drivers, the drivers should automatically poll the data from your monitors EDID and set the DPI correctly for you with out doing anything, that is what I did and right now nvidia is setting my dpi at "90x88" which is correct given what my monitors dot pitch is. A much more detailed explanation on this can be found at this post http://www.linuxquestions.org/questi...034/page4.html

5) you need to make a .fonts.conf file and put that in your home directory. I am going to post my .fonts.conf below for download, but you can make a lot of interesting changes to your fonts using different commands, but if you want to learn how you are going to have to read up on fontconfig. But I am assuming that most people who interested in getting my type of results will just use my .fonts.conf file.

6) you need to install some good quality fonts. Preferably the windows core fonts. If you dual boot with windows you can simply copy for fonts from windows to your linux system.

7) To get the desired results like my screenshots below you need to change the fonts in firefox here are my settings http://webpages.charter.net/daedra/12.1/firefox.png

That really is all that I did, you can play around with your .fonts.conf file and change the appearance of the fonts.

SCREENSHOTS
http://webpages.charter.net/daedra/12.1/snapshot4.png
http://webpages.charter.net/daedra/12.1/snapshot4.png
http://webpages.charter.net/daedra/12.1/snapshot4.png

PATCHES
Cairo - http://webpages.charter.net/daedra/1...filter-1.patch
ignore the version number, it works

libXft - http://webpages.charter.net/daedra/l...type-like.diff
(I have read around that this might not be needed for desired results, but I used it anyway)

Freetype - There are not patches, you just have to follow step one, Pat's build script can take care of that for you with a simple edit of the build script. However there is one thing that need to be done if you are going to compile your self you need to edit two lines in the src/autofit/aflatin.c file. Find the lines that say this

if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;

if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;

and then change them to look like this

if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_HORZ_SNAP;

if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;

save and your ready to compile (assuming your using Pat's modified build script)

Finally, if you want to save your self all this compiling and time please use my modified packages, cairo and freetype were compiled using Pat's build script and have been tested so you can use them with confidence. libXft was compiled using src2pkg but I used Pat's configure options from his X build script and it has also been tested.

http://webpages.charter.net/daedra/1....14-i486-2.tgz
http://webpages.charter.net/daedra/1...3.5-i486-2.tgz
http://webpages.charter.net/daedra/1....12-i486-3.tgz

this is my .fonts.conf file, just copy this text into your favorite text editor and save it as .fonts.conf in your home directory

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
<edit name="autohint">
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>


We'll I guess thats all there really is, I hope at least a few people find this information useful, please feel free to leave any comments or if I missed anything let me know.

shadowsnipes 05-07-2008 04:24 AM

Nice work! I'll have to check these out sometime.

I did notice one weird thing with fonts in 12.1. Yahoo mail did not have good fonts in 12.0, but after I installed my fonts from Windows XP it looked just like it does in Windows. However, after I upgraded to 12.1 the fonts at Yahoo mail look crappy again. I just created a custom css file to have it show what I wanted.

I like the fact that 12.1 has the Liberation fonts.

Thanks again for this :)

Su-Shee 05-07-2008 02:30 PM

Ah, my favorite font stuff. :)

The old Turner-cairo-patch works btw. also on cairo 1.6.4; I just changed the dirname in the patch.

I use the exact same patches and dpi resolution, just with "hintstyle" "hintfull" instead of "hintmedium".

Same forum's screenshot

Screenshot of "terminal" window (Xfce's xterm) with Unicode in "less" (FVWM).

symatic 05-07-2008 04:27 PM

Quote:

However, after I upgraded to 12.1 the fonts at Yahoo mail look crappy again
I believe the solution without installing ms fonts are to go the options in firefox fonts and remove the check from "allow websites to choose fonts...or something" and give it a go.

Quote:

f you want to save your self all this compiling and time please use my modified packages,
Also I used your pkgs nice work, I changed hinting to full I like that better. But works very nicely.

shadowsnipes 05-07-2008 10:33 PM

Quote:

Originally Posted by symatic (Post 3146093)
I believe the solution without installing ms fonts are to go the options in firefox fonts and remove the check from "allow websites to choose fonts...or something" and give it a go.

Personally, I like to see most websites as they are intended to look. For the few that I don't, I can adjust them with custom CSS.

slackb0t 05-10-2008 10:15 AM

wow... I didn't think firefox could look this good. Excellent write up. Thank you

reikyv 05-11-2008 08:00 AM

Thanks for the guide, ;-)

pg99 05-11-2008 02:32 PM

Thanks for providing these patches here. I remember it took me quite a while to track them down when I was trying to improve the fonts on 11.0, and I've since mislaid them, so this will save me a heap of googling when I finally get around to upgrading to 12.1.

Just wanted to share that I get excellent results with the DejaVu fonts by using full hinting and leaving out this section from fonts.conf, which seems to give the font a thinner, sharper look.
<edit name="autohint">
<bool>true</bool>
</edit>

todders 05-11-2008 03:37 PM

Quote:

Originally Posted by pg99 (Post 3150107)
Thanks for providing these patches here. I remember it took me quite a while to track them down when I was trying to improve the fonts on 11.0, and I've since mislaid them, so this will save me a heap of googling when I finally get around to upgrading to 12.1.

Just wanted to share that I get excellent results with the DejaVu fonts by using full hinting and leaving out this section from fonts.conf, which seems to give the font a thinner, sharper look.
<edit name="autohint">
<bool>true</bool>
</edit>

Hello yes i agree leaving out this line gives me a much crisper and sharper look as well,without leaving this line out the fonts look slighlty oversized and muddy for my tastes anyway.

Daedra
thanks for the patches and all the work you have done on this,it makes a big difference to me on the usability of slackware.


regards

Todders

dugan 05-14-2008 01:57 AM

It's great! But I have something to further contribute.

In /etc/fonts/conf.d, rename 50-user.conf to 10-user.conf, and 51-local.conf to 11-local.conf.

Then add the following to either .fonts.conf or local.conf:
Code:

<!-- Replace serif, sans-serif, monospace with Liberation fonts -->
<alias>
        <family>serif</family>
        <prefer>
                <family>Liberation Serif</family>
        </prefer>
</alias>
<alias>
        <family>sans-serif</family>
        <prefer>
                <family>Liberation Sans</family>
        </prefer>
</alias>
<alias>
        <family>monospace</family>
        <prefer>
                <family>Liberation Mono</family>
        </prefer>
</alias>

It causes the generic font names (Sans, Serif, Monspace) to refer to Liberation fonts instead of DejaVu fonts. Personally, I like the results.

Of course, doing everything Daedra posted above puts the desktop into overdrive!

Carpo 05-26-2008 06:54 AM

after doing all the above on my laptop everything looks worse, i may have done something wrong know ing me :p - but what is the difference between the patch you put above adn the one at http://www.freetype.org/freetype2/pa...filter-1.patch, although they have the same name there are a lot of differences between them

shadowsnipes 05-26-2008 11:40 AM

Quote:

Originally Posted by Carpo (Post 3164864)
after doing all the above on my laptop everything looks worse, i may have done something wrong know ing me :p - but what is the difference between the patch you put above adn the one at http://www.freetype.org/freetype2/pa...filter-1.patch, although they have the same name there are a lot of differences between them

Is it just me or did you answer your own question? Are you just saying you don't understand how to interpret what the patches do?

Daedra 05-26-2008 02:18 PM

the patch at www.freetype.org was for cairo 1.2.4. Some people said you could just edit it to make it work with the newest cairos. But luckily for us the guys over at arch linux already did that, they just didn't rename the patch, it says 1.2.4 but unlike the one at freetype it does work with 1.4.14. The one you are referring to will not work with 1.4.14 unless you want to fix the patch yourself. Also post a screenshot if you can

Su-Shee 05-28-2008 01:02 PM

Our beautiful font stuff seems to have consequences with the use of Firefox 3.

I don't know how the usual Slack package was compiled when it came to FF2, but as FF3 obeys GTK theming from now on, it relies (even more) on GTK/Cairo/Pango/Freetype and therefore on our patched font stuff.

The binary FF3 (RC1) seems to be linked statically; I just built it from source, linking against my own cairo (the patched version). The sources have all stuff needed included, but you can configure FF with --enable-system-cairo to avoid using their included version. (Or patch theirs...)

If everything works font-wise BUT the firefox 3 binary, you'll probably have to compile. (Works perfectly fine on Slack 12, have no 12.1 yet...)

Haven't seen a Slackware FF3 package yet to verify all this, but the self-compiled version looks now as I want it to.

Carpo 05-29-2008 03:42 AM

Quote:

Originally Posted by shadowsnipes (Post 3165107)
Is it just me or did you answer your own question? Are you just saying you don't understand how to interpret what the patches do?

i am aware of what patches do and how to patch, just the patch in the first post and the one from the one i posted seem to have the same name and be for the same package and although are similar in many areas there are some differences, i was asking would there be any difference in using the patch in the first post or the one on the freetype site

shadowsnipes 05-30-2008 04:05 PM

Quote:

Originally Posted by Carpo (Post 3167899)
i am aware of what patches do and how to patch, just the patch in the first post and the one from the one i posted seem to have the same name and be for the same package and although are similar in many areas there are some differences, i was asking would there be any difference in using the patch in the first post or the one on the freetype site

Of course there would be a difference unless it the changes are just spacing or coding style.

I wasn't questioning whether or not you understand what patches do and how to use them. Rather, I was asking if you really looked at the differences of the contents between the two patches concerned and knew how to interpret those differences (ie. read code).

onebuck 05-30-2008 10:18 PM

Hi,

Good post!

I placed a link in 'Slackware-Links'. More than just Slackware® links!

markluocanada 06-03-2008 07:49 PM

WOW,

What a huge difference! I literally cannot get my eyes off the screen.

Thanks.
Mark

Daedra 06-19-2008 06:08 AM

Quote:

Originally Posted by Su-Shee (Post 3167250)
Our beautiful font stuff seems to have consequences with the use of Firefox 3.

I don't know how the usual Slack package was compiled when it came to FF2, but as FF3 obeys GTK theming from now on, it relies (even more) on GTK/Cairo/Pango/Freetype and therefore on our patched font stuff.

The binary FF3 (RC1) seems to be linked statically; I just built it from source, linking against my own cairo (the patched version). The sources have all stuff needed included, but you can configure FF with --enable-system-cairo to avoid using their included version. (Or patch theirs...)

If everything works font-wise BUT the firefox 3 binary, you'll probably have to compile. (Works perfectly fine on Slack 12, have no 12.1 yet...)

Haven't seen a Slackware FF3 package yet to verify all this, but the self-compiled version looks now as I want it to.

Great heads-up Su-Shee, I just ran into this problem tonight. After I saw your post and after a little researching I updated and patched Cairo to 1.6.4 and compile firefox from source with --enable-system-cairo and everything is back to the way it should be. So for everyone else reading A quick low down on whats going on with firefox 3.

Firefox 3 uses it's own internal version of cairo bypassing the one that we patched and installed that is why firefox 3 will look different than other programs in slackware, similiar to openoffice which uses its own internal font rendering. You can fix this by recompiling firefox 3 with the option I stated above. Also this isn't relevant at this moment (but it might be later) but to compile firefox 3 from source it requires Cairo < 1.6.0. I am experimenting with some things right now, I will report back when I got some more info.

symatic 06-20-2008 12:34 PM

Quote:

libXft - http://webpages.charter.net/daedra/l...type-like.diff
(I have read around that this might not be needed for desired results, but I used it anyway)
Rebuilding the above package was a must for me. Upgraded to the latest freetype for good measure. I couldn't figure out how to patch the newer cairo-1.6.4(most likely my error). If anyone has, can you give a little code help.

Also I would really like to use openoffice, but the fonts are terrible and I'm not sure how to go about fixing that. The same goes for firefox(which also looks terrible and double loads for some reason). I guess I would have to compile from source, but I have been reading about doing that and I am a bit lost. Any success with building any of those programs, possibly a little howto:)

Daedra 06-20-2008 05:12 PM

Quote:

Originally Posted by symatic (Post 3190438)
Rebuilding the above package was a must for me. Upgraded to the latest freetype for good measure. I couldn't figure out how to patch the newer cairo-1.6.4(most likely my error). If anyone has, can you give a little code help.

Also I would really like to use openoffice, but the fonts are terrible and I'm not sure how to go about fixing that. The same goes for firefox(which also looks terrible and double loads for some reason). I guess I would have to compile from source, but I have been reading about doing that and I am a bit lost. Any success with building any of those programs, possibly a little howto:)

Are you using firefox 3, Probably tonight or tomorrow I am going to update the howto with instructions on how to get the fonts working correctly with firefox 3.

symatic 06-20-2008 05:34 PM

I had firefox 3 for a bit, the fonts were hurting my eyes. Also that double loading(that is what it appears is happening), So I went back to the good old 2. Samething with openoffice, I decided to stick with koffice until I figure out how to patch it.

Daedra 06-20-2008 08:56 PM

Quote:

Originally Posted by Su-Shee (Post 3145990)
Ah, my favorite font stuff. :)

The old Turner-cairo-patch works btw. also on cairo 1.6.4; I just changed the dirname in the patch.

I use the exact same patches and dpi resolution, just with "hintstyle" "hintfull" instead of "hintmedium".

Same forum's screenshot

Screenshot of "terminal" window (Xfce's xterm) with Unicode in "less" (FVWM).

Hey Su-Shee, I am experimenting with somethings over here and I got firefox 3.0 compiled and working fine, but a quick questions I tried taking turners original patch and just editing the dirname like you did, but not all of the hunks succeeded 4 out of 10 failed, how did you get the old patch to work with cairo-1.6.4? There is a guy over at arch linux who is maintaining the patch now, but in order for it to work you also have to patch fontconfig or use fontconfig-2.6.0. I am basically just testing to see that this is really necessary of if the old patch can still work without patching fontconfig or using fontconfig-2.6.0. Not a huge deal just curious

symatic 06-21-2008 12:14 PM

Okay, I just settled with this. Well at least for right now. I upgraded cairo and freetype to there most current versions. I didn't patch them and only enabled BCI in freetype. I used the patched libXft package from above. It is very readable and it is not hurting my eyes as of yet.

Also on a side note: The double loading can be eliminated by right clicking on the firefox icon and select configure firefox button. Go to Application, then advanced options and uncheck launch feedback. Since it doesn't try to load twice from the command line it had to be from the launcher.

dugan 06-21-2008 05:06 PM

Quote:

Originally Posted by Daedra (Post 3189145)
Also this isn't relevant at this moment (but it might be later) but to compile firefox 3 from source it requires Cairo < 1.6.0.

I'm trying to build Firefox 3 right now. It says the exact opposite:

Quote:

./configure --enable-application=browser --enable-system-cairo
checking for cairo >= 1.6.0 freetype2 fontconfig... Requested 'cairo >= 1.6.0' but version of cairo is 1.4.14
configure: error: Library requirements (cairo >= 1.6.0 freetype2 fontconfig) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
Did you mean Cairo >= 1.6.0?

Daedra 06-21-2008 08:30 PM

Quote:

Originally Posted by dugan (Post 3191336)
I'm trying to build Firefox 3 right now. It says the exact opposite:



Did you mean Cairo >= 1.6.0?

Opps, lol. Yeah sorry bout that. There is updated patches out for cairo 1.6.4 I am going to upload them with an updated howto very soon.

Daedra 06-21-2008 09:40 PM

Firefox 3 HOWTO
 
I have been experimenting and reading about firefox 3 for a few days now and I think now is a good time to update the howto so that you can get the fonts working correctly with the LCD patches.

You can see the problem here
Built in Cairo FF3 http://webpages.charter.net/daedra/1...creenshot2.png
Fixed FF3 from source http://webpages.charter.net/daedra/1...creenshot1.png

First the problem... Firefox 3.0 ships with its own internal version of cairo that completely bypasses the one from Slackware or another distributions (if you use there precompiled binaries). So the solution is compile firefox from source. That really is not all that difficult but one problem is that you are going to need Cairo=>1.6.0 to compile it. Luckily for us there is a new maintainer of the David Turner cairo patch, the only difference is the new patch is also dependent on a patched or updated version of fontconfig (we will get to that). Ok so lets get started.

Everything from here on is info assuming that you already did the steps on page 1 and that you know how to use slackware buildscripts and apply patches and compile from source.

1) We need to download and install the newest version of cairo (1.6.4 as of this writing) here is a link to the patch http://webpages.charter.net/daedra/1...d-filter.patch. Apply the patch and compile and install. You can just use Pat's buildscript all you need to do is edit the version number (after you patched the source). If you want save your self some time and use my package for cairo http://webpages.charter.net/daedra/1...6.4-i486-3.tgz

2) The new version of cairo and this patch depends on a new version of fontconfig, I did some reading and it looks like now that fontconfig's newest version has built in support for LCD filters, and for some reason unlike the old patch this new one is dependent on this new version of fontconfig. there are no patches to apply you just need to upgrade to fontconfig-2.6.0, if you want to save your self some time you can use my package http://webpages.charter.net/daedra/1...6.0-i486-2.tgz I had to tweak this package, I had to edit Pat's build script and adjust his patches to make everything work correctly, I did my best to test everything and I have had no issues here, but I want to give fair warning that I take no responsibility if your system bursts into flames :).

3) once you have the new cairo and fontconfig installed its time to compile firefox. Now I compiled this over 6 times testing different settings and configs to make sure that it works just like the one that ships with slackware. This is the best way that I found and it works. I have to give ALL the credit here to the BlueWhite64 team, as most of you know the BlueWhite64 is a 64bit port Based on Slackware. They have a Firefox 3.0 buildscript that I used to compile my firefox and it is a very good buildscript. Now like I stated above I am assuming you know how to use slackware buildscripts so I won't be explaining here how to, if you don't know how to use a build script them search the fourms and you will find many answers. Here is a link the slackware build script http://data.bluewhite64.com/bluewhit...zilla-firefox/. Don't start yet I modified the buildscript because there is a few required changes to make this work correctly on slackware, the main changes are the architecture and enabling system cairo so we can get our fonts back. Just replace the mozilla-firefox.slackbuild file with the edited one four here http://webpages.charter.net/daedra/1...fox.SlackBuild ok you are ready to compile once the package is made you can upgrade/install it and you should now have all three packages upgraded/installed.

UPDATE AGAIN :) There is a bug in firefox 3 that causes the application panel to not properly work, this patch will fix that bug http://webpages.charter.net/daedra/1..._panel.diff.gz The patch has been added to the buildscript so all you need to do is download the patch and the buildscript will apply it for you.


NOTE* I would like to upload my finished firefox 3 package, but according to mozilla if you compile a source version of FF with --enable-official-branding then that version comes with all logo's which are trademarked by mozilla and you need permission from them to distribute the package... and since I don't have permission and I am not sure if it is ok, I am not going to sorry :(


4) Last step, you need to "turn on" the LCD filtering to do this edit your .fonts.conf file in your home directory and add these lines, highlited in red

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
<edit name="autohint">
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match> <match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>

</fontconfig>

save and exit, restart X. Launch firefox and you should be good to go. Feel free to post any errors, problems, or anything I f*d up, lol.

ONE LAST NOTE*

I was trying to use one of the old cairo patches to use with the new cairo version because I had heard that they do work you just need to change the directory names to match the newer version, I wanted to see if this would work so that upgrading fontconfig would't be necessay but the above is the only way I found to make it work, if anyone has found an easier way please let us know.

Thanks

dugan 06-21-2008 10:25 PM

The Cairo 2.6.4 patch at http://aur.archlinux.org/packages.php?ID=16459 works with Fontconfig 2.4.

Daedra 06-21-2008 11:05 PM

Really? because when I applied the cairo patch all my GTK+ apps were not displaying correctly, it was only when I compiled the newest fontconfig and added the lines to my .fonts.conf file did it finally work, but if it works without it that wold definitely be a lot easier.

dugan 06-21-2008 11:21 PM

Hmmm... the patch I just mentioned must have been for something else. I tried applying it, and I didn't get the font smoothing I was expecting.

Petri Kaukasoina 06-22-2008 05:49 AM

Quote:

Originally Posted by Daedra (Post 3191474)
replace the mozilla-firefox.slackbuild file with the edited one four here http://webpages.charter.net/daedra/1...fox.SlackBuild

Hi,

I suggest changing --enable-optimize=-O2 to
Code:

--enable-optimize="-O2 -march=i686"
or to
Code:

--enable-optimize="$SLKFLAGS"
and then adding lines for i686 above where SLKFLAGS is set like this:

Code:

elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686"


Daedra 06-22-2008 04:45 PM

Good call, thank you for that, I updated the file.

Thanks Again.

Oliver_H 06-22-2008 05:34 PM

You should enable jemalloc to for better memory mangement etc. It's default in the Mozilla builds. This is new in Firefox 3.

–enable-jemalloc

Toods 06-22-2008 05:48 PM

Quote:

Originally Posted by Oliver_H (Post 3192103)
You should enable jemalloc to for better memory mangement etc. It's default in the Mozilla builds. This is new in Firefox 3.

–enable-jemalloc

If it is default in the mozilla builds, then my understanding is that it should not be necessary to add it to .mozconfig. I understood that '.mozconfig' settings are only necessary to change the build configuration from the defaults that are specified in the source tree.

Bill.

Petri Kaukasoina 06-23-2008 04:59 AM

Quote:

Originally Posted by Oliver_H (Post 3192103)
You should enable jemalloc to for better memory mangement etc. It's default in the Mozilla builds.

about:buildconfig in the navigation toolbar shows the compiler flags and the configure arguments used. The default linux binary shows only these configure arguments:

--enable-application=browser --enable-update-channel=release --enable-update-packaging --enable-optimize --disable-debug --disable-tests --enable-official-branding

Toods 06-23-2008 05:38 AM

Quote:

Originally Posted by Petri Kaukasoina (Post 3192457)
about:buildconfig in the navigation toolbar shows the compiler flags and the configure arguments used. The default linux binary shows only these configure arguments:

--enable-application=browser --enable-update-channel=release --enable-update-packaging --enable-optimize --disable-debug --disable-tests --enable-official-branding

Yes, this is exactly my point. about:buildconfig will only show the additional build options specified in 'mozconfig'. It does not for example show which 'toolkit' is used for the build or whether libxul is built. Both of these of course are.

I would like to know of a way to query the source tree to find all the default configuration options of which there are many.
Bill

Oliver_H 06-23-2008 06:14 AM

>If it is default in the mozilla builds, then my understanding is that it should not be necessary to add it to .mozconfig.

Otherwise it doesn't kill you ;-) I don't know whether it's activated by default so I enabled it myself just to be sure.

dugan 06-23-2008 08:56 AM

When I built Firefox from source, I encountered this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=409192

Did this happen to anyone else?

detpenguin 06-24-2008 08:43 PM

i've used slackware since 9.1, and i have to admit it has never looked this good. thanks! Great Post!!!

Daedra 06-25-2008 11:09 PM

Just to update everyone, I changed the slackbuild. It seems if you have read the post "firefox 3.0 + thunderbird = no email links" it turns out the Pat's firefox/thunderbird patch doesn't seem to be needed anymore and in some cases (mine and otheres) it was causing problems, I now have removed the patch from the slackbuild and now my email problem is fixed. So on the safe side I changed the build however you can still download the original slackbuild from here http://webpages.charter.net/daedra/1...SlackBuild.old

dugan 06-28-2008 05:34 PM

To the SlackBuild, I recommend fixing the blank applications menu bug.

The Bugzilla entry:
https://bugzilla.mozilla.org/show_bug.cgi?id=409192

The patch:
https://bugzilla.mozilla.org/attachment.cgi?id=325195

I added the patch to my SlackBuild and now everything works perfectly. (The crashing problem I mentioned earlier seems to have solved itself).

Daedra 06-28-2008 08:11 PM

So this patch is all you need to fix the application problem? I thought I read that you had to compile a whole bunch of gnome stuff to get that working? Also where did you add the patch, before or after compile?

r00tb33r 06-28-2008 08:26 PM

That so called subpixel rendering of colored pixels makes my eyes water... Its that bad. Blowing cigarette smoke in my face isn't nearly as bad.
I like my fonts with AA but no subpixel rendering.
http://img384.imageshack.us/img384/148/fontsfv1.png
That's how its done.

Daedra 06-28-2008 08:45 PM

Quote:

Originally Posted by r00tb33r (Post 3198098)
That so called subpixel rendering of colored pixels makes my eyes water... Its that bad. Blowing cigarette smoke in my face isn't nearly as bad.
I like my fonts with AA but no subpixel rendering.
http://img384.imageshack.us/img384/148/fontsfv1.png
That's how its done.

I can see what your saying, but without the subpixel rendering they just look to soft to me. I prefer subpixel rendering, but I also like the old bytecode nonAA rendering too, I didn't include that into my howto because it seems so few have CRTs now, most people have switched to LCD.

r00tb33r 06-29-2008 12:08 AM

Quote:

Originally Posted by Daedra (Post 3198107)
I can see what your saying, but without the subpixel rendering they just look to soft to me. I prefer subpixel rendering, but I also like the old bytecode nonAA rendering too, I didn't include that into my howto because it seems so few have CRTs now, most people have switched to LCD.

Hmm, now that I think about it, it will look even worse on a CRT. Meaning I've been using LCDs for many years now. Perhaps it needs tuning for my current monitor, like the color order in a pixel, but I've played with that before, and none of the combinations produced a result I would be happy with. I definitely have to have AA on text at all times though, I even went the length of doing a GTK+ 1 hack, although I don't use that many of GTK+ 1 apps anymore.
NonAA renderings have their purpose... But not in a browser.
Matter of taste I guess. It didn't seem like a biggie back in Win 98 days where I had a choice of nonAA and nonAA.

dugan 06-29-2008 12:22 AM

Quote:

Originally Posted by Daedra (Post 3198088)
So this patch is all you need to fix the application problem? I thought I read that you had to compile a whole bunch of gnome stuff to get that working? Also where did you add the patch, before or after compile?

Let me assure you that compiling a bunch of GNOME stuff will NOT fix the applications problem. I have GSlacky installed. Without the patch, I get a blank applications panel even when I specifically build Firefox with gnomeui and gnomevfs support. These are the only configure flags dealing with GNOME. On the other hand, I can apply the patch, compile gnomeui and gnomevfs support out of Firefox, and still get a working Applications panel.

No, I haven't tested it on a GNOME-free Slackware system. I suspect that the presence of GNOME isn't actually a factor here.

You apply it before compile. Use "patch -p1 < /path/to/patch", then run configure.

onebuck 06-29-2008 12:30 AM

Hi,
Quote:

Originally Posted by Daedra (Post 3198107)
I can see what your saying, but without the subpixel rendering they just look to soft to me. I prefer subpixel rendering, but I also like the old bytecode nonAA rendering too, I didn't include that into my howto because it seems so few have CRTs now, most people have switched to LCD.

I keep a 'CRT' in my shop. Loads of people still use a 'CRT'.

Daedra 06-29-2008 12:36 AM

Quote:

Originally Posted by r00tb33r (Post 3198200)
Hmm, now that I think about it, it will look even worse on a CRT. Meaning I've been using LCDs for many years now. Perhaps it needs tuning for my current monitor, like the color order in a pixel, but I've played with that before, and none of the combinations produced a result I would be happy with. I definitely have to have AA on text at all times though, I even went the length of doing a GTK+ 1 hack, although I don't use that many of GTK+ 1 apps anymore.
NonAA renderings have their purpose... But not in a browser.
Matter of taste I guess. It didn't seem like a biggie back in Win 98 days where I had a choice of nonAA and nonAA.

Yes Subpixel rendering is only for LCD's or CRT's with a triniton tube, if the CRT is Shadow Mask it will look awful. Also have you tried switching the RGB geometry in the .fonts.conf file? It's rare but not all LCD's are RGB. These are my settings, my geometry is RGB (Red,Green,Blue), but you can try a different setting. Here are the available settings if I remember correctly.

<const>rgb<const>
bgr
vrgb
vbgr

<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>

It might be worth a try.

Daedra 06-29-2008 12:48 AM

Quote:

Originally Posted by onebuck (Post 3198212)
Hi,


I keep a 'CRT' in my shop. Loads of people still use a 'CRT'.

Yeah, I think I will add a section for CRT's, you can make the fonts look really good with proper configuration and the bytecode interpreter enabled. Check out this Screen http://webpages.charter.net/daedra/BCI+NO-AA.png

Daedra 06-29-2008 01:01 AM

Quote:

Originally Posted by dugan (Post 3198209)
Let me assure you that compiling a bunch of GNOME stuff will NOT fix the applications problem. I have GSlacky installed. Without the patch, I get a blank applications panel even when I specifically build Firefox with gnomeui and gnomevfs support. These are the only configure flags dealing with GNOME. On the other hand, I can apply the patch, compile gnomeui and gnomevfs support out of Firefox, and still get a working Applications panel.

No, I haven't tested it on a GNOME-free Slackware system. I suspect that the presence of GNOME isn't actually a factor here.

You apply it before compile. Use "patch -p1 < /path/to/patch", then run configure.

ok dugan what am I doing wrong? I am trying to apply the patch and it keeps looking for the file to patch. I extracted firefox went to the mozilla directory and did the ususal patch -p1 < /path/to/patch... what am I missing here, lol? I am familiar with applying patches just don't know what I am doing wrong here, lol


All times are GMT -5. The time now is 08:39 PM.