* Alan W. Irwin <irwin@...> [2004-12-09 15:31]:
> >1) The font path. Instead of patching the sources for the Debian package,
> > I would introduce a configure option, say --with-ttf-path, allowing the
> > user to set the path, which would be honored by the gd driver. I will
> > look at this as soon as I can, but if someone else get to it before me,
> > even better.
> I think this would be useful for the user or packager who is building
> PLplot and knows in advance the font location. Note you will also have to
> have configure options for font names as well since those will probably
> change from one font package to another.
The other option I mentioned (--enable-freefont, see below) would take care
> >2) The use of non-free versus free TrueType fonts. In a afterthought, I
> > think that it is inappropriate for the Debian package plplot-gd to depend
> > on non-free software. The ttf-freefont package provide good replacements
> > for the Micro$oft core truetype fonts and we could change the gd driver
> > to alternatively accept them. This could be done through a configure
> > option, say --enable-freefont.
> >What do you think?
> Actually, the msttcorefonts package is GPLed so I think it is entirely
> appropriate to use it.
Yes, the msttcorefonts is GLPed, but it does not contain the *.ttf files,
which must be downloaded at package installation time. This makes the whole
thing pretty non-free and this is the very reason msttcorefonts is not in
Debian main (it is in contrib, see http://packages.debian.org/msttcorefonts).
I sustain my previous position: in Debian, plplot-gd should not
depend/recommend/suggest non-free packages like msttcorefonts, in particular
because there are good free replacements for it.
> So for upstream PLplot I think we should stick to the present (corrected)
> default font location and font names. However, Rafael, you are in charge
> of the decisions for downstream Debian packaging of PLplot so if you want
> to change that default to something else for Debian, that is your choice,
> and I feel mechanism (1) above would be a good way of implementing that.
> However, for upstream please leave the location and font names the same as
> now if the user specifies no configure font options.
If I implement the configure option, I will let the default upstream option
as it is now, namely the M$ TrueType fonts (although I dislike it). I will
then take the Freeedom Choice (TM) for the Debian package by setting the
appropriate configure options.
> The above discussion concerns the default font location and names, but we
> also have to do something for users who don't want to use those
> (configured?) defaults at run-time. The current environment variable
> approach is OK, but I think we could do better. How about making some plplot
> command-line options to specify the fonts? The big advantage of the
> command-line option approach is it is generally self documenting. Also, I
> believe this should be an overall option an _not_ a gd device driver option
> since I think we will eventually be using the freetype approach for more
> than just gd.c.
Agreed as regards the option versus envvar solution. At any rate, TrueType
management in PLplot is already separated from the gd driver (cf
> Ultimately, we should also revisit how we are specifying fonts on the Linux
> side of things. Right now (for both for the default [configured?] fonts and
> the fonts specified at run-time with environment variables) we are just
> specifying directory and font names. That's okay, but there are much more
> general ways to specify fonts now, and we should probably be using Keith
> Packard's fontconfig instead (which is the consensus choice for controlling
> font selection in all Linux desktop discussions I have read). I am not that
> experienced with font-config but I notice from running
> fc-list |grep -i arial
> on my Debian-testing distro that the MS Arial fonts are already
> automatically registered with fontconfig. AFAIK, fontconfig is just part of
> both XFree86 and the later x.org version of X. So I am pretty sure it is
> ubiquitously available, and a search at http://rpm.pbone.net/index.php3
> confirmed that. Thus having it as a PLplot dependency should not be that
> onerous for our Linux users who wanted to use plfreetype.
I have whatsoever no experience with fontconfig. Your claims above about
the ubiquitousness of fontconfig seem right. In Debian, fonts are managed
by a native package called defoma (Debian Font Manager). For instance, the
msttcorefonts package register its fonts through defoma. Later, fontconfig
can find the fonts, because there is an indication in /etc/fonts/local.conf
to look at /var/lib/defoma/fontconfig.d/fonts.conf. For instance, the M$
Arial font can be finally found through fointconfig/defoma thanks to the
$ ls -l /var/lib/defoma/fontconfig.d/A/Arial-Regular.ttf
lrwxrwxrwx 1 root root 49 2004-11-14 10:17 /var/lib/defoma/fontconfig.d/A/Arial-Regular.ttf -> /usr/share/fonts/truetype/msttcorefonts/Arial.ttf