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/)

dugan 09-11-2012 11:33 PM

If you want it to take advantage of the patched font libraries (Freetype, etc) then yes.

PenguinWearsFedora 09-20-2012 12:27 AM

Quote:

Originally Posted by dugan (Post 4778146)
If you want it to take advantage of the patched font libraries (Freetype, etc) then yes.

I've downloaded sources for Firefox 15.0.1(x86_64) from Slackware mirror and got Firefox.Slackbuild (x86_64). So how do I change the slackbuild script? I've installed your patches from the github.

Edit: Downloaded x86_64 source directory.

dugan 09-20-2012 09:41 AM

Add --enable-system-cairo to the configure flags.

Daedra 09-21-2012 01:40 AM

I've been busy with school and work so I haven't really had anytime to play with Current, but I have been running the 13.37 patches and I have noticed that, for whatever reason even though the newest builds of firefox have the --enable-system cairo flag disabled like Dugan pointed out but it doesn't seem to affect the font quality, at least with the patches I use. This used to be an issue and you definitely had to enable this feature to get the proper results but this doesn't seem to be the case anymore. I took a screenshot and compared it to my older ones and I can see no difference. I can't find the exact code snippet but I did see that there was a subpixel patch that was added to the cairo git tree a while back. I have been testing on current the last few days and the cairo patch I use is needed because slackware 14 is going to ship with cairo-1.10.2 since the newer versions of cairo are broken, but I did test out cairo-1.12.2 and I can confirm that the cairo patches I use are no longer needed for the 1.12 branch of cairo and it leads me to believe that the internal version firefox uses is possibly one of those newer versions.

http://dl.dropbox.com/u/85079539/Scr.../snapshot4.png

fgcl2k 09-21-2012 04:52 AM

Quote:

Originally Posted by Daedra (Post 4785610)
...
slackware 14 is going to ship with cairo-1.10.2 since the newer versions of cairo are broken,
...

What do you mean when you say they are broken?

Daedra 09-21-2012 07:28 AM

http://www.linuxquestions.org/questi...7/#post4785480

PenguinWearsFedora 09-21-2012 07:35 AM

Quote:

Originally Posted by Daedra (Post 4785610)
I've been busy with school and work so I haven't really had anytime to play with Current, but I have been running the 13.37 patches and I have noticed that, for whatever reason even though the newest builds of firefox have the --enable-system cairo flag disabled like Dugan pointed out it doesn't seem to affect the font quality, at least with the patches I use. This used to be an issue and you definitely had to enable this feature to get the proper results but this doesn't seem to be the case anymore. I took a screenshot and compared it to my older ones and I can see no difference. I can't find the exact code snippet but I did see that there was a subpixel patch that was added to the cairo git tree a while back. I have been testing on current the last few days and the cairo patch I use is needed because slackware 14 is going to ship with cairo-1.10.2 since the newer versions of cairo are broken, but I did test out cairo-1.12.2 and I can confirm that the cairo patches I use are no longer needed for the 1.12 branch of cairo and it leads me to believe that the internal version firefox uses is possibly one of those newer versions.

http://dl.dropbox.com/u/85079539<a h.../snapshot4.png

Yeah I was going to say the same thing. I built firefox without enabling the cairo but then Dugan suggested to enable it in the slackbuild script, so I un-commented the line to read:
Code:

--enable-system cairo \
After I enabled the flag, I didn't see any difference either. Before and after shots:
http://imageshack.us/photo/my-images/803/snapshot3x.png
http://imageshack.us/a/img51/8339/snapshot3after.png


http://img827.imageshack.us/img827/1070/snapshot4eq.png
http://img94.imageshack.us/img94/478...shot4after.png

fgcl2k 09-21-2012 10:31 AM

Quote:

Originally Posted by Daedra (Post 4785762)

Thanks.

GNU/Linux 09-30-2012 01:32 PM

So when we're going to see patched version from Dugan to beautify this new puppy up :) ? Can I use the currently available Slackbuild script with the lastest sources of fontconfig, freetype, libXft and Cairo to get LCD Filter rendering?

dugan 09-30-2012 01:36 PM

Soon!

I haven't even installed Slackware 14 yet. Too busy reading LQ. :)

GNU/Linux 09-30-2012 01:49 PM

haha. Wouldn't it be a pleasant experience reading text when fonts are all sexy and smooth, well atleast for us with Slackware 14. Just a thought, no pressure.

Daedra 09-30-2012 06:20 PM

Here are the patches I use for 14, these patches are based off the old cleartype patches written by David Turner of Freetype. These patches are almost obsolete because most the code has now been merged upstream. We still need to patch freetype and cairo, but the libXft patch is no longer needed. Truth is this is the last release I will maintain these patches for since the patches won't be needed in the very near future.

Freetype
Cairo

Config File (Copy this code and save it in your home directory as .fonts.conf)

Before
After

dugan 09-30-2012 11:04 PM

I don't have new lcdfilering SlackBuilds up yet, but I do have a treat for you.

http://www.duganchen.ca/files/google...noarch-2dc.txz

It's a Slackware package containing the fonts in Android SDK ADT release 20. This consists of a lot more than the Droid Sans/Serif/Mono fonts that most people are familiar with. In particular, it includes Roboto, the new UI font used in Ice Cream Sandwich. Additionally, it includes Droid Sans Fallback, which is Google's pan-Unicode font. If you cat quickbrown.txt from an xterm launched with the following command:

Code:

LANG=en_US.UTF8 xterm -fd Droid\ Sans\ Fallback
Then every character will be displayed properly. This is better even than what you can currently get on Arch Linux, where the cyrillic fonts still display as squares.[1]

1. at least on my current installation.

GNU/Linux 10-01-2012 05:34 AM

Quote:

Originally Posted by Daedra (Post 4793524)
Here are the patches I use for 14, these patches are based off the old cleartype patches written by David Turner of Freetype. These patches are almost obsolete because most the code has now been merged upstream. We still need to patch freetype and cairo, but the libXft patch is no longer needed.

Freetype
Cairo

Config File (Copy this code and save it in your home directory as .fonts.conf)

Before
After

These fonts/rendering really good Daedra, thanks for the screenshots. Is there any other difference between Slacware 13.37 and 14 as far as all that font patching is concerned. Like do we have to recompile Firefox again with cairo enabled or any other finer details that we should be aware of?

dugan 10-01-2012 01:12 PM

SlackBuilds for 14.0 are now up at the usual place:

https://github.com/duganchen/slackware-lcdfilter

My testing so far has gone as far as, "well, they build".

The libXft SlackBuild is gone. All the upstream lcd-filtering libXft ebuild did was add settings that could just as easy be set in .Xresources.


All times are GMT -5. The time now is 08:30 AM.