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

Re: Need help: how to package fonts for TeX in debian?



Hi Arne,

[Cc'ing Danai, the maintainer of latex-cjk]

"Arne Götje (高盛華)" <arne@linux.org.tw> wrote:

> Hi list,
>
> I am the maintainer of the ttf-arphic-{ukai|uming} packages in Debian
> and the upstream author of those fonts.
>
> The fonts are Pan-CJK Unicode fonts and contain glyphs in the BMP as
> well as in Planes 2 and 15 (PUA).
> Therefor it is not possible to generate tfm files with ttf2tfm like the
> existing tfm packages for the original arphic fonts do.
> Instead I asked Werner Lemberg for help and he pointed me to his latest
> CJK-latex package and the subfonts utils within that package.
>
> I used it on my fonts and it took my PC 36 (!) hours to generate the
> .enc, .afm, .pfm and .tfm files for my 4 fonts.

Uff.  And I thought the 5 hours without any other load that it took mine
to build the latex-cjk-chinese-arphic package were long...

> The files are here: http://debian.linux.org.tw/~arne/tfm.tar.bz2 (70MB!)
>
> The fonts names are:
> ukai	AR PL ZenKai Uni
> ukaimbe	AR PL ZenKai Uni MBE
> uming	AR PL ShanHeiSun Uni
> umingmbe	AR PL ShanHeiSun Uni MBE
>
> I asked Werner how to install the fonts in my TeX system...
> but it seems that in Debian the directories and file locations are quite
> different...

That surprises me.  The only thing that's different is that a package
maintainer shouldn't try to edit updmap.cfg directly, see
file:///usr/share/doc/tex-common/Debian-TeX-Policy.html/ch4.html#s4.2 

> Can someone please give me a helping hand to produce debian packages for
> those fonts?
>
> Werner's reply was basically this:
> -------------
> 1. delete the .enc files, as they are not needed.

In other words, don't install them in the deb

> 2. gzip the .afm files (they are also not needed, but usually kept along
> with the .pfb and .tfm files)

It's your choice whether you want to install them, or just keep them in
the source package.

> 3. put the .afm, .pfb and .tfm files into their proper locations in the
> local TEXMF tree (best with subdirectories)

For a Debian package, it shouldn't be the local TEXMF tree, but the
TEXMFMAIN tree, /usr/share/texmf, see
file:///usr/share/doc/tex-common/Debian-TeX-Policy.html/ch3.html#s3.2 

> 4. generate MAP files (uming00 AR-PL-ShanHeiSun-Uni-00 < uming00.pfb)
> (is this correct?)

I'm not sure about the format of the map files.  They should be map
files for dvips, the format is described in the dvips info manual in the
section 6.4 `psfonts.map': PostScript font catalog.

> 5. put the MAP files into fonts/map/dvips

Same on Debian.

> 6. in TEXMF/dvips create config files: config.uming, which looks like
> p +uming01.map
> p +uming02.map
> ...

I'm not sure whether this is needed, but it doesn't harm.

> 7. register the Map files in TEXMF/web2c/updmap.cfg
> Map uming01.map
> 8. run the updmap script

These two steps are different in Debian (and teTeX-3.0, by the way).
Please read the first link to the TeX policy I gave above, and in
particular
file:///usr/share/doc/tex-common/Debian-TeX-Policy.html/apA.html#s-appen-sample-font
and feel free to ask if you're unsure about the details.

> Now, how to do this in Debian? and how to produce a package for this? Or
> should this go into the latex-cjk /cjk-latex stuff?

Hm, I guess a package that takes 36 hours to build from source should be
on its own.  Even if you decide to include the things you generated in
the tarball, and not regenerate it on every package build.

Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: