[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#225004: tetex-extra: Type1 fonts should be in a separate package



Hi,

Hilmar Preusse <hille42@web.de> wrote:

> I call dh_installxfonts during debian/rules, which gives me an
> update-fonts-dir in postinst and postrm and a Depend on xutils.
> Do I need to do anything more? Do I need update-fonts-scale (if yes,
> where do I get that fonts.scale file from?) and update-fonts-alias
> (if yes, where do I get that fonts.alias file from?)?

You need to provide a fonts.scale as explained by the Policy section I
mentioned in my previous mail. For instance, for lmodern-x11:

  /etc/X11/fonts/Type1/lmodern-x11.scale

(the name lmodern-x11 was chosen because of gsfonts/gsfonts-x11, but I
see there are also a lot of xfonts-foo packages that are not built from
the xfree86 source package...)

You need to provide it yourself. In the lmodern case, I extract it from
lmodern.defoma-hints, which I wrote manually (well, defoma-hints can
give you a template for an arbitrary font and help you find the
available/common values for hints when the defoma manual does not say
much).

Also, there are tools to generate fonts.scale files automatically (at
least type1inst is mentioned here:

  http://www.tldp.org/HOWTO/Font-HOWTO/xfonts.html#AEN223

) but in the case of lmodern, I made it myself for better quality. For
instance, type1inst would never have figured out the relations between
lmr10.pfb and lmcsc10.pfb, to which I attributed the following XLFD
names (respectively, example for ISO-8859-1):

  -unregistered-Latin Modern Roman-medium-r-normal--0-0-0-0-p-0-iso8859-1
and

  -unregistered-Latin Modern Roman-medium-r-normal-small caps-0-0-0-0-p-0-iso8859-1

You need to provide a .alias file only if you want to provide aliases
for the names you chose in fonts.scale...

> Well, I don't care in the moment about defoma. Wasn't there some
> rumour, that this thing will be abolished?

I'm not aware of such a rumour. Do you have any pointer?

Before you add defoma support, please compare your screenshots in
GNOME 2 applications like gnome-character-map and epiphany with the one
I provided on:

  http://people.via.ecp.fr/~flo/tmp/lmodern-screenshots/

The reason is: applications using the native XFree86 rendering routines
for Type 1 fonts generate a somewhat ugly result (no anti-aliasing).
gnome-character-map could find the lmodern fonts even when the fonts
were not directly available to X (that was thanks to defoma) and does a
very nice rendering. Like all GNOME 2 apps, I believe (this must be Xft2
in action). I would like to know if the rendering would be as good if
gnome-character-map had found the font via X directly instead of via
fontconfig (which is a defoma "client")---if it would have found the
font at all in this case.

> Last problem: I /usr/share/doc/tetex-fonts-extra I get a file
> "copyright" which tells me that the license is GPL. But I guess,
> these fonts aren't GPL at all. This needs still work.

Ugh. I don't know how you generated your package, but rest assured that
copyright files don't pop up magically...

Some comments on your patch:

+Package: tetex-extra-fonts
+Architecture: all
+Conflicts: kpathsea, texlib, textfm, bibtex, texpsfnt, mfbasfnt, mfnfss, xdvik, amsfonts, amstex, amslatex, ltxmisc, ltxtool, psnfss, mfdcfnt, mflib, pandora, hyperref, tetex-french, cspsfonts, tetex-nonfree, pb-diagram, revtex4 (<= 4.0-2), tetex-eurosym, texdoctk, tetex-extra (<= 2.0.2-x.x)
+Replaces: kpathsea, texlib, textfm, latex, bibtex, texidoc, texpsfnt, mfbasfnt, mfnfss, xdvik, amsfonts, amstex, amslatex, ltxmisc, ltxtool, psnfss, mfdcfnt, mflib, pandora, hyperref, cspsfonts, tetex-bin (<< 1.0.7+20021025-3), tetex-french, tetex-nonfree, pb-diagram, tetex-base (<< 2.0-2), tetex-eurosym, texdoctk

Does tetex-extra-fonts really replace all these packages???

+Description: Additional Type1-fonts for teTeX
+ This package contains the afm- and pfb-files of some postscript fonts

foo- and bar-baz is German, I believe. :)
Also, PostScript is written PostScript.

+Package: xfonts-tetex
+Architecture: all
+Depends: tetex-extra-fonts, ${misc:Depends}

You may have a look at bug #112140 and explicitely depend on xutils
(>= 4.1.0-12). Of course, all this can be found in the lmodern source
package that is available here, as you know:

  http://people.via.ecp.fr/~flo/debian/sid/source/

+ This package contains a collection of soft links sitting in
+ /usr/X11R6/lib/X11/fonts/Type1/ and pointing to the respective font
+ files provided by a separate package.
+ 

Only technically-oriented users will know what it is useful for. The
purpose of this package is to make the fonts availabe to the X Window
System.

+# now split off Type1-files
+	grep pfb$$ debian/tetex-extra.files > debian/tetex-extra-fonts.files
+	grep afm$$ debian/tetex-extra.files >> debian/tetex-extra-fonts.files

grep -E '\.(afm|pfb)$$'

+	sort debian/tetex-extra.files debian/tetex-extra-fonts.files | uniq -u > tetex-extra.tmp
+	mv -f tetex-extra.tmp debian/tetex-extra.files

IMHO, debian/tetex-extra-fonts.files has nothing to do here. I think you
wanted to uniq -u tetex-extra-fonts.files for fear of files listed
several times, but this is not was is performed.

+
+# create soft links in usr/X11R6/lib/X11/fonts/Type1/ and list these files
+# in xfonts-tetex
+	ln -s `cat debian/tetex-extra-fonts.files|sed s#^u#\/u#g` debian/tetex-base/usr/X11R6/lib/X11/fonts/Type1/
+	echo "usr/X11R6/lib/X11/fonts/Type1/*" > debian/xfonts-tetex.files

These links are not Policy-compliant. dh_link can help if you don't know
how to make Policy-compliant symlinks.


+# register the fonts in xfonts-tetex
+	dh_installxfonts -pxfonts-tetex

I prefer writing "dh_installxfonts -p xfonts-tetex" for clarity...

-- 
Florent



Reply to: