You are not logged in.

#1 2007-12-21 01:18:11

baklava
Member
Registered: 2007-09-07
Posts: 22

OSX font rendering

I'm really used to working with how Mac renders fonts, and Linux fonts look a little different...Is there any way I can get the fonts to look as they do in OSX?

Last edited by baklava (2007-12-21 02:24:08)

Offline

#2 2007-12-21 02:08:50

sebleblanc
Member
From: Montréal, Canada
Registered: 2007-12-21
Posts: 41

Re: OSX font rendering

I seriously don't think it's possible to do that kind of things, sorry.

Offline

#3 2007-12-21 07:53:06

stylopath
Member
Registered: 2007-07-26
Posts: 112

Re: OSX font rendering

if u use subpixel-hinting try the packages libxft-lcd and cairo-lcd

Offline

#4 2007-12-21 14:44:07

fabio
Member
From: Switzerland
Registered: 2007-11-23
Posts: 10

Re: OSX font rendering

After having done this I cannot see Windows fonts anymore. Gnome kicks ass this way wink

----------------------------------

Taken originally from http://www.ech0s7.netsons.org/index.php/archives/16 and translated:

Everything as root:

Remove some packages:
- pacman -Rd cairo libxft freetype2

Install the *-lcd libraries:
- pacman -S cairo-lcd libxft-lcd

Install the package freetype2-lcd downloaded from AUR and compiled with "makepkg":
- pacman -U /full/path/freetype2-lcd-*.pkg.tar.gz

Reset your font configuration:
- rm /etc/fonts/conf.d/*
- pacman -S fontconfig

Set the FreeType autohinter :
- ln -s /etc/fonts/conf.avail/10-autohint.conf /etc/fonts/conf.d/10-autohint.conf

Restart X11/Gnome (ctrl+alt+backspace)

At this point if you think fonts look too bold, modify the fonts configuration file: edit (or create if it doesn't exist yet) the file ~/.fonts.conf with the following content:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- If the font is bold, turn off autohinting -->
<match target="font" >
<test compare="more" name="weight">
<const>medium</const>
</test>
<edit mode="assign" name="autohint">
<bool>false</bool>
</edit>
</match>
</fontconfig>

Last edited by fabio (2007-12-21 14:45:12)

Offline

#5 2007-12-21 17:23:09

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: OSX font rendering

There's a font thread somewhere here..

Personally, using the above rendering method, I fail to see how GNU fonts are any worse than that of Mac and Windows. Windows XP's default non-cleartype fonts look like literal crap. Now I just love this font rendering, nothing like on any other platform. I used the Gentoo wiki suggestion for LCDs, copy-pasted and tada!

Last edited by schivmeister (2007-12-21 17:28:20)


I need real, proper pen and paper for this.

Offline

#6 2007-12-21 22:51:49

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: OSX font rendering

Didn't know about these lcd optimized packages ! Subpixel Hinting is nice but with those fonts really look awsome.

Offline

#7 2007-12-22 01:01:24

baklava
Member
Registered: 2007-09-07
Posts: 22

Re: OSX font rendering

That makes my fonts look a whole hell of a lot better. Thanks! smile

Offline

#8 2007-12-22 20:37:06

marte
Member
Registered: 2007-09-26
Posts: 24

Re: OSX font rendering

(just saying)
i've read somewhere that there are legal issues (patents, or something like it) with the font rendering software that apple developed, so there is no way to use the exact same stuff.
but i've also read that the freetype guys done a reverse engineering with the apple's system and are getting better and better results.

this kind of info and tips on how improve font rendering can be find on arch's wiki, gentoo site, and related links.

Offline

#9 2007-12-25 13:36:00

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: OSX font rendering

Those LCD packages are already a lot better than apples font renderer.

Offline

#10 2007-12-28 10:04:35

Martyr
Member
From: Out there
Registered: 2006-10-04
Posts: 103
Website

Re: OSX font rendering

Freetype2-lcd won't build here:

==> Starting build()...
PKGBUILD: line 27:  9541 Segmentation fault      patch -Np0 -i ${startdir}/src/bytecode.patch

Offline

#11 2007-12-31 11:42:45

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: OSX font rendering

segmentation fault is a system fault smile

attend to it, probably needs a reinstall of a particular package.

reinstall font-related packages, as well as hal. see if fc-cache reports a segfault too. in this case pay attention to path & the patch file.


I need real, proper pen and paper for this.

Offline

#12 2008-01-01 23:03:56

Martyr
Member
From: Out there
Registered: 2006-10-04
Posts: 103
Website

Re: OSX font rendering

Hal was the culprit. Fonts look *great* now. Thank you.

Offline

#13 2008-01-02 09:01:14

freigeist
Member
From: Cologne, Germany
Registered: 2006-07-14
Posts: 191

Re: OSX font rendering

I always read threads like this with interest, but every time I try those LCD font enhancements I go back to my old libraries after a few minutes. I don't really understand what should be better using these libraries...in my eyes fonts with these enhancements are way too bold, unsharp and have minor red and blue borders. I use Gnome's full subpixel smoothing and I prefer it over Mac OSX and Windows XP on my digital connected EIZO 20" TFT. Maybe these libraries just work better on analog connected LCDs?


Elfenbeinturm.cc
a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

Offline

#14 2008-01-02 10:22:21

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: OSX font rendering

It's not gnome, it's *cairo*. See the cairo packages in AUR.

There's no reason to be unhappy with fonts anymore - there's loads of choice, with different patchsets, and ~/.fonts.conf - the keyword here is *customization*.

cairo-ubuntu gives the choice of:  lcdfilternone, lcdfilterdefault, lcdfilterlight, lcdfilterlegacy.

Offline

#15 2008-01-02 15:30:46

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 559

Re: OSX font rendering

The last time I posted in a thread about this, I said that I preferred the Freetype patches rather than *-lcd, largely for the reasons Freigeist gives: boldness and colour fringing. But either I was doing something wrong or the *-lcd patches have come on leaps and bounds in the last few months. I just tried them again out of curiosity, and they look fantastic: much the same as Freetype at large-ish sizes, and way, way better at small ones.

My 19" LCD is digitally connected by the way, but I think these smoothing algorithms are really a matter of taste. Until I found Freetype and now the current LCD, I preferred simple anti-aliasing without subpixels, even on an LCD monitor.


0 Ok, 0:1

Offline

#16 2008-01-02 15:38:50

freigeist
Member
From: Cologne, Germany
Registered: 2006-07-14
Posts: 191

Re: OSX font rendering

dunc wrote:

The last time I posted in a thread about this, I said that I preferred the Freetype patches rather than *-lcd, largely for the reasons Freigeist gives: boldness and colour fringing. But either I was doing something wrong or the *-lcd patches have come on leaps and bounds in the last few months. I just tried them again out of curiosity, and they look fantastic: much the same as Freetype at large-ish sizes, and way, way better at small ones.

My 19" LCD is digitally connected by the way, but I think these smoothing algorithms are really a matter of taste. Until I found Freetype and now the current LCD, I preferred simple anti-aliasing without subpixels, even on an LCD monitor.

Could you post or send me a screenshot? Maybe I am doing something wrong too...


Elfenbeinturm.cc
a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

Offline

#17 2008-01-02 16:55:45

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: OSX font rendering

Linux, when you set it up right, can make fonts lookvery pretty.  I went into Windows on my dualboot system to do some Windows-exclusive stuff yesterday and one of the first things I noticed was the fonts.  Gross!  The pixelation and subpixel hinting is terrible.  Looks like I'm looking through a plastic bag over the screen.  This is with Cleartype on too.

It's all about the little things smile

Offline

#18 2008-01-03 16:11:16

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: OSX font rendering

autohintai6.th.png Probably not the best but i love it this way smile


I need real, proper pen and paper for this.

Offline

#19 2008-01-04 01:41:46

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 559

Re: OSX font rendering

lcd.png
As I said, it's largely a matter of taste. It's up to you whether you consider this to be too blurry or not. But I like it. smile

Another thing I forgot to mention is that -lcd seems to be better at handling light text on dark backgrounds - such as my window titles - than Cleartype (I think I said Freetype; you know what I meant tongue ).

Last edited by dunc (2008-01-04 02:11:49)


0 Ok, 0:1

Offline

#20 2008-01-04 03:26:01

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: OSX font rendering

I tried the tweaks posted above in this thread, and I think my fonts look better. I'm using kdemod. For some reason though, Firefox menu fonts are bigger than everything else, all else renders normally. Actually all gnome software fonts are bigger than they should be, in KDE. I guess I'll have to look at the gnome settings.

There is one thing I don't understand though. Many people force their DPI in xorg.conf to 96 or 120. Why is this? Isn't DPI there to make fonts look the same on every monitor? So if you (like me) have an LCD monitor such as 22" wide, 1680x1050, which has 474x298mm visible monitor area (which translates to 90x88 DPI), shouldn't you use 90x88 DPI (which the nvidia driver picks up from DDC anyway), since that is the actual physical resolution of the monitor? Why should I use a higher DPI? smile

Edit, screenshot:

fonts.png

If above doesn't work try:

120673fonts.png

Last edited by Fackamato (2008-01-04 03:30:27)

Offline

#21 2008-01-04 06:44:01

xxsashixx
Member
Registered: 2007-12-11
Posts: 53

Re: OSX font rendering

Thanks for this but.. in pastebin.com the pastes look like crap yet in pastebin.ca it looks fine, probably they are different.. anyways heres screenshots

200801031042011280x1024hl1.th.png

200801031042021280x1024jl5.th.png

As you can see pastebin.ca is fine but how do i fix pastebin.com?

Last edited by xxsashixx (2008-01-04 06:44:27)

Offline

#22 2008-01-04 07:33:41

freigeist
Member
From: Cologne, Germany
Registered: 2006-07-14
Posts: 191

Re: OSX font rendering

dunc wrote:

http://www.dss.talktalk.net/lcd.png
As I said, it's largely a matter of taste. It's up to you whether you consider this to be too blurry or not. But I like it. smile

Another thing I forgot to mention is that -lcd seems to be better at handling light text on dark backgrounds - such as my window titles - than Cleartype (I think I said Freetype; you know what I meant tongue ).

Thanks Dunc, the image exactly shows what I don't like on the lcd patches, for me they are way too bold and I am bothered by the blue and red borders around the characters...I think I should stay with the defaults smile


Elfenbeinturm.cc
a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

Offline

#23 2008-01-04 18:56:19

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: OSX font rendering

Dunc, those are nice fonts. Not too fat, not too thin, perfect in a sense. Mind sharing your configs? big_smile And, doesn't the autohinter have more to do with the nice rendering than the patches? We couldn't achieve that with BCI now could we?

Freigeist, I have noticed different LCD monitors rendering fonts differently. I have an OEM LCD from Acer and the fonts aren't very nice with the blue and red borders being a pain in the eyes. On the contrary, my other newer LCDs render fonts nicely, especially my laptop's but the red/blue highlights can still be seen in some places.


I need real, proper pen and paper for this.

Offline

#24 2008-01-04 21:01:35

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 559

Re: OSX font rendering

schivmeister wrote:

Dunc, those are nice fonts. Not too fat, not too thin, perfect in a sense. Mind sharing your configs? big_smile And, doesn't the autohinter have more to do with the nice rendering than the patches? We couldn't achieve that with BCI now could we?

Could be. I've never liked BCI, that's for sure. But -lcd is definitely better than "vanilla" and, as I said, marginally better than Cleartype, especially at small sizes and light-on-dark.

/etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>
    <match target="pattern">
        <edit name="dpi" mode="assign"><double>86</double></edit>
    </match>
    <match target="font">
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="rgba" mode="assign">
            <const>rgb</const>
        </edit>    
        <edit name="antialias" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hinting" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintfull</const>
        </edit>
    </match>
</fontconfig>

86 dpi is correct for my monitor (19" 1280x1024). I think it's really worth figuring this out for yourself if it's not automatically detected. With LCD panels, where the display fits the screen exactly and is perfectly flat,  it's not that difficult.

I know some people recommend medium hinting rather than full, but I don't like half measures. wink Another common recommendation is to reduce (or turn off) hinting on bold weights, and I can see the point in that: I'm not entirely happy with the way bold fonts are rendered. But it's acceptable. I've seen worse.

The font is Lucidia Grande. (MS core fonts? I can't remember.) It seems to work better with the -lcd patches than the similar Luxi Sans, which I preferred under Cleartype and without subpixel hinting. There's not much in it, though; they're both nice.

Freigeist, I have noticed different LCD monitors rendering fonts differently. I have an OEM LCD from Acer and the fonts aren't very nice with the blue and red borders being a pain in the eyes. On the contrary, my other newer LCDs render fonts nicely, especially my laptop's but the red/blue highlights can still be seen in some places.

That makes sense, actually. I didn't like the coloured borders with other subpixel patches, but I really don't see them at all with my current setup. It could just be that I'm getting used to it, but some of the other screenshots posted here still look pretty awful to me.


0 Ok, 0:1

Offline

#25 2008-01-06 09:25:38

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: OSX font rendering

Great! Now I'm going to see how that turns out. Never really gave a thought on DPI, 96 always. And currently it seems I have medium hinting. Hmm..

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- Replace Courier with a better-looking font -->
    <match target="pattern" name="family">
        <test name="family" qual="any">
            <string>Courier</string>
        </test>
        <edit name="family" mode="assign">
            <!-- Other choices - Courier New, Luxi Mono -->
            <string>Bitstream Vera Sans Mono</string>
        </edit>
    </match>

    <match target="font">
        <edit name="rgba" mode="assign">
            <const>rgb</const>
        </edit>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="antialias" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hinting" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintmedium</const>
        </edit>
    </match>

    <!-- Disable autohint 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>

    <!-- Reject bitmap fonts in favour of Truetype, Postscript, etc. -->
    <selectfont>
        <rejectfont>
            <pattern>
                <patelt name="scalable">
                    <bool>false</bool>
                </patelt>
            </pattern>
        </rejectfont>
    </selectfont>

</fontconfig>

Stolen from Gentoo wiki big_smile


I need real, proper pen and paper for this.

Offline

Board footer

Powered by FluxBB