
05-25-2012, 03:46 PM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Subpixel font antialiasing / hinting / smoothing / rendering? (especially in PBIs)
Hi all!
First of all, I'm LOVING PC-BSD 9. It's great, and has been serving me very well for many months now.
My first observation when using PC-BSD was that subpixel (or sub-pixel) font antialiasing was not available. I ended up patching several packages manually as described in the following thread:
http://forums.freebsd.org/showpost.p...9&postcount=10
However, I've noticed that many PBI packages don't support subpixel hinting and smoothing. Is there some way to enable this for PBIs that I love and adore (e.g. Chromium?)
Thank you!
-Jeff
|
|

05-30-2012, 02:57 PM
|
 |
Administrator
|
|
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,428
Thanks: 0
Thanked 103 Times in 85 Posts
|
|
Subpixel font antialiasing / hinting / smoothing / rendering? (especially in PBIs)
Looking at that post, did you do the same and rebuild some of the cairo
/ freetype stuff on the system? I may have to put those patches into our
PBI builds, so that they get built with the better font support. I'll
try this out and report back
__________________
----
Kris Moore
PC-BSD Founder
|
|

05-30-2012, 04:26 PM
|
 |
Administrator
|
|
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,428
Thanks: 0
Thanked 103 Times in 85 Posts
|
|
Subpixel font antialiasing / hinting / smoothing / rendering? (especially in PBIs)
Ok, so I've done some testing on this, and so far it seems that changing
the packages doesn't do anything. Rather if you just take a system, and
change /usr/local/etc/fonts/local.conf to this:
<?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>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</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>
It then starts applying the new settings to all applications, PBI's
included.
If some of you want to test this out, let me know if you prefer the way
fonts look with, or without this change to local.conf.
__________________
----
Kris Moore
PC-BSD Founder
|
|

01-04-2013, 03:34 AM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
|
Hi Kris!
Sorry I am so late in responding to this message. I appreciate your efforts to improve anti-alising. I actually did apply many patches to my ports tree and slowly started creeping away from PC-BSD PBIs and into FreeBSD ports. However, with 9.1 out the door, I'm definitely going to try modifying local.conf as you have suggested.
|
|

01-04-2013, 11:22 AM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
I upgraded to FreeBSD 9.1, and verified that it ships with /usr/local/etc/fonts/local.conf as you have described above. Only my window manager, Fluxbox, is subpixel antialiased...
I've also verified that
/usr/pbi/chromium-amd64/etc/fonts/local.conf is the same as above.
I've tested Firefox, Chromium, and Inkscape, and none of these packages have subpixel enabled.
I also have my ~/.fonts.conf set to the above.
In my earlier hacking, I patched only FreeType because the Cairo patches didn't apply cleanly. Patching FreeType was sufficient to get the LCD filtering working for most everything. However, programs that relied on Cairo for rasterizing vector graphics (e.g. evince) did not perform LCD filtering without the Cairo patches, and I was too lazy to finish off Cairo.
I would imagine that there are some much newer Cairo patches that could be pulled over from the Ubuntu project.
I'm going to experiment with anti-aliasing within Warden because, thanks to PC-BSD, I know much more now than I did in back in May about both FreeBSD and how PBIs work.
:-)
|
|

01-04-2013, 11:51 AM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
I think that a "simple" fix to this problem is just to make Freetype with WITH_LCD_FILTERING defined; e.g.
make -DWITH_LCD_FILTERING deinstall reinstall
and then rebuild every PBI that depends on FreeType...
By the way, FreeType 2 has LCD filtering disabled by default due to patent encumbrances in the land of the free, home of the brave (United States).
http://david.freetype.org/cleartype-patents.html
|
|

01-04-2013, 11:29 PM
|
|
Senior Member
|
|
Join Date: Jun 2012
Posts: 325
Thanks: 20
Thanked 28 Times in 27 Posts
|
|
Originally Posted by baitisj
|
I think that a "simple" fix to this problem is just to make Freetype with WITH_LCD_FILTERING defined; e.g.
make -DWITH_LCD_FILTERING deinstall reinstall
and then rebuild every PBI that depends on FreeType...
By the way, FreeType 2 has LCD filtering disabled by default due to patent encumbrances in the land of the free, home of the brave (United States).
http://david.freetype.org/cleartype-patents.html
|
Why not allow the user to choose the best font rendering when installing PC-BSD? Given that LCD filtering is disabled by default, the user can just enable it and see which combination of settings looks best.
Much more productive than staring at installation progress bars.
|
|

01-05-2013, 05:52 AM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
|
Hi David:
The issue is that the FreeType library that every PBI is compiled against is effectively lacking the code that performs LCD filtering. In order to allow users the ability to choose this option, the code must be included in the FreeType library object...
-DWITH_LCD_FILTERING enables the patent-encumbered code, compiles it, and places it in the FreeType library. The end-user will then be able to tailor his or her font rendering options (through modifying /usr/local/etc/fonts/local.conf, ~/.fonts.conf, or other means).
I should mention that, according to FreeType documentation, modifying fonts/local.conf is deprecated in favor of symlinking the appropriate configuration options in fonts/conf.avail to fonts/conf.d.
|
|

01-05-2013, 07:14 PM
|
|
Senior Member
|
|
Join Date: Jun 2012
Posts: 325
Thanks: 20
Thanked 28 Times in 27 Posts
|
|
Originally Posted by baitisj
|
Hi David:
The issue is that the FreeType library that every PBI is compiled against is effectively lacking the code that performs LCD filtering. In order to allow users the ability to choose this option, the code must be included in the FreeType library object...
-DWITH_LCD_FILTERING enables the patent-encumbered code, compiles it, and places it in the FreeType library. The end-user will then be able to tailor his or her font rendering options (through modifying /usr/local/etc/fonts/local.conf, ~/.fonts.conf, or other means).
I should mention that, according to FreeType documentation, modifying fonts/local.conf is deprecated in favor of symlinking the appropriate configuration options in fonts/conf.avail to fonts/conf.d.
|
My question is: could there be a GUI option at install time (when installing PC-BSD) to enable the correct font smoothing? The options already exist in the Control Panel, but the font rendering is a little bit blurry, even with LCD subpixel smoothing enabled, but still good.
|
|

01-05-2013, 08:02 PM
|
|
Junior Member
|
|
Join Date: Apr 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Originally Posted by David30
|
|
My question is: could there be a GUI option at install time (when installing PC-BSD) to enable the correct font smoothing? The options already exist in the Control Panel, but the font rendering is a little bit blurry, even with LCD subpixel smoothing enabled, but still good.
|
David, maybe I'm thick, but I'm not seeing the option that you are describing in the Control Panel... maybe I don't have the correct PBIs installed? Could you include a screen shot? Is LCD filtering working for your Firefox / Chrome browser? (It's not working on mine.)
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 09:59 AM.
|
|