FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-14-2008, 04:16 AM
 
Default font policy changes

I am wrapping up the Debian packages (font + sources + binary utilities
package) for the GNU Unifont. I believe that some things in the Debian
Policy Manual version 3.8.0.1, 2008-06-05, concerning fonts are
outdated. Comments and suggestions are welcome. I'm running the stable
Etch 4.0r3 release.

1) Section 11.8.5, Packages providing fonts, specifies running
"update-fonts-dir". The man page for this command further specifies
that it should only be given the last directory in a path for a newly
added font. For example, if a font was just added to the X11 100dpi
directory, then it is only proper to run "update-fonts-dir 100dpi"
rather than give the full pathname to the fonts directory. This utility
then searches in /usr/lib/X11/fonts. That directory is deprecated on
Debian. Debian X11 fonts now appear under /usr/share/fonts/X11. The
wrong directory is searched even with "update-fonts-dir -7" or
"update-fonts-dir --x11r7-layout" -- the man page says those options
will search in /usr/share/fonts/X11. This looks like a bug.

2) If, to get around this, "update-fonts-dir" is given an absolute path,
it complains that it was given an absolute path.

3) Even if "mkfontdir" were invoked directly or if it's okay to give
"update-fonts-dir" an absolute path (in which case its man page needs to
be updated and the warning removed), isn't it also advisable to run
"xset fp rehash" in postinst and postrm scripts? That program is the
standard mechanism for updating installed fonts on recent versions of
X11, including in Debian and other GNU/Linux distributions.

4) What are the preferred steps for registering a TrueType font in
Debian? It is outside the X11 directory structure, and depends on the
TrueType font server. GNOME recognizes a newly installed TrueType font
but is there anything that should appear in a postinst or postrm script?

5) If I wanted to have symbolic links checked with dh_link, what is the
preferred way to enter an absolute path to your current location in the
file? Should I "just know" that the path will be
"/usr/share/<packagename>/", or will putting "$(CURDIR)/file.extension"
work in the debian/<package>.links file, or is there some other
preferred method? Right now I'm not using dh_link; I'm creating
symlinks with absolute paths in a Makefile using $(CURDIR).

Thanks for any advice.


Paul Hardy
unifoundry@unifoundry.com



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 05:13 AM
Russ Allbery
 
Default font policy changes

unifoundry@unifoundry.com writes:

> 3) Even if "mkfontdir" were invoked directly or if it's okay to give
> "update-fonts-dir" an absolute path (in which case its man page needs to
> be updated and the warning removed), isn't it also advisable to run
> "xset fp rehash" in postinst and postrm scripts? That program is the
> standard mechanism for updating installed fonts on recent versions of
> X11, including in Debian and other GNU/Linux distributions.

Hm. That's an interesting thought, although it's going to fail if no X
server is currently running, correct?

> 5) If I wanted to have symbolic links checked with dh_link, what is the
> preferred way to enter an absolute path to your current location in the
> file? Should I "just know" that the path will be
> "/usr/share/<packagename>/", or will putting "$(CURDIR)/file.extension"
> work in the debian/<package>.links file, or is there some other
> preferred method?

You should provide the full path of the target file to dh_link. dh_link
will then do whatever is necessary to make it a Policy-compliant link. So
if you're linking to a file in /usr/share/<package>, the source should
start with that.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 05:35 AM
 
Default font policy changes

> -------- Original Message --------
> Subject: Re: font policy changes
> From: Russ Allbery <rra@debian.org>
> Date: Sun, July 13, 2008 10:13 pm
> To: unifoundry@unifoundry.com
> Cc: debian-devel@lists.debian.org, debian-mentors@lists.debian.org,
> "Anthony Fok" <foka@debian.org>
>
> unifoundry@unifoundry.com writes:
>
> > 3) Even if "mkfontdir" were invoked directly or if it's okay to give
> > "update-fonts-dir" an absolute path (in which case its man page needs to
> > be updated and the warning removed), isn't it also advisable to run
> > "xset fp rehash" in postinst and postrm scripts? That program is the
> > standard mechanism for updating installed fonts on recent versions of
> > X11, including in Debian and other GNU/Linux distributions.
>
> Hm. That's an interesting thought, although it's going to fail if no X
> server is currently running, correct?
>
> --
> Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>

True. I guess that would have to be trapped gracefully.

Would running "fc-cache -f" be preferable? It will identify bitmap and
TrueType fonts. There are two things I don't like about that command
though: 1) it has no man page (I guess I can write one) although
"fc-cache --help" lists options; 2) I don't think it dies gracefully --
it can corrupt a cache if there is an error, and doesn't unwind to the
old cache version (unless the program has been improved recently). Is
that tolerable?


Paul Hardy
unifoundry@unifoundry.com



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 09:26 AM
Julien Cristau
 
Default font policy changes

On Sun, Jul 13, 2008 at 22:13:27 -0700, Russ Allbery wrote:

> unifoundry@unifoundry.com writes:
>
> > 3) Even if "mkfontdir" were invoked directly or if it's okay to give
> > "update-fonts-dir" an absolute path (in which case its man page needs to
> > be updated and the warning removed), isn't it also advisable to run
> > "xset fp rehash" in postinst and postrm scripts? That program is the
> > standard mechanism for updating installed fonts on recent versions of
> > X11, including in Debian and other GNU/Linux distributions.
>
> Hm. That's an interesting thought, although it's going to fail if no X
> server is currently running, correct?
>
It will always fail, because the user running the script (root) won't
normally have access to the X server.

Cheers,
Julien


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 02:42 PM
 
Default font policy changes

> -------- Original Message --------
> Subject: Re: font policy changes
> From: Julien Cristau <jcristau@debian.org>
> Date: Mon, July 14, 2008 2:26 am
> To: Russ Allbery <rra@debian.org>
> Cc: unifoundry@unifoundry.com,
> debian-devel@lists.debian.org,debian-mentors@lists.debian.org, Anthony
> Fok <foka@debian.org>
>
> On Sun, Jul 13, 2008 at 22:13:27 -0700, Russ Allbery wrote:
>
> > unifoundry@unifoundry.com writes:
> >
> > > 3) Even if "mkfontdir" were invoked directly or if it's okay to give
> > > "update-fonts-dir" an absolute path (in which case its man page needs to
> > > be updated and the warning removed), isn't it also advisable to run
> > > "xset fp rehash" in postinst and postrm scripts? That program is the
> > > standard mechanism for updating installed fonts on recent versions of
> > > X11, including in Debian and other GNU/Linux distributions.
> >
> > Hm. That's an interesting thought, although it's going to fail if no X
> > server is currently running, correct?
> >
> It will always fail, because the user running the script (root) won't
> normally have access to the X server.
>
> Cheers,
> Julien

It would only fail if you did not have an X server running, for example
if root were running in single-user mode. But if an ordinary user logs
in using an X server in multi-user mode and does an "su" to root to run
apt-get, or of course if root logs in and runs X11, it works. This
package isn't part of any default Debian installation, so I think a user
would most often be running apt-get inside an X11 environment.

"fc-cache -f" will run without an X server running. Maybe that is the
best choice.


Paul Hardy
unifoundry@unifoundry.com



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 03:50 PM
Russ Allbery
 
Default font policy changes

Julien Cristau <jcristau@debian.org> writes:
> On Sun, Jul 13, 2008 at 22:13:27 -0700, Russ Allbery wrote:
>> unifoundry@unifoundry.com writes:

>>> 3) Even if "mkfontdir" were invoked directly or if it's okay to give
>>> "update-fonts-dir" an absolute path (in which case its man page needs to
>>> be updated and the warning removed), isn't it also advisable to run
>>> "xset fp rehash" in postinst and postrm scripts? That program is the
>>> standard mechanism for updating installed fonts on recent versions of
>>> X11, including in Debian and other GNU/Linux distributions.

>> Hm. That's an interesting thought, although it's going to fail if no X
>> server is currently running, correct?

> It will always fail, because the user running the script (root) won't
> normally have access to the X server.

See, I thought that too, and then I tried it and it seemed to work fine.
Maybe my test was wrong?

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 03:54 PM
Vincent Bernat
 
Default font policy changes

OoO Lors de la soirée naissante du lundi 14 juillet 2008, vers 17:50,
Russ Allbery <rra@debian.org> disait*:

>> It will always fail, because the user running the script (root) won't
>> normally have access to the X server.

> See, I thought that too, and then I tried it and it seemed to work fine.
> Maybe my test was wrong?

If HOME was set to ~user, root can find ~user/.Xauthority and is then
able to use the xserver. Same applies if XAUTHORITY variable is
correctly set.
--
/* After several hours of tedious analysis, the following hash
* function won. Do not mess with it... -DaveM
*/
2.2.16 /usr/src/linux/fs/buffer.c
 
Old 07-14-2008, 03:55 PM
Julien Cristau
 
Default font policy changes

On Mon, Jul 14, 2008 at 08:50:57 -0700, Russ Allbery wrote:

> Julien Cristau <jcristau@debian.org> writes:
> > It will always fail, because the user running the script (root) won't
> > normally have access to the X server.
>
> See, I thought that too, and then I tried it and it seemed to work fine.
> Maybe my test was wrong?
>
Maybe HOME was still set to the user's home dir? If XAUTHORITY isn't
set Xlib looks in $HOME/.Xauthority, so that may work depending how you
get root.

Cheers,
Julien


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 04:17 PM
Russ Allbery
 
Default font policy changes

Julien Cristau <jcristau@debian.org> writes:

> Maybe HOME was still set to the user's home dir? If XAUTHORITY isn't
> set Xlib looks in $HOME/.Xauthority, so that may work depending how you
> get root.

Ah, XAUTHORITY was set. Thank you. I didn't know about that.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-16-2008, 11:20 AM
Josselin Mouette
 
Default font policy changes

Le dimanche 13 juillet 2008 à 21:16 -0700, unifoundry@unifoundry.com a
écrit :
> 4) What are the preferred steps for registering a TrueType font in
> Debian? It is outside the X11 directory structure, and depends on the
> TrueType font server. GNOME recognizes a newly installed TrueType font
> but is there anything that should appear in a postinst or postrm script?

The font caches should be automatically updated as soon as you are
registering fonts with defoma. If you are not using defoma, you need to
run fc-cache by hand in the postinst.

Cheers,
--
.'`.
: :' : We are debian.org. Lower your prices, surrender your code.
`. `' We will add your hardware and software distinctiveness to
`- our own. Resistance is futile.
 

Thread Tools




All times are GMT. The time now is 06:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org