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 01-04-2010 08:42 AM

Quote:

Originally Posted by Thursapr (Post 3813482)
Upgraded to new versions. It is weird that everything works fine, except Firefox (3.5.6), the fonts like the patches never been applied.

Is anyone having the same problem? I had a rebuilt Firefox 3.5.2 from before I upgraded to the new font packages. After I upgraded the font packages, Firefox's font rendering behavior continued as expected.

rmjohnso 01-04-2010 03:30 PM

I'm using Slackware64-current, so I think Pat's build of Firefox is dynamically linked against cairo instead of the static linking under 32-bit. Everything looks good to me in firefox-3.5.6 now that I've got cairo-1.8.8 patched.

rmjohnso 01-04-2010 06:37 PM

Why is Chrome not showing fonts in a manner similar to Firefox? It defaults to using Arial and Times New Roman, and I've switched it to match what I have in Firefox, but I didn't really see any change.

Daedra 01-05-2010 12:16 AM

just guessing but like you said above, chrome might be statically linked against cairo. That could be the problem.

rmjohnso 01-05-2010 12:42 PM

After doing a little googling, it looks like Chrome uses skia (http://code.google.com/p/skia/) and not cairo.

dugan 01-25-2010 03:18 AM

Thursapr, what rmjohnso wrote is correct. You need to rebuild Firefox from source. Use the Slackware64 SlackBuild.

Thursapr 01-26-2010 10:08 AM

Quote:

Originally Posted by dugan (Post 3839507)
Thursapr, what rmjohnso wrote is correct. You need to rebuild Firefox from source. Use the Slackware64 SlackBuild.

I did these exactly. But after upgrading the 4 packages, not before.

Anyone rebuild FF after upgrading 4 package not encountered my problem?

dugan 01-26-2010 12:32 PM

Quote:

Originally Posted by Thursapr (Post 3841097)
Anyone rebuild FF after upgrading 4 package not encountered my problem?

Yes. In the "Optimizing" page I have screenshots to prove it.

GrapefruiTgirl 01-26-2010 12:47 PM

@ dugan,

I just wanted to write that I had never before visited your web page about these fonts and things, so I went and had a look just now. It's nice! Really well written and covers a lot of angles dealing with fonts and monitors and X. Cool, nice work.

I have long ago got my subpixel rendering sorted out, but never yet bothered going into great depth regarding my Slackware fonts (AFAICT they are pretty good anyhow); but it's on my list though of things to do eventually, and I'll be using this thread, and your web page, as a guide/template when I get to it.

Thanks,
Sasha

dugan 05-24-2010 05:59 PM

The four patched SlackBuilds have been updated for 13.1.

You can find them in the "Optimizing Slackware Linux's Fonts" page in my sig.

Hangdog42 05-25-2010 07:10 AM

Thanks dugan, your page has been a real help in making my desktop MUCH getter.

tomtomjkw 06-01-2010 02:13 AM

Calibri problem
 
Hi

I have a problem with Calibri font:

http://yfrog.com/jycalibrip

When font size ranges from 8 to 14, rendering of language specific fonts seems to be broken. 15 and over - font is ok.
Webcore-fonts installed from Dugan's slackbuild, fontconfig and others compiled Cleartype-style.
Any ideas?

dugan 06-12-2010 11:34 PM

I just noticed that the current Fontconfig patch no longer enables the "lcddefault" filter, which is the whole point of the Ubuntu patches in the first place.

You need to add the following lines to your local.conf:
Code:

       
<match target="font">
    <edit name="lcdfilter" mode="assign">
        <const>lcddefault</const>
    </edit>
</match>

Also, after upgrading from 13.1 from 13.0, you need to rebuild all 4 packages in order. I know this wasn't obvious because I'd neglected to change the build numbers, but I've taken care of that now.

SpelledJ 06-13-2010 10:08 AM

I rebuilt your packages for 13.1 on a fresh installation a couple of weeks ago, Dugan, and my fonts didn't seem as clear as they did a couple of months ago on -current. Thanks for the tweak - that made a big difference. One thing you might want to mention is that your addition needs to go between the <fontconfig> . . . </fontconfig> tags, not at the end of the file.

Something else I noticed is that I'm missing some entries in /etc/fonts/conf.avail now. Compared to your post #125, I don't have any 10-hinting-*.conf entries, and I don't have 11-lcd-filter-lcddefault.conf. Your conf.d from post #125 was last edited in 08/09 for Slackware 13.0. Is it still consistent with 13.1?

My /etc/fonts/conf.avail:
Code:

-rw-r--r-- 1 root root  220 2010-06-01 17:54 10-autohint.conf
-rw-r--r-- 1 root root  226 2010-06-01 17:54 10-no-sub-pixel.conf
-rw-r--r-- 1 root root  225 2010-06-01 17:54 10-sub-pixel-bgr.conf
-rw-r--r-- 1 root root  225 2010-06-01 17:54 10-sub-pixel-rgb.conf
-rw-r--r-- 1 root root  226 2010-06-01 17:54 10-sub-pixel-vbgr.conf
-rw-r--r-- 1 root root  226 2010-06-01 17:54 10-sub-pixel-vrgb.conf
-rw-r--r-- 1 root root  217 2010-06-01 17:54 10-unhinted.conf
-rw-r--r-- 1 root root  912 2010-06-01 17:54 20-fix-globaladvance.conf
-rw-r--r-- 1 root root 1157 2010-06-01 17:54 20-unhint-small-vera.conf
-rw-r--r-- 1 root root 2941 2010-06-01 17:54 25-unhint-nonlatin.conf
-rw-r--r-- 1 root root 3939 2010-06-01 17:54 30-metric-aliases.conf
-rw-r--r-- 1 root root 1164 2010-06-01 17:54 30-urw-aliases.conf
-rw-r--r-- 1 root root 2103 2010-06-01 17:54 40-nonlatin.conf
-rw-r--r-- 1 root root 1837 2010-06-01 17:54 45-latin.conf
-rw-r--r-- 1 root root  545 2010-06-01 17:54 49-sansserif.conf
-rw-r--r-- 1 root root  245 2010-06-01 17:54 50-user.conf
-rw-r--r-- 1 root root  318 2010-06-13 09:33 51-local.conf
-rw-r--r-- 1 root root 1701 2010-06-01 17:54 60-latin.conf
-rw-r--r-- 1 root root 9880 2010-06-01 17:54 65-fonts-persian.conf
-rw-r--r-- 1 root root  289 2010-06-01 17:54 65-khmer.conf
-rw-r--r-- 1 root root 7706 2010-06-01 17:54 65-nonlatin.conf
-rw-r--r-- 1 root root  672 2010-06-01 17:54 69-unifont.conf
-rw-r--r-- 1 root root  263 2010-06-01 17:54 70-no-bitmaps.conf
-rw-r--r-- 1 root root  263 2010-06-01 17:54 70-yes-bitmaps.conf
-rw-r--r-- 1 root root  388 2010-06-01 17:54 80-delicious.conf
-rw-r--r-- 1 root root 1691 2010-06-01 17:54 90-synthetic.conf

My *dc packages in /var/log/packages, note timestamps for build order:

Code:

-rw-r--r-- 1 root root 3861 2010-06-01 17:57 freetype-2.3.12-x86_64-1_dc
-rw-r--r-- 1 root root 8827 2010-06-01 17:58 fontconfig-2.8.0-x86_64-1_dc
-rw-r--r-- 1 root root 1068 2010-06-01 18:01 libXft-2.1.14-x86_64-1_dc
-rw-r--r-- 1 root root 4197 2010-06-01 18:02 cairo-1.8.8-x86_64-3_dc

Thanks as usual for keeping up with all the nice font upgrades!

dugan 06-13-2010 01:12 PM

SpelledJ: Those files are no longer there. I've edited post #125 accordingly.

To tweak further, try putting <edit name="antialias" mode="assign"><bool>true</bool></edit> or <edit name="antialias" mode="assign"><bool>false</bool></edit> between the <match> tags.

Also, I tried Chrome, and I noticed that the fonts in the rendering area look different than the fonts in its menus, with the menu fonts being fuzzier and the website fonts being sharper. This leads me to believe that the settings in Chrome's rendering area are actually hardcoded, and cannot be changed. I do know that this is the case with another program: the Gargoyle Interactive Fiction Interpreter.

dugan 06-13-2010 04:57 PM

ACTUALLY, the missing files were a bug in the Fontconfig SlackBuild. I fixed it. They're there now.

Everything should now work as before.

rmjohnso 06-14-2010 09:05 PM

Quote:

Originally Posted by dugan (Post 4002464)
ACTUALLY, the missing files were a bug in the Fontconfig SlackBuild. I fixed it. They're there now.

Everything should now work as before.

dugan, can you post a list of links that you have in your /etc/fonts/conf.d directory?

Thursapr 06-14-2010 09:32 PM

dugan, it would be nice if you also provide the patches for older slackware (12.x, 13.0). Maybe a tree of folders?

dugan 06-14-2010 10:25 PM

The patched versions of Freetype, Fontconfig, LibXft and Cairo will work in older Slackware.

sljunkie 06-26-2010 03:53 PM

Hey Dugan,

Thank you very much for providing those packages, I used to recompile freetype with the 'problem' code enabled, but with the extra patches everything looks even better - even though I think that recompiling only freetype and fontconfig work just fine for my tastes ;)

But regarding your posted conf.d dir, I find that I'm missing the 52-languageselector.conf file, what's its contents and where does it get installed from?

dugan 06-26-2010 04:00 PM

Hmm... I don't seem to have the 52-languageselector.conf file anymore either. I've edited post #125 accordingly.

dugan 08-20-2010 01:29 AM

I just updated the "Optimizing Slackware Linux's Fonts" page. Among the changes are:
  • a better way of setting your X DPI (the same on recommended here)
  • a better source for the Android fonts (you get them from Google now)
  • a way to get the fonts in Java apps to look good, rather than hideous (from the Arch wiki)

It also has a new design that doesn't use Microsoft fonts :D.

Daedra 08-20-2010 01:53 AM

Nice

onebuck 08-20-2010 07:43 AM

Hi,

Very nice!

Quote:

Originally Posted by dugan (Post 4072014)
I just updated the "Optimizing Slackware Linux's Fonts" page. Among the changes are:
  • a better way of setting your X DPI (the same on recommended here)
  • a better source for the Android fonts (you get them from Google now)
  • a way to get the fonts in Java apps to look good, rather than hideous (from the Arch wiki)

It also has a new design that doesn't use Microsoft fonts :D.


tomtomjkw 11-15-2010 10:27 AM

Hi,

Just upgraded to newest -current, cairo and freetype included. Obvious result - firefox and thunderbird look awful now. Unfortunately I couldn't find subpixel rendering patches for cairo 1.10 and freetype 2.4.3 that would fit Dugan's slackbuilds. If anybody got it going, I would be grateful.

catkin 11-15-2010 11:53 AM

Quote:

Originally Posted by dugan (Post 4072014)
I just updated the "Optimizing Slackware Linux's Fonts" page.

Thanks -- there's a new task for my TODO list :)

BTW there's a typo on the displayed link for rxvt-unicode which appears as rxt-unicode.

GazL 11-15-2010 05:43 PM

Quote:

Originally Posted by tomtomjkw (Post 4159550)
Hi,

Just upgraded to newest -current, cairo and freetype included. Obvious result - firefox and thunderbird look awful now. Unfortunately I couldn't find subpixel rendering patches for cairo 1.10 and freetype 2.4.3 that would fit Dugan's slackbuilds. If anybody got it going, I would be grateful.

Have to agree. The latest 'current' font rendering looks awful here too. I've always been happy with slackware stock font rendering till now. Even without any of dugan's beautifying techniques. There's no way I can live with the new defaults though. Will need to look into this.

slackd 11-15-2010 07:30 PM

Quote:

Originally Posted by tomtomjkw (Post 4159550)
Hi,

Just upgraded to newest -current, cairo and freetype included. Obvious result - firefox and thunderbird look awful now. Unfortunately I couldn't find subpixel rendering patches for cairo 1.10 and freetype 2.4.3 that would fit Dugan's slackbuilds. If anybody got it going, I would be grateful.

I used Dugan's old slackbuilds and Pat's new slackbuilds and made the necessary changes, actually most of the cairo, libXft and freetype patches are not required as they are already included in the new tarballs.

Fontconfig remains the same, so must be recompiled againts -current.

I will prepare a list soon.

slackd 11-15-2010 07:48 PM

2 Attachment(s)
Quote:

Originally Posted by slackd (Post 4160071)
I will prepare a list soon.

1. Freetype: See attachment.

2. Fontconfig - (Just Recompile)

3. libXft :-
Step1 -> The patch needs a small edit towards the end. Just use the attached patch.

Step2 -> Compile with Dugan's slackbuild.

4. Cairo :-

Step1: Edit Slackbuild to include the following patches from Pat's slackbuild:

Code:

zcat $CWD/cairo-1.10.0-buggy_gradients.patch.gz | patch -p1 || exit 1
Now Dugan's Slackbuild:
Code:

patch -p1 < "${FILESDIR}"/${P}-interix.patch
patch -p1 < "${FILESDIR}"/${PN}-respect-fontconfig.patch

Step2: Bump version name of the "interix" patch in the files/ directory.
Quote:

cairo-1.10.0-interix.patch
Note 1. Compile in the order Dugan had originally mentioned.
Note 2. Use only the attached patches.

*Note 3*
Just realized that uploading the slackbuilds will make the job easier.

EDIT:
I am sorry if the Slackbuilds appear to be crude and unpolished, i edited them in a hurry.

-Good Luck-

Daedra 11-15-2010 09:15 PM

Awesome slackd,

Here are builds for people like myself who like cleartype patch sets,
http://webpages.charter.net/daedra1/cleartype/ (screenshots also)

these are for -current, just follow this order,

Freetype
Cairo
Fontconfig - (Just Recompile) *or you can skip this altogether, see below
libXft

Also I added a file in the build, source.sh. just run ./source.sh and it will download the source for you. This should save you a few minutes from searching and downloading the sources.

I personally dont mess with fontconfig I just drop in a .fonts.conf file in my home directory with my individual settings, this only works for that user and it is the lazy way... but I like it ;). Here is my .fonts.conf if interested.

<?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>hintfull</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>

slackd 11-15-2010 09:31 PM

Good Work, Daedra.

I might try out cleartype for a change!!

tomtomjkw 11-16-2010 01:46 AM

Thanks Daedra, my fonts are back to their good cleartype-selves.

Additional question - what does exactly libXft cleartype patch do? I can't build libXft with your slakbuild (line 60: ./configure no such file or directory), but honestly I haven't ever been able to see the difference beetween stock libXft and Dugan's one.

Daedra 11-16-2010 04:05 AM

Quote:

Originally Posted by tomtomjkw (Post 4160333)
Thanks Daedra, my fonts are back to their good cleartype-selves.

Additional question - what does exactly libXft cleartype patch do? I can't build libXft with your slakbuild (line 60: ./configure no such file or directory), but honestly I haven't ever been able to see the difference beetween stock libXft and Dugan's one.

Hhmm, I just checked the build and it works fine on my end. That's weird, where did you download the source? Also you can try src2pkg, just run it in the build directory and it will automatically pick up the patch and slack-desc file.

And it's been debated on whether or not you really need to recompile libXft, but in my opinion it does make a difference.

stormtracknole 11-16-2010 04:27 AM

Daedra,

This is will be my first attempt at using cleartype. I have a question, do I need to rebuild the freetype version provided in the latest current, or could I use a previous version?

Daedra 11-16-2010 04:31 AM

Quote:

Originally Posted by stormtracknole (Post 4160489)
Daedra,

This is will be my first attempt at using cleartype. I have a question, do I need to rebuild the freetype version provided in the latest current, or could I use a previous version?

well the builds I posted are for -current but older versions work fine. You just need to make sure that BCI/subpixel rendering/disable quantization patches are enabled in the slackbuild and you good to go with freetype.

stormtracknole 11-16-2010 04:36 AM

Quote:

Originally Posted by Daedra (Post 4160491)
well the builds I posted are for -current but older versions work fine. You just need to make sure that BCI/subpixel rendering/disable quantization patches are enabled in the slackbuild and you good to go with freetype.

I see that this is enabled by default. I'm in the process of rebuilding all the needed packages. I'm impressed by your comparison png images. I'm not sure why I haven't tried cleartype before.

Daedra 11-16-2010 04:38 AM

are you building on current or slackware 13.1? Cause I have builds for both I just only have my -current ones posted right now. but I can post them if you need them?

stormtracknole 11-16-2010 04:40 AM

Quote:

Originally Posted by Daedra (Post 4160502)
are you building on current or slackware 13.1? Cause I have builds for both I just only have my -current ones posted right now. but I can post them if you need them?

I'm building this on current. You could post your notes for the stable branch in case someone else wants them. :)

tomtomjkw 11-16-2010 07:34 AM

Quote:

Originally Posted by Daedra (Post 4160473)
Hhmm, I just checked the build and it works fine on my end. That's weird, where did you download the source? Also you can try src2pkg, just run it in the build directory and it will automatically pick up the patch and slack-desc file.

And it's been debated on whether or not you really need to recompile libXft, but in my opinion it does make a difference.

Downloaded from here.

stormtracknole 11-16-2010 09:09 AM

Daedra,

Had great success using the modified freetype to build "cleartype". The instructions worked out great! Just for the heck of it, I tried the latest current freetype, and adding 10-autohint.conf to /etc/fonts/conf.d/ which gave me good results also. Both options used .fonts.conf file that you provided in a previous post. I like the "cleartype" fonts much, much better though! :) Thanks for your help on this!

onebuck 11-16-2010 12:34 PM

Hi,

Quote:

Originally Posted by Daedra (Post 4160502)
are you building on current or slackware 13.1? Cause I have builds for both I just only have my -current ones posted right now. but I can post them if you need them?

I'd be interested in looking at the builds.
:hattip:

Daedra 11-16-2010 05:48 PM

Here are builds for 13.1 cleartype. Like I said in the previous post you can rebuild fontconfig with Dugan's build but I just skip that step and use a .fonts.conf file in my home directory. Either way works, but the .fonts.conf way is the lazy way :).

http://webpages.charter.net/daedra1/cleartype.zip

amiga32 11-16-2010 10:35 PM

Anyone know how to get OS X Quartz style rendering? Or the closest fontconfig example and patches? Cleartype is ok, but I prefer the super AA OS X offers. Text shapes look more accurate to me, at the expense of extra blurriness which I don't mind.

Daedra 11-17-2010 12:50 AM

You can try my cleartype builds with my .fonts.conf file, but don't enable sub-pixel rendering, this should give you the over AA blurry look your wanting. You might be able to achieve this with the stock packages, but I haven't tried OS X style in over a year so I can't remember, I do know that disabling sub-pixel rendering definitely gave a more OS X look.

Good Luck.

V4Nelle 11-18-2010 08:39 AM

I get this message...why?

Hunk #1 succeeded at 27.
Hunk #2 succeeded at 53.
Hunk #3 succeeded at 145.
Hunk #4 succeeded at 187.
Hunk #5 succeeded at 208.
Hunk #6 succeeded at 287.
Hunk #7 succeeded at 381.
Hunk #8 succeeded at 393.
Hunk #9 succeeded at 411.
Hunk #10 succeeded at 530.
done
./libXft.SlackBuild: line 60: ./configure: No such file or directory

tomtomjkw 11-18-2010 01:45 PM

Because you really don't have configure file in your libXft.2.2.0 source file. I do not have it either.

Solution:
download source from any slackware mirror (it's located in source/x11/src/lib/), recompress it from tar.xz to tar.bz2 (or change slackbuild), create package.

Daedra 11-18-2010 04:30 PM

I went ahead and edited the build slightly so that you guys shouldn't run into this problem with the libXft build. I also added a source.sh file which can download the source for you. This should save you some time running around looking for the source. Now to download the source just run. ./source.sh then after you are ready to build.

tomtomjkw 11-18-2010 11:49 PM

I -think- I can see the difference in font rendering after finally upgrading to your libXft version: font seem to be even more cleartype like, but am not sure, must check it out.

Daedra 11-19-2010 12:00 AM

Could you post a screenshot? I am curious to see. I have always maintained that you need to recompile libXft to get the best results, a lot of other people feel this isn't necessary, I do know the results are very close though.

tomtomjkw 11-19-2010 04:07 AM

With pleasure, when I come back from the mountains :)


All times are GMT -5. The time now is 02:27 PM.