[TLContrib] How do I properly modify an existing map file?

Leo Liu leoliu.pku at gmail.com
Mon Mar 26 13:02:21 CEST 2012


That's quite different.

I am familiar enough with updmap, it is just for dvips/pdfTeX/dvipdfm(x) to update the physical font mappings for Type1. It writes psfonts.map, pdftex.map and dvipdfm.map. It is also possible to specify TrueType fonts using updmap, but it is problematic for dvips.

On the other hand, I need to change texfonts.map, which is a kpathsea faculty to set font name mapping for TFM (c.f. CTAN://info/doc-k/kpathsea.pdf). There is not such a utility to update texfonts.map, thus I wrote one for my package. AFAIK, zhmCJK is the only one package to use texfonts.map.

Besides texfonts.map, there're also other font mappings that cannot be handled by updmap utility. For example, dvipdfmx uses cid-x.map for TrueType and OpenType CID fonts, and ttf2pk uses ttfonts.map to find TrueType fonts. These font mappings were important for CJK font in the past, although not that important for western fonts. In the end we (developers of zhmetrics) decide to use some pdfTeX and dvi specials to do the same thing, and this technique can be also found in zhmCJK.

I hope my explanations would clarify some complex font mapping faculties in TeX and friends. What I need is, to update `texfonts.map' in fontname package. That's why I add a postaction to run a script.

BTW, do I have to use perl script for a postaction, or I can use a Lua script? (It doesn't matter.)

Thank you.


-----Original Message-----
From: Taco Hoekwater [mailto:taco at elvenkind.com] 
Sent: Monday, March 26, 2012 3:35 PM
To: Leo Liu
Cc: TLContrib at ntg.nl
Subject: Re: [TLContrib] How do I properly modify an existing map file?


On 03/25/2012 09:43 PM, Leo Liu wrote:
> Hi,
> I've just uploaded my zhmCJK package.
> http://tlcontrib.metatex.org/cgi-bin/package.cgi/action=view/id=594
> I need to modify $TEXMFDIST/fonts/map/fontname/texfonts.map, which is in the fontname package.

If I understand correctly, you do not need the script unless you need to do special processing to your own map snippet (and in that case I do not know how to do that).

If you have a prebuilt snippet named 'zhmcjk.map' and you put it in the right TDS place in the package, then all you have to do is add

   addMap zhmchk.map

to the tlmgr directives. No need for a special script in that case, tlmgr will take care of everything.

Best wishes,

More information about the TLContrib mailing list