Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO]Freetype subpixel font rendering - lcd monitors Pt 2
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 27, 28, 29  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Fri Feb 27, 2009 5:25 pm    Post subject: Reply with quote

I've already joined the devnull team. All the ebuild of the lcd-filtering overlay are in devnull testing.
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Fri Feb 27, 2009 5:33 pm    Post subject: Reply with quote

But there is no cairo-respect-fontconfig.patch in devnull. And in fact no cairo ebuild at all.
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Fri Feb 27, 2009 5:45 pm    Post subject: Reply with quote

I didn't say they are in devnull, I said they are devnull testing.
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Fri Feb 27, 2009 5:51 pm    Post subject: Reply with quote

Thanks for clarification! And how can I add devnull testing overlay?
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Fri Feb 27, 2009 8:52 pm    Post subject: Reply with quote

No need for. I have updated the devnull overlay.

We do now have all font ebuilds with cleartype AND ubuntu patches/useflags.
No useflag is defaulted. Both useflags can't be active the same time.

Thanks to bi3l for his great work. Enjoy :)
Back to top
View user's profile Send private message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Sat Feb 28, 2009 6:15 am    Post subject: Reply with quote

ocin wrote:
No need for. I have updated the devnull overlay.

We do now have all font ebuilds with cleartype AND ubuntu patches/useflags.
No useflag is defaulted. Both useflags can't be active the same time.

Thanks to bi3l for his great work. Enjoy :)


That's great. Many thanks. :D

BTW: The first part of this patch causes a huge improvement in pdf rendering here (I'm using the »cleartype« useflag) .
( I've changed »cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_SLIGHT);« to
»cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE);« because it looks better to me).
_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sat Feb 28, 2009 2:47 pm    Post subject: Reply with quote

octoploid wrote:
BTW: The first part of this patch causes a huge improvement in pdf rendering here (I'm using the »cleartype« useflag) .
( I've changed »cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_SLIGHT);« to
»cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE);« because it looks better to me).

I've tried this patch but don't see any improvement. Can you mail me (billl at users.sourceforge.net) a pdf which is better rendered with the patch ?
Back to top
View user's profile Send private message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Sat Feb 28, 2009 3:24 pm    Post subject: Reply with quote

bi3l wrote:
octoploid wrote:
BTW: The first part of this patch causes a huge improvement in pdf rendering here (I'm using the »cleartype« useflag) .
( I've changed »cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_SLIGHT);« to
»cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE);« because it looks better to me).

I've tried this patch but don't see any improvement. Can you mail me (billl at users.sourceforge.net) a pdf which is better rendered with the patch ?


Every pdf I've tested is rendered better with this patch... ;-)
It's the difference between grayscale- (the default in evince) and subpixel- rendering,
which this patch enables.
(Try these for example: http://arxiv.org/list/gr-qc/new )

BTW I get color fringes when I use this patch with the "ubuntu" USE flag. No problems with "cleartype".
_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Sat Feb 28, 2009 4:15 pm    Post subject: Reply with quote

Could you briefly explain technical differences of ubuntu and cleartype?
Back to top
View user's profile Send private message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Sat Feb 28, 2009 4:26 pm    Post subject: Reply with quote

ssmaxss wrote:
Could you briefly explain technical differences of ubuntu and cleartype?


Upper left: cleartype. Lower right: ubuntu.
http://www.mypicx.com/uploadimg/1318101625_02282009_1.png

As you'll see, ubuntu has a little bit more contrast.
_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
GoofyX
n00b
n00b


Joined: 23 Feb 2005
Posts: 51
Location: Thessaloniki, Greece

PostPosted: Sat Feb 28, 2009 4:28 pm    Post subject: Reply with quote

Cleartype works fine for me. :)
_________________
... Morpheus: What is "real"? How do you define "real"? If you 're talking about what you can feel, what you can smell, what you can taste and see, then "real" is simply electrical signals interpreted by your brain...
Back to top
View user's profile Send private message
ssmaxss
Apprentice
Apprentice


Joined: 28 Jun 2005
Posts: 160
Location: Moscow, Russia.

PostPosted: Sat Feb 28, 2009 4:34 pm    Post subject: Reply with quote

octoploid wrote:

Upper left: cleartype. Lower right: ubuntu.

Thanks! But why cleartype was chosen for portage (cairo in portage has cleartype patches and USE flag)?
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 75
Location: Weare, NH

PostPosted: Sun Mar 01, 2009 2:58 am    Post subject: Reply with quote

ssmaxss wrote:
What's the point in supporting two similar overlays? AFAIR you were offered commit access to devnull overlay. Maybe you should join efforts with devnull overlay?

I personally appreciate having the lcd-filter overlay, so I don't have the huge number of overridden packages that devnull would contribute. Portage really needs an ability to mask and unmask packages based on which overlay they're coming from.
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Sun Mar 01, 2009 3:52 am    Post subject: Reply with quote

mwhitlock wrote:
ssmaxss wrote:
What's the point in supporting two similar overlays? AFAIR you were offered commit access to devnull overlay. Maybe you should join efforts with devnull overlay?

I personally appreciate having the lcd-filter overlay, so I don't have the huge number of overridden packages that devnull would contribute. Portage really needs an ability to mask and unmask packages based on which overlay they're coming from.

If you are afraid about the -9999 ebuilds, they're all hardmasked ;)
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 382
Location: England

PostPosted: Sun Mar 01, 2009 3:23 pm    Post subject: Reply with quote

I get colour fringes in general with "ubuntu". But then again, I use the 'slight' hinting option, "ubuntu" is designed for well hinted fonts. Poppler disables font hinting totally -- hence why you'll get colour fringes with it. "cleartype" handles non/slight hinting a *lot* better.

Regards, Freddie.
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 382
Location: England

PostPosted: Tue Mar 03, 2009 4:20 pm    Post subject: Reply with quote

Hi all,

I have been poking around the Qt bug tracker: http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=242644

Since Qt was compiled with the raster backend (and because 4.5.0 is not yet in portage) I was not getting any subpixel hinting.

Alls well ends well.

Regards, Freddie.
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Wed Mar 04, 2009 11:20 am    Post subject: Reply with quote

Hello,
I have a HP LP2275W LCD monitor. I use fontconfig/cairo/freetype/libXft with cleartype flag and RGB subpixel enabled. Almost everything looks great, but in some apps black font on white background looks too green. For example in gedit font looks OK, but same font rendered in gnome-terminal looks strange (http://images40.fotosik.pl/71/1f7a26d325440b56.png).
_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
ahmedre
n00b
n00b


Joined: 28 Apr 2005
Posts: 34

PostPosted: Mon Mar 09, 2009 2:38 am    Post subject: Reply with quote

thanks for the great work - my fonts look great!

just one question, however - is there a resolution for the problem of fonts being too bold (facebook's home page, yahoo mail, etc)? i tried doing this:

Code:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <!-- Disable hinting for bold fonts -->
 <match target="font" >
  <test compare="more" name="weight" >
   <const>medium</const>
  </test>
  <edit mode="assign" name="autohint" >
   <bool>false</bool>
  </edit>
 </match>
</fontconfig>


and enabling user config, but it doesn't make much of a difference. bold fonts look awesome throughout, it's just a handful of webpages (facebook isn't too bad even, it's just yahoo mail not being able to know what messages are new versus which are read).

thanks!
Back to top
View user's profile Send private message
justinkb
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 160

PostPosted: Mon Mar 09, 2009 11:13 am    Post subject: Reply with quote

i have it set up so it doesn't autohint bold fonts, as follows. instead of definining it locally make it global by making a new file in /etc/fonts/conf.avail/

Code:

paul@s021765 ~ $ cat /etc/fonts/conf.avail/99-disable-hinting-on-bold-fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Disable hinting for bold fonts -->
<match target="font">
    <test name="weight" compare="more">
        <const>medium</const>
    </test>
    <edit name="autohint" mode="assign">
        <bool>false</bool>
    </edit>
</match>

</fontconfig>


now all you have to do is (as root), eselect fontconfig enable ... with whatever number the file has.

i don't quite get why your version won't work (the xml file seems identical) but this should definitely.
Back to top
View user's profile Send private message
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 382
Location: England

PostPosted: Wed Mar 11, 2009 2:01 pm    Post subject: Reply with quote

Any news on the poppler patches for either the devnull overlay or lcd-filtering. Be interesting to toy with them.

Regards, Freddie.
Back to top
View user's profile Send private message
mwhitlock
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2006
Posts: 75
Location: Weare, NH

PostPosted: Sun Mar 15, 2009 9:13 am    Post subject: Reply with quote

media-libs/freetype-2.3.9 appears to compile with the cleartype patches with just a simple rename of the 2.3.8 ebuild.
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Sun Mar 15, 2009 2:42 pm    Post subject: Reply with quote

mwhitlock wrote:
media-libs/freetype-2.3.9 appears to compile with the cleartype patches with just a simple rename of the 2.3.8 ebuild.

Anyone has tested the ubuntu useflag?
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sun Mar 15, 2009 3:12 pm    Post subject: Reply with quote

Yup. It compiles cleanly but I haven't restarted X yet.
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Sun Mar 15, 2009 6:17 pm    Post subject: Reply with quote

bi3l wrote:
Yup. It compiles cleanly but I haven't restarted X yet.

Okay, tell me wheter it works and if it does, I'll add it to devnull (or you can do it if you want).
Back to top
View user's profile Send private message
cybersol
n00b
n00b


Joined: 31 Oct 2008
Posts: 9

PostPosted: Mon Mar 16, 2009 9:32 pm    Post subject: Switched over to devnull with the cleartype use flags Reply with quote

First of all, a shout of thanks goes out to both ocin and bi3l for their efforts. I have been using this patchset lineage since xeffects and newspr, but was manually updating it after xeffects left. I have now started using the devnull overlay.

I now have things working the way I want. I found that cleartype was softer with less color fringing with my setup, so I am using it instead of ubuntu. Here is my full config in case it will help anyone:

Added devnull overlay
Code:
layman -a devnull

Added cleartype use flag to /etc/make.conf

Masked the new freetype in portage until it lands in devnull
/etc/portage/package.mask
Code:
>=media-libs/freetype-2.3.9

Enable byte-code interpreter and disable sse2 in pixman because I use the stable gcc 4.1.x
/etc/portage/package.use
Code:
media-libs/freetype -bindist
x11-libs/pixman -sse2

Unmask the testing versions of the packages
/etc/portage/package.keywords
Code:
x11-libs/cairo
x11-libs/libXft
media-libs/fontconfig
media-libs/freetype
x11-libs/pixman

eselect fontconfig list
Code:
Available fontconfig .conf files ( * is enabled ):
  [1]   10-antialias.conf *
  [2]   10-autohint.conf
  [3]   10-hinting-full.conf *
  [4]   10-hinting-medium.conf
  [5]   10-hinting-slight.conf
  [6]   10-hinting.conf *
  [7]   10-no-sub-pixel.conf
  [8]   10-sub-pixel-bgr.conf
  [9]   10-sub-pixel-rgb.conf *
  [10]  10-sub-pixel-vbgr.conf
  [11]  10-sub-pixel-vrgb.conf
  [12]  10-unhinted.conf
  [13]  20-fix-globaladvance.conf *
  [14]  20-unhint-small-vera.conf *
  [15]  25-unhint-nonlatin.conf
  [16]  30-metric-aliases.conf *
  [17]  30-urw-aliases.conf *
  [18]  40-nonlatin.conf *
  [19]  45-latin.conf *
  [20]  49-sansserif.conf *
  [21]  50-user.conf *
  [22]  51-local.conf *
  [23]  60-latin.conf *
  [24]  65-fonts-persian.conf *
  [25]  65-khmer.conf
  [26]  65-nonlatin.conf *
  [27]  69-unifont.conf *
  [28]  70-no-bitmaps.conf *
  [29]  70-yes-bitmaps.conf
  [30]  80-delicious.conf *
  [31]  90-synthetic.conf *

Set DPI for my monitor and ensure autohinting is off
/etc/fonts/local.conf
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>

    <match target="font">
        <!-- Turn off Autohinter to use Byte Code Interpreter -->
        <edit name="autohint" mode="assign"><bool>false</bool></edit>
    </match>

    <!-- Set dpi -->
    <match target="pattern">
        <edit name="dpi" mode="assign"><double>85</double></edit>
    </match>

</fontconfig>

And my matching Xresources
~/.Xresources
Code:
Xft.autohint: false
Xft.hintstyle:  hintfull
Xft.hinting: true
Xft.antialias: true
Xft.rgba:  rgb
Xft.dpi: 85


I restarted X here, and it looks beautiful again. You can check that the Xresource changes are working with
Code:
xrdb -query | grep -i xft


Cheers,
cybersol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 27, 28, 29  Next
Page 6 of 29

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum