]> git.lyx.org Git - lyx.git/commitdiff
get rid of the lib/xfonts hack
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 16 Jul 2005 11:06:12 +0000 (11:06 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 16 Jul 2005 11:06:12 +0000 (11:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10238 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
ChangeLog
INSTALL
development/ChangeLog
development/Win32/packaging/README
development/Win32/packaging/package_lyxwin.sh
lib/.cvsignore
lib/Makefile.am
lib/configure.m4
po/POTFILES.in
src/frontends/qt2/ChangeLog
src/frontends/qt2/qfont_loader.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/xfont_loader.C

index 4baf693d372d57fe8e742b4bb092799fad044051..8e9d3a13a50bb4b7cb1cf1c5b046525513f8434c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-07-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * INSTALL: lib/xfonts is dead.
+
 2005-07-15    <lgb@tandberg.net>
 
        * configure.ac: set AWK to gawk and subsitute 
diff --git a/INSTALL b/INSTALL
index 2837c2b8e7ed3b41b7e8520948b50e008cbfaf78..6241daf8a4bc26379ff3316c5c8747d1b239bc2b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -96,12 +96,8 @@ maths symbols displayed properly. To find out, type:
 at the console. Both RH8 and Debian unstable distributions are known
 to use fontconfig.
 
-If, however, your version of Qt does not use fontconfig, then the
-/usr/local/share/lyx/xfonts directory (or equivalent) should be added to
-the font path. This is done automatically by LyX if LyX is run on
-the local machine, and the X server supports Postscript fonts. If, however,
-you're running LyX remotely, then you'll have to do this step yourself.
-'man xset' is your friend.
+If, however, your version of Qt does not use fontconfig, then TeX
+fonts should be added to the font path. 'man xset' is your friend.
 
 * Other things to note
 
index 6697dc44ca40e16ea73132398e5ff17deaa60645..fdd2134a078ac1406fc938ce36968bbfe47ec925 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * Win32/packaging/package_lyxwin.sh: 
+       * Win32/packaging/README: lib/xfonts is dead.
+
 2005-07-07  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * FORMAT: document change to format 242.
index 12f4aaeef81dfe43cad82f5bff4464ef78bbffae..03dec127b71acdc13cfd97227f1d9d6cfbfbbcac 100644 (file)
@@ -34,8 +34,7 @@ the process:
 * Remove all stuff generated by running configure. It makes sense on
   your machine only, not for whoever is installing LyX. Specifically
 
-  xfonts/fonts.dir, xfonts/fonts.scale, doc/LaTeXConfig.lyx,
-  lyxrc.defaults, packages.lst and textclass.lst
+  doc/LaTeXConfig.lyx, lyxrc.defaults, packages.lst and textclass.lst
 
   should all be removed.
 
index e8ec1cbd40382d1bf136f4abea28b4738067cb91..1e49589ec83555155fa03ceb0e793b3981eec134 100644 (file)
@@ -17,7 +17,6 @@
 # ensure that the generated .dvi file is usable.
 
 # It removes all stuff generated by running configure:
-#   xfonts/
 #   doc/LaTeXConfig.lyx
 #   lyxrc.defaults
 #   packages.lst
@@ -97,7 +96,6 @@ a\
     # Strip the executables
     (
        cd "${LYX_INSTALL_DIR}/Resources/lyx"
-       rm -rf xfonts
        for file in doc/LaTeXConfig.lyx lyxrc.defaults packages.lst textclass.lst
        do
          rm -f $file
index ca86fc662d2265cab4f576a44cea48b12e230d6e..a237d62599f029260071a03914a790e469a87714 100644 (file)
@@ -6,4 +6,3 @@ lyxrc.defaults
 listerrors
 Literate.nw
 configure
-xfonts
index 1dc28e1782f1a06f264a3937da71e60b3e23717a..d1a17c277258771584738c265dff15a72d2f1a13 100644 (file)
@@ -896,30 +896,6 @@ $(srcdir)/configure: $(srcdir)/configure.m4
 lyxrc.defaults: $(srcdir)/configure
        $(SHELL) $<
 
-install-xfonts:
-       test -f xfonts/fonts.dir || exit 0 ; \
-       $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/xfonts ; \
-       files=`sed -e 's/^[0-9]*$$//' -e 's/^\([^ ]*\) .*$$/\1/' xfonts/fonts.dir` ; \
-       for i in $${files} ; do \
-         ln -f -s `kpsewhich $$i` $(DESTDIR)$(pkgdatadir)/xfonts/$$i ; \
-       done ; \
-       $(INSTALL_DATA) xfonts/fonts.dir $(DESTDIR)$(pkgdatadir)/xfonts/fonts.dir ; \
-       $(INSTALL_DATA) xfonts/fonts.scale $(DESTDIR)$(pkgdatadir)/xfonts/fonts.scale ; \
-       if test -f xfonts/PSres.upr ; then \
-         $(INSTALL_DATA) xfonts/PSres.upr $(DESTDIR)$(pkgdatadir)/xfonts/PSres.upr ; \
-       fi
-
-uninstall-xfonts:
-       rm -rf $(DESTDIR)$(pkgdatadir)/xfonts
-
-distclean-local:
-       rm -rf xfonts
-
-install-data-local: install-xfonts
-
-
-uninstall-local: uninstall-xfonts
-
 install-data-hook:
        $(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/configure
        for i in $(dist_scripts_DATA); do \
index e46edfe35b4c8325ce6d81030777c5185fdbfb8c..98c789204ce0da610b4d2880a3b5501830a8a03b 100644 (file)
@@ -199,7 +199,7 @@ esac
 
 #### Create the build directories if necessary
 for dir in bind clipart doc examples help images kbd layouts reLyX \
-    scripts templates ui xfonts; do
+    scripts templates ui ; do
   test ! -d $dir && mkdir $dir
 done
 
@@ -699,45 +699,10 @@ then
   echo "\\cygwin_path_fix_needed $use_cygwin_path_fix" >> $outfile
 fi
 
-######## X FONTS
-# create a fonts.dir file to make X fonts available to LyX
-echo "checking for TeX fonts"
-
-fontlist="cmex10 cmmi10 cmr10 cmsy10 eufm10 msam10 msbm10 wasy10"
-rm -f xfonts/fonts.dir xfonts/fonts.scale xfonts/tmpfonts
-
-num=0
-touch xfonts/tmpfonts
-for font in $fontlist ; do
-  MSG_CHECKING(for $font,+)
-  result=no
-  for ext in pfb pfa ttf ; do
-    if filepath=`kpsewhich $font.$ext` ; then
-      result="yes ($ext)"
-      rm -f xfonts/$font.$ext
-      ln -s $filepath xfonts 2>/dev/null
-      echo "$font.$ext -unknown-$font-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific" >>xfonts/tmpfonts
-      num=`expr $num + 1`
-      break
-    fi
-  done
-  MSG_RESULT($result)
-done
-
-if test ! $num = 0 ; then
-  echo $num >xfonts/fonts.scale
-  cat xfonts/tmpfonts >>xfonts/fonts.scale
-  cp xfonts/fonts.scale xfonts/fonts.dir
-  # create a resource list file for Display Postscript
-  (cd xfonts ; rm -f PSres.upr ; makepsres) 2>/dev/null || true
-fi
-rm -f xfonts/tmpfonts
-
-
 # Remove superfluous files if we are not writing in the main lib
 # directory
 for file in $outfile textclass.lst packages.lst \
-           doc/LaTeXConfig.lyx xfonts/fonts.dir ; do
+           doc/LaTeXConfig.lyx  ; do
   # we rename the file first, so that we avoid comparing a file with itself
   mv $file $file.new
   if test -r "${srcdir}"/$file && diff $file.new "${srcdir}"/$file >/dev/null 2>/dev/null ;
@@ -748,10 +713,6 @@ for file in $outfile textclass.lst packages.lst \
     mv $file.new $file
   fi
 done
-if test ! -r xfonts/fonts.dir ; then
-    echo "removing font links"
-    rm -f xfonts/*.pfb xfonts/fonts.scale
-fi
 
 # Final clean-up
 if test $lyx_keep_temps = no ; then
index 3f81740ac4770a0ca5f86f23cd5998b31ae5e4fa..831d81e4d066efcc06843e1baaae884e62b01c29 100644 (file)
@@ -218,4 +218,5 @@ src/support/userinfo.C
 src/text.C
 src/text2.C
 src/text3.C
+src/toc.C
 src/vspace.C
index ec66aeb341835971f9e25c49ffae3f53eec9d324..5ff147fe9479318908a3cfa6d5cf6c4bcffdba03 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * qfont_loader.C (addToFontPath): remove.
+       (available): do not try to call addToFontPath.
+
 2005-07-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * moc/Makefile.am: dist pch.h and mark PCH_FILE as a built file
index d325b08163708c7f31ffe64eb5eab8717e757df5..29910d139f1fc0f7debb5ecc548150051c7013df 100644 (file)
@@ -53,29 +53,6 @@ using std::string;
 
 
 
-void qfont_loader::addToFontPath()
-{
-#ifdef Q_WS_X11
-       string const dir =  OnlyPath(LibFileSearch("xfonts", "fonts.dir"));
-       if (!dir.empty()) {
-               QWidget w;
-               int n;
-               char ** p = XGetFontPath(w.x11Display(), &n);
-               if (std::find(p, p + n, dir) != p + n)
-                       return;
-               XFreeFontPath(p);
-               lyxerr[Debug::FONT] << "Adding " << dir
-                                   << " to the font path." << endl;
-               string const command = "xset fp+ " + QuoteName(dir);
-               Systemcall s;
-               if (!s.startscript(Systemcall::Wait, command))
-                       return;
-               lyxerr << "Unable to add " << dir << "to the font path."
-                      << endl;
-       }
-#endif
-}
-
 void qfont_loader::initFontPath()
 {
 #ifdef Q_WS_MACX
@@ -415,22 +392,6 @@ bool qfont_loader::available(LyXFont const & f)
                        return true;
                }
 
-               // If the font is a tex symbol font and it is not available,
-               // we try to add the xfonts directory to the font path.
-               static bool first_time = true;
-               if (!first_time || family == LyXFont::SYMBOL_FAMILY
-                   || family == LyXFont::WASY_FAMILY)
-                       return false;
-
-               first_time = false;
-               addToFontPath();
-               tmp = getSymbolFont(pat);
-               if (tmp.second) {
-                       cache[family] = true;
-                       return true;
-               }
-               // We don't need to set cache[family] to false, as it
-               //is initialized to false;
                return false;
        }
 
index a7205fb7ba380eba4c7199a9f9fbead4d58ff13a..6b62270b1d1dba160d62489c30dc5bf5528bf85b 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * xfont_loader.C (getFontinfo): do not call addFontPath.
+       (addFontPath): remove.
+
 2005-07-13    <lgb@tandberg.net>
 
        * forms/Makefile.am (distclean-local): pretend success also if
index ffe46322f6a41c7a033aca9b73fd4069cf2c9cf4..f469bc4133421afbf0bca9ad851dac487e689ff8 100644 (file)
@@ -145,27 +145,6 @@ string const fontName(string const & family, string const & foundry)
                return "-"+foundry+"-"+family;
 }
 
-
-bool addFontPath()
-{
-       string const dir =  OnlyPath(LibFileSearch("xfonts", "fonts.dir"));
-       if (!dir.empty()) {
-               int n;
-               char ** p = XGetFontPath(fl_get_display(), &n);
-               if (std::find(p, p + n, dir) != p + n)
-                       return false;
-               lyxerr[Debug::FONT] << "Adding " << dir
-                                   << " to the font path." << endl;
-               string const command = "xset fp+ " + dir;
-               Systemcall s;
-               if (!s.startscript(Systemcall::Wait, command))
-                       return true;
-               lyxerr << "Unable to add " << dir << "to the font path."
-                      << endl;
-       }
-       return false;
-}
-
 } // namespace anon
 
 // Get font info
@@ -182,17 +161,7 @@ void xfont_loader::getFontinfo(LyXFont::FONT_FAMILY family,
        // Special fonts
        string pat = symbolPattern(family);
        if (!pat.empty()) {
-               static bool first_time = true;
                fontinfo[family][series][shape] = new FontInfo(pat);
-               if (family != LyXFont::SYMBOL_FAMILY &&
-                   !fontinfo[family][series][shape]->exist() &&
-                   first_time) {
-                       first_time = false;
-                       if (addFontPath()) {
-                               delete fontinfo[family][series][shape];
-                               fontinfo[family][series][shape] = new FontInfo(pat);
-                       }
-               }
                return;
        }