LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-23-2016, 03:33 PM   #496
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375

Well it turns out that the reason the subpixel rendering was not working on certain things like I mentioned above was not because I was missing the .Xresources file it was because I forgot to symlink the 11-lcdfilter-default.conf option to my conf.d file. So chalk this up to carelessness on my part lol. However the .Xresources file is still important, it fixed some font irregularities I was having with some wine programs.

Last edited by Daedra; 12-23-2016 at 06:40 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-29-2017, 01:46 PM   #497
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by dugan View Post
Code:
sed -i 's/\/\* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2[[:space:]]\+\*\//#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2/g' include/freetype/config/ftoption.h
A bit more elegantly:

Code:
sed -i 's/\/\* (#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2)[[:space:]]\+\*\//\1/g' include/freetype/config/ftoption.h

Last edited by dugan; 01-29-2017 at 01:51 PM.
 
1 members found this post helpful.
Old 06-12-2017, 09:44 PM   #498
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by archfan View Post
Please try my updated version. I've just recompiled it and it worked fine on my machine.

https://github.com/archfan/bob-infinality-bundle
Thanks for this. I built and installed it, and it makes a huge difference that you notice right away upon restarting X. Just one note. After installing, fonts looked really nice and clear everywhere, except for some places in the browser. To fix this, I symlinked all the files from /etc/fonts/conf.avail.infinality/ms into /etc/fonts/conf.d.

Last edited by montagdude; 06-12-2017 at 09:46 PM.
 
1 members found this post helpful.
Old 06-15-2017, 02:27 PM   #499
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by montagdude View Post
After installing, fonts looked really nice and clear everywhere, except for some places in the browser. To fix this, I symlinked all the files from /etc/fonts/conf.avail.infinality/ms into /etc/fonts/conf.d.
This worked for me as well. Many thanks.
 
Old 08-04-2017, 08:26 AM   #500
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,006

Rep: Reputation: Disabled
Hello,
trying to install https://github.com/archfan/bob-infinality-bundle
however install script generated the following error:
fcfreetype.c:71:2: warning: #warning "No FT_Get_BDF_Property: Please install freetype 2.1.4 or later" [-Wcpp]
#warning "No FT_Get_BDF_Property: Please install freetype 2.1.4 or later"
^~~~~~~
fcfreetype.c:75:2: warning: #warning "No FT_Get_PS_Font_Info: Please install freetype 2.1.1 or later" [-Wcpp]
#warning "No FT_Get_PS_Font_Info: Please install freetype 2.1.1 or later"
^~~~~~~
fcfreetype.c:2000:2: warning: #warning "No FT_Get_Next_Char: Please install freetype version 2.1.0 or newer" [-Wcpp]
#warning "No FT_Get_Next_Char: Please install freetype version 2.1.0 or newer"
^~~~~~~
fcfreetype.c:2017:1: warning: ‘FcHashGlyphName’ defined but not used [-Wunused-function]
FcHashGlyphName (const FcChar8 *name)
^~~~~~~~~~~~~~~
fcfreetype.c:2010:23: warning: ‘prefer_unicode’ defined but not used [-Wunused-const-variable=]
static const FcChar32 prefer_unicode[] = {
^~~~~~~~~~~~~~
fcfreetype.c:988:1: warning: ‘FcStringIsConst’ defined but not used [-Wunused-function]
FcStringIsConst (const FcChar8 *string,
^~~~~~~~~~~~~~~
CC fcfs.lo
CC fcinit.lo
CC fclang.lo
CC fclist.lo
CC fcmatch.lo
fcmatch.c:324:63: error: ‘PRI_CHAR_WIDTH_STRONG’ undeclared here (not in a function); did you mean ‘PRI_WIDTH_STRONG’?
#define FC_OBJECT(NAME, Type, Cmp) { FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG, PRI_##NAME##_WEAK },
^
fcobjs.h:54:1: note: in expansion of macro ‘FC_OBJECT’
FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL)
^~~~~~~~~
fcmatch.c:324:84: error: ‘PRI_CHAR_WIDTH_WEAK’ undeclared here (not in a function); did you mean ‘PRI_WIDTH_WEAK’?
#define FC_OBJECT(NAME, Type, Cmp) { FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG, PRI_##NAME##_WEAK },
^
fcobjs.h:54:1: note: in expansion of macro ‘FC_OBJECT’
FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL)
^~~~~~~~~
make[3]: *** [Makefile:595: fcmatch.lo] Error 1
make[3]: Leaving directory '/tmp/bob-infinality-bundle/fontconfig-2.11.95/src'
make[2]: *** [Makefile:497: all] Error 2
make[2]: Leaving directory '/tmp/bob-infinality-bundle/fontconfig-2.11.95/src'
make[1]: *** [Makefile:583: all-recursive] Error 1
make[1]: Leaving directory '/tmp/bob-infinality-bundle/fontconfig-2.11.95'
make: *** [Makefile:467: all] Error 2

How can I fix this?
Thank you for your help

Note:
after searching a little bit I have found this explanation:
https://github.com/voidlinux/void-packages/issues/5693
?

Last edited by Aeterna; 08-04-2017 at 09:40 AM.
 
Old 08-04-2017, 03:43 PM   #501
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Are you trying to install infinality on 14.2 or -current? The infinality patches don't work/compile on -current because of the newer harfbuzz package. If you are running -current you really don't need infinality because most of that code has been merged into freetype. You just have to change a few settings.
 
Old 08-04-2017, 10:11 PM   #502
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,006

Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
Are you trying to install infinality on 14.2 or -current? The infinality patches don't work/compile on -current because of the newer harfbuzz package. If you are running -current you really don't need infinality because most of that code has been merged into freetype. You just have to change a few settings.
Which setting should I change aside from anti-aliasing?

Thank you
 
Old 08-05-2017, 03:46 AM   #503
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by Daedra View Post
You just have to change a few settings.
I didn't find it quite as simple as changing a few settings. I followed the recipes on http://duganchen.ca/writings/slackware/fonts/ and got decent looking fonts on my 4k monitor.
 
Old 08-05-2017, 03:53 PM   #504
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by Aeterna View Post
Which setting should I change aside from anti-aliasing?

Thank you
You didn't say if you were on -current or not. I am going to assume you are. If you want your fonts to look like infinality then do the following steps.


1) Download the freetype-2.8. source from a current mirror, edit the buildscript and enable the freetype.subpixel.rendering.diff.gz patch by uncommenting the patch line in the buildscript. Build and install using upgradepkg

if you want to quickly download the freetype source copy and paste this command
Code:
lftp -c "open http://slackware.osuosl.org/slackware64-current/source/l/ ; mirror freetype"
Now you will have a directory called freetype with the source and the slackbuild in it.


2) change directory to /etc/fonts/conf.d and symlink these entries into the directory using the below commands..
ln -s /etc/fonts/conf.avail/10-hinting-slight.conf
ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf

3) Create a .Xresources file in your home directory with the following settings...

Xft.dpi: 96
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
Xft.autohint: 0

4) make sure you are using either mode 38 or 40 in the /etc/profile.d/freetype.sh file. (40 is default unless otherwise specified I believe)
38 is infinality mode, but after testing I did not see any difference in the two

5) make sure you are running 96 DPI (optional, you may desire a higher or lower DPI). See dugan chen's webpage mentioned above to set your DPI

6) log out of X and restart X

6) Done.

Your fonts wont look exactly like 14.2 because the default fonts were switched from deja vu to liberation. and the new version of freetype implemented a patch that disables metric scaling on true type fonts so some of your fonts may look larger than they did before.

Here is a screenshot of my -current VM fonts after doing the above https://www.dropbox.com/s/gnh286qtxp...2.7.1.png?dl=0

Last edited by Daedra; 08-06-2017 at 06:35 PM.
 
2 members found this post helpful.
Old 08-05-2017, 09:19 PM   #505
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,006

Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
You didn't say if you were on -current or not. I am going to assume you are. If you want your fonts to look like infinality then do the following steps.
I am sorry, I should indicate what Slackware I am running. I am on -current

Anyway it all worked well

Daedra & Martinus2u thank you both very much.
 
Old 08-06-2017, 03:53 AM   #506
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by Daedra View Post
5) make sure you are running 96 DPI.
Ehh...96 dpi is just Windows' default. It's a reasonable one, but it's not more optimal than any other font size.

If you don't specify the DPI, X will usually detect it, and you should probably stick with what's detected. On a regular monitor, it will probably be something close to 96 DPI.

If your display device is a TV (which means you're setting a number of feet away), or if you're running a HiDPI device, then you you probably want to force the DPI to something higher than 96. I run my HTPC at 160 DPI. And the 4K monitor I bought earlier this year looks good at 192 dpi.
 
Old 08-06-2017, 06:34 PM   #507
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by dugan View Post
Ehh...96 dpi is just Windows' default. It's a reasonable one, but it's not more optimal than any other font size.

If you don't specify the DPI, X will usually detect it, and you should probably stick with what's detected. On a regular monitor, it will probably be something close to 96 DPI.

If your display device is a TV (which means you're setting a number of feet away), or if you're running a HiDPI device, then you you probably want to force the DPI to something higher than 96. I run my HTPC at 160 DPI. And the 4K monitor I bought earlier this year looks good at 192 dpi.
Very true, 96 DPI has always been a windows one size fits all. I just suggested it more out of habit than anything. I edited my post to reflect this.

Last edited by Daedra; 08-06-2017 at 06:35 PM.
 
Old 08-09-2017, 02:03 PM   #508
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,157
Blog Entries: 5

Rep: Reputation: 391Reputation: 391Reputation: 391Reputation: 391
Thanks all for this very useful thread.

I've followed it intermittently for some time but didn't want to tweak my system with the infinality patch.

I recently noticed that a recompiling of freetype and some simple changes in configuration would do the trick on Slackware 14.2.

I followed dugan's tutorial "Optimizing Slackware Linux’s Fonts" and the resulting changes in font rendering greatly improved my user experience !!!

Here are some small feedbacks on this great tutorial:

1) I used the freetype source in patches/source/freetype/ as there was a security fix in 14.2

2) the sed command to enable subpixel hinting doesn't work on 14.2 (freetype 2.6.3). I believe that syntax is for -current. The patch for freetype 2.6.3 is the same as the one shown in post #481. I used this command instead (it can be improved but it worked):

Code:
sed -i 's/\/\* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING[[:space:]]\+\*\//#define TT_CONFIG_OPTION_SUBPIXEL_HINTING/g' include/freetype/config/ftoption.h
 
Old 08-09-2017, 03:19 PM   #509
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
It's strange, because when I followed dugan's tutorial on 14.2, I couldn't see a discernible difference. Using infinality made a big difference. Maybe I used the wrong patch.
 
Old 08-09-2017, 05:05 PM   #510
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,157
Blog Entries: 5

Rep: Reputation: 391Reputation: 391Reputation: 391Reputation: 391
@montagdude,

See my comment on the "sed" command in dugan's tutorial not being applicable to 14.2 (freetype 2.6.3). A properly patched freetype package would show this:
Code:
$cat /usr/include/freetype2/freetype/config/ftoption.h | grep HINTING 
  /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
whereas a non-patched version would show:

Code:
cat /usr/include/freetype2/freetype/config/ftoption.h | grep HINTING 
  /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
Among other things, I can see a difference with a patched freetype and the needed configuration changes simply by looking at the title of this thread: the "k" in "Slackware" is fuzzy without the patch and it's clean and crisp with the patched version (by the way that's how I found out that the sed command in the tutorial didn't work for me).
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
If I were to recompile & arch-optimize Slackware, where to begin? GrapefruiTgirl Slackware 124 06-22-2007 09:46 PM
How to Optimize Slackware 10.2? zeroz52 Slackware 23 10-04-2005 06:42 PM
How to fully optimize Slackware? Introx Slackware 4 05-30-2004 04:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration