"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "Ville" == Ville Skytt <Ville>
writes:
Ville> If building with XFontSet support (--with-xfs), I think it
Ville> would be neat to also get *menubar*FontSet stuff in
Ville> Emacs.ad enabled by default, instead of *menubar*Font.
Go ahead and apply the patch to 21.5. I'll have to take a look at it
before putting it in 21.4, but I think our code will handle this
whether it's with-mule or not.
Red Hat really really sucks. There is no excuse whatsoever for not
passing this kind of trivial patch back upstream. Even less for not
informing us about the Hannibal Lecter ld (both Debian and SuSE did,
by contrast).
I have also applied a patch to the app-default files recently to
improve the behaviour especially in UTF-8 locales. I wanted
to submit it of course but I was busy and forgot. Sorry.
Patch attached. This patch just adds
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! FontSet for menus when you use --with-xfs or --with-xim=xlib.
*fontSet:
-gnu-unifont-medium-r-normal--16-160-75-75-p-80-iso10646-1,-*-*-medium-r-normal--16-*-*-*-c-*-*-*
to all the app-default files for all currently available languages:
xemacs-21.4.8.orig/etc/Emacs.ad xemacs-21.4.8/etc/Emacs.ad
packages/mule-packages/locale/app-defaults/de/Emacs
packages/mule-packages/locale/app-defaults/fr/Emacs
packages/mule-packages/locale/app-defaults/ja/Emacs
packages/mule-packages/locale/app-defaults/ro/Emacs
I don't use
*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
because this would neither work in ja_JP.eucJP nor in UTF-8 locales.
I believe the fontSet I am currently specifying is a reasonable
default, -*-*-medium-r-normal--16-*-*-*-c-*-*-* will match something
reasonable almost always. At least for the European languages,
Japanese, Korean, and simp. Chinese there are fonts matching that
pattern already in XFree86. Trad. Chines fonts matching that pattern
are in the GNU Intlfonts 1.2 packages. Therefore this pattern should
almost always work.
For iso10646-1 I explicitely specify the GNU Unicode font, because
-*-*-medium-r-normal--16-*-*-*-c-*-*-* would also match fonts
containing only half-width or only full-width characters in UTF-8
locale. This would not work well for ja_JP.UTF-8. I believe among the
bitmap fonts covering both half-width and full-width characters, the
GNU Unicode font is most likely to be installed. I know that it is
installed by default on SuSE Linux.
Therefore I believe the fontSet I chose above should almost always
work.
If XEmacs is started e.g. like
LANG=ja_JP xemacs
it won't find
/usr/share/xemacs/mule-packages/etc/app-defaults/ja/Emacs
there I create symlinks when installing in the xemacs.spec file:
# add Japanese translations for liece menus to Japanese app-defaults:
cat packages/xemacs-packages/liece/etc/Emacs.ad >>
/usr/share/xemacs/mule-packages/etc/app-defaults/ja/Emacs
# Make symlinks for international app-defaults:
ln -sf de /usr/share/xemacs/mule-packages/etc/app-defaults/de_DE
ln -sf de /usr/share/xemacs/mule-packages/etc/app-defaults/de_DE@euro
ln -sf fr /usr/share/xemacs/mule-packages/etc/app-defaults/fr_FR
ln -sf fr /usr/share/xemacs/mule-packages/etc/app-defaults/fr_FR@euro
ln -sf ja /usr/share/xemacs/mule-packages/etc/app-defaults/ja_JP
ln -sf ja /usr/share/xemacs/mule-packages/etc/app-defaults/ja_JP.ujis
ln -sf ja /usr/share/xemacs/mule-packages/etc/app-defaults/ja_JP.EUC
ln -sf ja /usr/share/xemacs/mule-packages/etc/app-defaults/ja_JP.eucJP
ln -sf ro /usr/share/xemacs/mule-packages/etc/app-defaults/ro_RO
and to make it work in the UTF-8 locales as well, I create UTF-8
versions of the app-defaults files from the original versions
and store them in xx_YY.UTF-8 directories:
# create international app-defaults for UTF-8 locales:
pushd /usr/share/xemacs/mule-packages/etc/app-defaults/
for i in de_DE fr_FR ja_JP ro_RO
do
mkdir $i.UTF-8
iconv -f $(LC_ALL=$i locale charmap) -t UTF-8 < $i/Emacs >
$i.UTF-8/Emacs
perl -pi -e 's/-\*- coding:.*-\*-/-\*- coding: utf-8 -\*-/'
$i.UTF-8/Emacs
done
popd
# install the standard app-defaults file used for all languages
# which don't have their own app-defaults file above:
mkdir -p /usr/X11R6/lib/X11/app-defaults/
install -m 644 etc/Emacs.ad /usr/X11R6/lib/X11/app-defaults/XEmacs
--
Mike Fabian <mfabian(a)suse.de>
http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。