diff --git a/ChangeLog b/ChangeLog index 4baf693d37..8e9d3a13a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-07-16 Jean-Marc Lasgouttes + + * INSTALL: lib/xfonts is dead. + 2005-07-15 * configure.ac: set AWK to gawk and subsitute diff --git a/INSTALL b/INSTALL index 2837c2b8e7..6241daf8a4 100644 --- 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 diff --git a/development/ChangeLog b/development/ChangeLog index 6697dc44ca..fdd2134a07 100644 --- a/development/ChangeLog +++ b/development/ChangeLog @@ -1,3 +1,8 @@ +2005-07-16 Jean-Marc Lasgouttes + + * Win32/packaging/package_lyxwin.sh: + * Win32/packaging/README: lib/xfonts is dead. + 2005-07-07 Jean-Marc Lasgouttes * FORMAT: document change to format 242. diff --git a/development/Win32/packaging/README b/development/Win32/packaging/README index 12f4aaeef8..03dec127b7 100644 --- a/development/Win32/packaging/README +++ b/development/Win32/packaging/README @@ -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. diff --git a/development/Win32/packaging/package_lyxwin.sh b/development/Win32/packaging/package_lyxwin.sh index e8ec1cbd40..1e49589ec8 100644 --- a/development/Win32/packaging/package_lyxwin.sh +++ b/development/Win32/packaging/package_lyxwin.sh @@ -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 diff --git a/lib/.cvsignore b/lib/.cvsignore index ca86fc662d..a237d62599 100644 --- a/lib/.cvsignore +++ b/lib/.cvsignore @@ -6,4 +6,3 @@ lyxrc.defaults listerrors Literate.nw configure -xfonts diff --git a/lib/Makefile.am b/lib/Makefile.am index 1dc28e1782..d1a17c2772 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 \ diff --git a/lib/configure.m4 b/lib/configure.m4 index e46edfe35b..98c789204c 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -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 diff --git a/po/POTFILES.in b/po/POTFILES.in index 3f81740ac4..831d81e4d0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -218,4 +218,5 @@ src/support/userinfo.C src/text.C src/text2.C src/text3.C +src/toc.C src/vspace.C diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index ec66aeb341..5ff147fe94 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2005-07-16 Jean-Marc Lasgouttes + + * qfont_loader.C (addToFontPath): remove. + (available): do not try to call addToFontPath. + 2005-07-14 Lars Gullik Bjønnes * moc/Makefile.am: dist pch.h and mark PCH_FILE as a built file diff --git a/src/frontends/qt2/qfont_loader.C b/src/frontends/qt2/qfont_loader.C index d325b08163..29910d139f 100644 --- a/src/frontends/qt2/qfont_loader.C +++ b/src/frontends/qt2/qfont_loader.C @@ -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; } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index a7205fb7ba..6b62270b1d 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2005-07-16 Jean-Marc Lasgouttes + + * xfont_loader.C (getFontinfo): do not call addFontPath. + (addFontPath): remove. + 2005-07-13 * forms/Makefile.am (distclean-local): pretend success also if diff --git a/src/frontends/xforms/xfont_loader.C b/src/frontends/xforms/xfont_loader.C index ffe46322f6..f469bc4133 100644 --- a/src/frontends/xforms/xfont_loader.C +++ b/src/frontends/xforms/xfont_loader.C @@ -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; }