FreeBSD: scan /usr/local/lib/X11/fonts/ for fontpath
authorMarcin Cieslak <saper@saper.info>
Thu, 23 Aug 2012 14:40:37 +0000 (16:40 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 24 Aug 2012 01:56:34 +0000 (19:56 -0600)
cde/programs/dtlogin/config/_common.ksh.src

index b3b73eaa1c03ab60acf8862f4dee7cacece52114..6386d133a0d6e65683403086e58b51ec17fb9ff4 100644 (file)
@@ -472,7 +472,7 @@ SetKeyboardMap()
 #endif
 #endif
 
-#if defined(CSRG_BASED) || defined(linux)
+#if defined(linux)
 #ifdef cpp_Xsetup
     if [ "$DTXSERVERLOCATION" != "remote" ]; then
       fontpath=
@@ -495,3 +495,26 @@ SetKeyboardMap()
 #endif
 #endif
 
+#if defined(CSRG_BASED)
+#ifdef cpp_Xsetup
+    if [ "$DTXSERVERLOCATION" != "remote" ]; then
+      fontpath=
+      FONTLIB=/usr/local/lib/X11/fonts
+      for i in misc 75dpi 100dpi Speedo Type1 PJE
+      do
+        if [ -f $FONTLIB/$i/fonts.dir ];  then
+            if [ ! -z "$fontpath" ]; then
+               fontpath=$fontpath,$FONTLIB/$i/
+            else
+               fontpath=$FONTLIB/$i/
+            fi
+        fi
+      done
+
+      if [ ! -z "$fontpath" ]; then
+        $XDIR/xset fp+ $fontpath
+      fi
+    fi
+#endif
+#endif
+