diff options
author | Jeremy Huddleston <jeremy@yuffie.local> | 2008-02-01 00:35:27 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@yuffie.local> | 2008-02-01 00:35:27 -0800 |
commit | 6403e53a1fef9fd7dd8c77640d01bb8aaee09f91 (patch) | |
tree | 9249e408641665d3b4efa9662cabef5a76a1f5e9 /xinitrc.cpp | |
parent | d9d43955a03fb3d5b2d87d9c1a7de463f1a027b6 (diff) |
OS-X: Set fontpath in xinitrc to include system / user fonts. Additionally fixed font scaling issues (trac #52)
Diffstat (limited to 'xinitrc.cpp')
-rw-r--r-- | xinitrc.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xinitrc.cpp b/xinitrc.cpp index c24bcd0..e01b9e7 100644 --- a/xinitrc.cpp +++ b/xinitrc.cpp @@ -70,7 +70,27 @@ XCOMM This is the fallback case if nothing else is executed above #endif /* !defined(__SCO__) && !defined(__UNIXWARE__) */ #ifdef __APPLE__ + +if [ -x /usr/X11/bin/xset ] ; then + fontpath="/usr/X11/lib/X11/fonts/misc/,/usr/X11/lib/X11/fonts/TTF/,/usr/X11/lib/X11/fonts/OTF,/usr/X11/lib/X11/fonts/Type1/,/usr/X11/lib/X11/fonts/75dpi:unscaled/,/usr/X11/lib/X11/fonts/100dpi/:unscaled,/usr/X11/lib/X11/fonts/75dpi:unscaled/,/usr/X11/lib/X11/fonts/100dpi/:unscaled" + + if [ -d "$HOME/Library/Fonts" ] ; then + if [ ! -e $HOME/Library/Fonts/fonts.dir ] ; then + [ -x /usr/X11/bin/mkfontdir ] && mkfontdir $HOME/Library/Fonts + [ -x /usr/X11/bin/mkfontscale ] && mkfontscale $HOME/Library/Fonts + fi + [ -e $HOME/Library/Fonts/fonts.dir ] && fontpath="$fontpath,$HOME/Library/Fonts" + fi + + [ -e /Library/Fonts/fonts.dir ] && fontpath="$fontpath,/Library/Fonts" + [ -e /System/Library/Fonts/fonts.dir ] && fontpath="$fontpath,/System/Library/Fonts" + + /usr/X11/bin/xset fp= "$fontpath" + unset fontpath +fi + [ -x /usr/bin/quartz-wm ] && exec /usr/bin/quartz-wm + #endif TWM & |