11

I use WingIDE for Python development and it runs under X Windows. The X11 font rendering is driving me crazy. Are there any tricks for getting better fonts in an X Server on MacOS / Lion? Sample image here. It's not so bad that I'd say it's broken, but the hinting, subpixel rendering, etc all just doesn't look nearly as nice in the X server as it does in MacOS native.

I've installed XQuartz 2.7.0 binaries by hand and didn't notice any improvement in font rendering. I also tried copying Menlo.ttc into my ~/.fonts directory to have a nicer font than the X windows fonts but it's clear the X font renderer just can't match MacOS native. This 2005 OpenOffice tips article recommends replacing libfreetype but it's a pretty awkward process I haven't tried given the age of the instructions.

2
  • 1
    I put a 100 point bounty on this question and didn't get a solid answer. I suspect the answer to my question is "no". The X11 community does work on improving font rendering (ie, for Ubuntu) and maybe their work could be used on a Mac as well.
    – Nelson
    Commented Jan 27, 2012 at 16:31
  • I am very interested about the subject, X11 apps on Mac are looking like ****. The only thing a found so far was wiki.archlinux.org/index.php/X_resources - but that's only a start point and not an answer.
    – sorin
    Commented Aug 14, 2013 at 9:41

5 Answers 5

6

Warning: this is not my final answer, it will take some time to provide a better one.

Tested on OS X 10.8.5 with XQuartz 2.7.4 (xorg-server 1.13.0) and:

  • meld - installed via brew install meld
  • xterm
  • xclock

To tune the fonts create a file ~/.Xresources and put this:

Xft.dpi:        96
Xft.antialias:  true
Xft.hinting:    true
Xft.autohint:   true
Xft.rgba:       rgb
Xft.hintstyle:  hintfull

XTerm*faceName: DejaVu Sans Mono
*faceName: DejaVu Sans Mono

Inside ~/.gtkrc-2.0:

style "user-font" {
    font_name = "Lucida Grande 10"
}
widget_class "*" style "user-font"

gtk-font-name="Lucida Grande 10"
gtk-enable-mnemonics = 0

Feel free to post your modifications, as long they are using standard Fonts available on OS X, I would like to make this drop-in recipe.

The last file has an effect on meld and other gtk apps.

Note, the font is the same as the one used in OS X UI but the rendering is still a little bit different.

3

It has been a long time since I've dealt with X11, so all I can contribute are general principals. But since no one else is posting...

From the Mac OS perspective, everything X11 does is just bitmaps. Mac OS never sees the fonts that X is displaying.

So what you really want is to improve the font rendering within X11 itself. This FAQ may help. You might do better in a more general unix forum.

2
  • 1
    Please summarize or excerpt the relevant parts of the article you linked to in the answer. The idea is to make the answer stand alone in case something happens to the linked page. Commented Jan 19, 2012 at 21:51
  • Thanks, I appreciate the attempt to help my poor question. You're probably right about needing a more general Unix forum; I should see the current state of Ubuntu rendering. BTW that linked FAQ is from 2002; things have improved considerably since then.
    – Nelson
    Commented Jan 21, 2012 at 19:54
3

Just ctrl+two-finger-click (mac book air) and you'll get a pop up menu that lets you change the font size.

0
1

The way I could improve it a little bit is by doing Ctrl & right-clicking anywhere on the XQuartz window and then selecting TrueType Fonts and a bigger size. It's still not perfect but I find it much more readable.

0

I encountered a similar situation, where I was forwarding X11 from an Ubuntu system to a Mac.

Thanks to sorin's answer, I was able to improve the font rendering a little. On my Ubuntu system, I ran:

xrdb -query -all

This resulted in the following output:

*customization: -color
Xcursor.size:   24
Xcursor.theme:  DMZ-White
Xft.antialias:  1
Xft.dpi:    96
Xft.hinting:    1
Xft.hintstyle:  hintslight
Xft.rgba:   rgb

I then took that output and created a ~/.Xresources file on the Mac, using as its contents the above output of xrdb -query -all. Then, on the Mac, I ran:

xrdb ~/.Xresources

... which I understood should cause the settings to take effect in the current X server. Subsequently, the font rendering seemed better, though it still isn't perfect.

If it matters, I also installed the Ubuntu fonts on the Mac.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .