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

Re: Example of truetype font packaged for tex?



On Thu, Apr 19, 2007 at 04:04:19PM +0200, Danai SAE-HAN wrote:
> From: uwe@steinmann.cx (Uwe Steinmann)
> 
> > On Thu, Apr 19, 2007 at 03:14:02PM +0200, Danai SAE-HAN wrote:
> > > Hi!
> > > 
> > > From: uwe@steinmann.cx (Uwe Steinmann)
> > > > I'm looking for an example debian package which makes a truetype font
> > > > available for tex/latex. Is there any?
> > > 
> > > I'm not sure that dvips actually supports TTF.  But I do know that it
> > > accepts Type1 fonts.
> > dvips supports TTF by using ttf2pk (see http://www.radamir.com/tex/)
> > For some reason it just doesn't call mktexpk (or ttf2pk) to create
> > the pk font.
> 
> Indeed, that was the case with CJK4.5.0, but now I switched to Type1
> and am I glad that I did that. ;)
> BTW, Werner Lemberg is the author of both ttf2pk and CJK.
> 
> > > I have created a source package called latex-cjk-chinese-arphic which
> > > converts TTF to Type1 (using Fontforge), and installs everything
> > > according to the Debian TeX policy.  These Type1 fonts work in dvips,
> > > dvipdf(m,mx) and pdftex.
> > I have done that too, actually wrote a shell script which does
> > all the work and also creates a debian source package. It uses
> > ttfto42 or ttf2pfb for convertion to Type[42|1]. Converting TTF to
> > Type1 is a solution but not always the best one, because you
> > are loosing some information of the TTF.
> 
> True.
> 
> > > But this method might be a tad complicated for your use.
> > > You might try pdf2ps or pdftops.
> > That should work, but it would be much nicer if
> > latex -> dvips works too.
> 
> Try "KPATHSEADEBUG=1 dvips bla.dvi" and see if it shows anything
> interesting.
> 
> Also check out the missfonts.log file.
Both didn't produce any output at all, but 'strace dvips ...' gave
me some hints. dvips doesn't look at many places. It checks the
current directory for the font and if put in there, dvips will include
it, just as if it was a type1 font :-(.

So I removed the line

jvnr8r Verdana " TeXBase1Encoding ReEncodeFont " <8r.enc <jvnr8a.ttf

from the fonts own map file (the one that finally ends up psfonts.map,
pdftex.map, ... after calling updmap-sys), and put 

jvnr8r jvnr8a.ttf Encoding=8r.enc

into ttfonts.map

This makes dvips happy and calls ttf2pk before including the pk file
into the output postscript file.

Unfortunately, now even pdftex uses the pk font.

I wonder, if it possible to put the line

jvnr8r Verdana " TeXBase1Encoding ReEncodeFont " <8r.enc <jvnr8a.ttf

into pdftex.map but not in dvips.map. I also wonder, if dh_installtex
can add lines to ttfonts.map?

  Uwe

-- 
  MMK GmbH, Fleyer Str. 196, 58097 Hagen
  Uwe.Steinmann@mmk-hagen.de
  Tel: 02331 840446    Fax: 02331 843920

Attachment: signature.asc
Description: Digital signature


Reply to: