LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-11-2013, 04:17 PM   #421
grothen
LQ Newbie
 
Registered: Sep 2013
Posts: 23

Rep: Reputation: Disabled

Quote:
Originally Posted by hba View Post
Well, Slackware 14.1 is already here so i builded a VM for x86 and tested the modified SlackBuilds, so far they just work.

At my repository there's an install.sh script to make more easy the process and updated the screenshots using xfce.
thank you for your effort. I have tried it, but it seems that the font rendering is worst, probably due to some misconfiguration by me Anyway I'm back to using freetype with the subpixel patch

anyone knows how to fix the fonts in java programs?

Last edited by grothen; 11-11-2013 at 04:42 PM.
 
Old 11-11-2013, 05:03 PM   #422
narz
Member
 
Registered: May 2007
Location: US
Distribution: slackware
Posts: 184

Rep: Reputation: 35
Quote:
Originally Posted by grothen View Post
thanks for your packages good luck!

by the way, hasn't the subpixel hinting patent expired? (probably mixing something here) cause in debian now to achieve good fonts it's sufficient to enable subpixel hinting with fontconfig while in Slackware it doesn't work.
Apple's bytecode interpreter for font hinting expired, Microsoft's subpixel rendering patent did not. You still have to recompile freetype to use it.
 
Old 11-13-2013, 02:28 AM   #423
hba
LQ Newbie
 
Registered: May 2012
Location: Oaxaca, México
Distribution: Slackware Linux
Posts: 18

Rep: Reputation: Disabled
Quote:
I have tried it, but it seems that the font rendering is worst, probably due to some misconfiguration by me
In my case i just let the default configuration because i really do not have the time to mess around with something that seems to be already a mess.

BTW, i created that repository in Oct 15, 2013 while Bohoomil (infinality-bundle author) created a wiki-page [1] in Oct 30, 2013‎, which quite frankly helps to understand the hole project. Anyway, there is an issue, since Bohoomil makes this project for Arch Linux their packages are updated more quickly (freetype, fontconfig and cairo) than Slackware [2] so any improvement (patch-configuration) is for a more updated package.

Something that i have to say, my repository has the patches-configurations that works with the packages that Slackware 14.1 provides and as far as i know these patches-configurations work best with Microsoft fonts (i just copied them from my C: drive to /usr/share/fonts/TTF) but in the "last version" (commit mainly) Bohoomil makes by default the configuration for "free fonts" [3] and also added a tool [4] to change this behavior. Anyway, for someone more interesting (and with more time) now knows where to start

[1] https://wiki.archlinux.org/index.php...bundle%2Bfonts
[2] https://github.com/bohoomil/fontconf.../tree/pkgbuild
[3] another package named "infinality-bundle-fonts", check [1] and https://github.com/bohoomil/fontconf.../tree/pkgbuild
[4] https://github.com/bohoomil/fontconf...hes/fc-presets
 
Old 11-19-2013, 05:51 PM   #424
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,574

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
If you're like me and you plan to try living without Infinality, here's something to try. First, here's a patch to turn on Cleartype rendering.

Code:
diff -rupN freetype.orig/cleartype.diff freetype/cleartype.diff
--- freetype.orig/cleartype.diff	1969-12-31 16:00:00.000000000 -0800
+++ freetype/cleartype.diff	2013-11-19 15:32:04.811346576 -0800
@@ -0,0 +1,12 @@
+diff -rupN freetype-2.5.0.1.orig/include/freetype/config/ftoption.h freetype-2.5.0.1/include/freetype/config/ftoption.h
+--- freetype-2.5.0.1.orig/include/freetype/config/ftoption.h	2013-06-19 14:20:04.000000000 -0700
++++ freetype-2.5.0.1/include/freetype/config/ftoption.h	2013-11-19 15:27:47.456737625 -0800
+@@ -591,7 +591,7 @@ FT_BEGIN_HEADER
+   /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */
+   /*   defined.                                                            */
+   /*                                                                       */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ 
+ 
+   /*************************************************************************/
diff -rupN freetype.orig/freetype.SlackBuild freetype/freetype.SlackBuild
--- freetype.orig/freetype.SlackBuild	2013-11-19 15:31:53.895891885 -0800
+++ freetype/freetype.SlackBuild	2013-11-19 15:33:17.885864416 -0800
@@ -78,7 +78,8 @@ zcat $CWD/freetype.illadvisederror.diff.
 # for doing so.
 # Please see this web site for more details:
 #   http://www.freetype.org/patents.html
-#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+patch -p1 --verbose < $CWD/cleartype.diff
 
 chown -R root:root .
 CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
Save it as freetype_cleartype.diff. Then download freetype and patch it:

Code:
bash-4.2$ lftp -c 'open http://slackware.osuosl.org ; mirror slackware-14.1/source/l/freetype'
bash-4.2$ cd freetype                                                 
bash-4.2$ patch -p1 < ../freetype_cleartype.diff 
patching file cleartype.diff
patching file freetype.SlackBuild
bash-4.2$
(Change the mirror directory if you need to: for example, if you're using 64-bit Slackware).

Then rebuild Freetype!

(In case anyone's wondering, all the patch does is uncomment two options in Freetype's source. The file is include/freetype/config/ftoption.h, and the two options are FT_CONFIG_OPTION_SUBPIXEL_RENDERING and TT_CONFIG_OPTION_SUBPIXEL_HINTING.)

Last edited by dugan; 11-20-2013 at 01:04 AM.
 
1 members found this post helpful.
Old 11-19-2013, 06:19 PM   #425
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,574

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
I have FreeType rebuilt with the above patch

I have the following in /etc/fonts/conf.d:
  • 10-sub-pixel-rgb.conf
  • 11-lcdfilter-default.conf

I have the following ~/.config/fontconfig/fonts.conf:

Code:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
	<match target="font">
		<edit mode="assign" name="antialias">
			<bool>true</bool>
		</edit>
		<edit mode="assign" name="hinting">
			<bool>true</bool>
		</edit>

		<edit mode="assign" name="hintstyle">
			<const>hintslight</const>
		</edit>

		<!-- Ignore any embedded bitmaps in TTF, etc (Microsoft's Calibri and others from Office 07/Vista have these) -->
		<edit mode="assign" name="embeddedbitmap">
			<bool>false</bool>
		</edit>

		<!-- MS fonts use full hinting -->

		<test name="family">
			<string>Andale Mono</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Arial Black</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Calibri</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Cambria</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Candara</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Comic Sans MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Consolas</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Constantia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Corbel</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Courier New</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Georgia</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Impact</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Symbol</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Tahoma</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Times New Roman</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Trebuchet MS</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Verdana</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Webdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
		<test name="family">
			<string>Wingdings</string>
		</test>
		<edit mode="assign" name="hintstyle">
			<const>hintfull</const>
		</edit>
	</match>
</fontconfig>
It's not Infinality, but it's good enough for me.
 
Old 11-21-2013, 05:01 AM   #426
GNU/Linux
Member
 
Registered: Sep 2012
Distribution: Slackware-14
Posts: 78

Rep: Reputation: Disabled
I'm gonna use them on Slackware 14.1, but can we see some screen shots please?
 
Old 11-21-2013, 11:53 AM   #427
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,574

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
Quote:
Originally Posted by GNU/Linux View Post
I'm gonna use them on Slackware 14.1, but can we see some screen shots please?
http://www.duganchen.ca/files/cleartype2.png
 
Old 11-26-2013, 09:18 AM   #428
GNU/Linux
Member
 
Registered: Sep 2012
Distribution: Slackware-14
Posts: 78

Rep: Reputation: Disabled
I get this as output after I run dugan's patch:

Code:
$ patch -p1 < ../freetype_cleartype.diff
patching file cleartype.diff
patching file freetype.SlackBuild
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 78 with fuzz 1.
 
Old 11-26-2013, 11:24 AM   #429
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,574

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
It definitely works for me.

Code:
# dugan at vbox in ~ [9:17:24]
$ lftp -c 'open http://slackware.osuosl.org ; mirror slackware-14.1/source/l/freetype'

# dugan at vbox in ~ [9:17:35]
$ cd freetype

# dugan at vbox in ~/freetype [9:17:46]
$ patch -p1 < ../freetype_cleartype.diff
patching file cleartype.diff
patching file freetype.SlackBuild
Works for me for Slackware64-14.1 too.

Code:
# dugan at vbox in ~ [9:18:35]
$ lftp -c 'open http://slackware.osuosl.org ; mirror slackware64-14.1/source/l/freetype'

# dugan at vbox in ~ [9:18:49]
$ cd freetype 

# dugan at vbox in ~/freetype [9:18:53]
$ patch -p1 < ../freetype_cleartype.diff
patching file cleartype.diff
patching file freetype.SlackBuild
And just so that there can be no confusion, I've made the patch available for download:

freetype_cleartype.diff

Last edited by dugan; 11-26-2013 at 11:30 AM. Reason: Added patch.
 
Old 11-26-2013, 09:01 PM   #430
spiritual_fraud
LQ Newbie
 
Registered: Mar 2013
Distribution: Slackware, Gentoo
Posts: 7

Rep: Reputation: Disabled
dugan,

Thanks for the hint, I've tried it and the fonts look very decent to me, thanks a lot!
 
Old 11-28-2013, 11:34 AM   #431
GNU/Linux
Member
 
Registered: Sep 2012
Distribution: Slackware-14
Posts: 78

Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
And just so that there can be no confusion, I've made the patch available for download:

freetype_cleartype.diff
Some text missing at the start of your diff, but we can always copy and paste from your earlier post. I've made the changes myself by:
  • enabling TT_CONFIG_OPTION_SUBPIXEL_HINTING in include/freetype/config/ftoption.h and
  • uncommenting zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1 in freetype.Slackbuild, and just recompiled.

I was very happy with Infinality (on 14.0), but on 14.1 fonts look much better. Now I know what changes I actually made. More power to the user. Thanks dugan for your hints .
 
Old 11-29-2013, 01:56 PM   #432
dias75
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
I have FreeType rebuilt with the above patch
It's not Infinality, but it's good enough for me.
And why you did not impose a patch on cairo ? Earlier you to patch it. The library сairo has changed?
 
Old 11-29-2013, 06:02 PM   #433
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,574

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
Quote:
Originally Posted by dias75 View Post
And why you did not impose a patch on cairo ? Earlier you to patch it. The library сairo has changed?
Even Infinality stopped patching Cairo years ago.
 
Old 12-13-2013, 02:48 PM   #434
ninikos
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Rep: Reputation: Disabled
Hi! I have updated the latest official infinality patches from here
http://www.infinality.net/blog/infin...etype-patches/
for slackaware-14.1 and it's freetype-2.5.0.1
and build freetype and fontconfig-infinality packages

Ready build packages (the freetype package is for x86_64 only, use the slackbuilds below for 32 bit)
freetype-2.5.0.1-x86_64-infinality20131213did.txz
EDIT: Since I don't know if it allowed to share this compiled
due to licensing, use the slackbuilds below to build freetytpe.
If it's ok, I can share the prebuild package again.
fontconfig-infinality-1-20130104_1-noarch-1did.txz

Download the two above packages and then
upgradepkg freetype-2.5.0.1-x86_64-infinality20131213did.txz
installpkg fontconfig-infinality-1-20130104_1-noarch-1did.txz
Reboot and enjoy infinality

The slackbuilds (all the required sources and patches are included)
infinality-sources.tar.gz

The updated infinality patch
freetype-entire-infinality-patchset-20131213-01.patch
(ttinterp.c) Removed all patches except one, all the rest seem to included upstream
(ttsubpix.c) Removed patches since the changes are included upstream
(ttsubpix.h) Removed patches since the changes are included upstream

Finally, an image showing the result
snapshot2.png

Last edited by ninikos; 12-13-2013 at 03:24 PM.
 
1 members found this post helpful.
Old 12-13-2013, 10:32 PM   #435
dxtrpn
LQ Newbie
 
Registered: Oct 2011
Location: New York
Distribution: Slackware64
Posts: 20

Rep: Reputation: Disabled
Hello ninikos, thank you for your post, the packages built and are working fine on my system.
 
  


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


All times are GMT -5. The time now is 09:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration