xset fp+ / xset fp-


Subject: xset fp+ / xset fp-
From: Kevin Vajk (kvajk@ricochet.net)
Date: Fri Apr 14 2000 - 20:20:53 CDT


The abiword script on GNU/Linux does something like this:
  xset fp+ $ABISUITE_FONT_HOME
  ... run the Abiword binary ...
  xset fp- $ABISUITE_FONT_HOME

So, for a real-life example, if I run one copy of abiword to read an email
attachment, then on another desktop open another copy of abiword, then
go back and close the abiword which was viewing the email attachment, and
then go back to the other instance of abiword and open a dosument, it dies
because it can't find any fonts. The "xset fp- ..." in the first copy of
abiword stepped on the second copy of abiword.

My proposal is that we add the font path if needed, and never remove
it. Like this:
    xset q 2>/dev/null | grep -q -- $ABISUITE_FONT_HOME
    [ $? -eq 0 ] || xset fp+ $ABISUITE_FONT_HOME 1>/dev/null 2>/dev/null

My version of this script has another modification, as well, which you
might consider. At work, some people on X terminals have been logging
onto my PC to run abiword to view MSWord documents. In order to make
fonts work, I added the abiword font path to /etc/X11/fs/config, and
removed the "-port -1" options to the xfs rc startup script. And I
added to the abiword script something like this:
    xset q 2>/dev/null | grep -q -- tcp/`hostname`
    [ $? -eq 0 ] || xset fp+ tcp/`hostname`:7100 1>/dev/null 2>/dev/null

Anyhow, I really think the first change would be a good idea. I'm
not so sure about the second one, though.

- Kevin Vajk
  <kvajk@ricochet.net>



This archive was generated by hypermail 2b25 : Fri Apr 14 2000 - 20:23:48 CDT