On Wed, May 17, 2006 at 09:20:55PM +0800, Manuel Mall wrote:
> On Wednesday 17 May 2006 15:47, Gennadiy Tsarenkov wrote:
> > Jeremias,
> >
> > Wednesday, May 17, 2006, 10:17:36 AM, you wrote:
> >
> > JM> On 17.05.2006 02:02:52 Manuel Mall wrote:
> > >> I don't know anything about LaTeX. Does it understand TrueType
> > >> fonts? If so would it be worthwhile to check its source code?
> >
> > JM> I don't think so. I can't find any reference. But I've never
> > worked with JM> LaTeX.
> <snip/>
> > Anyway,  for  correct  baseline-ing it requires only text
> > metric files for any used font to be present.
> 
> Exactly, but that is the problem here. How to generate the correct text 
> metric data for baselining from a .ttf file given that it appears it 
> can contain conflicting and/or not Open/TrueType spec compliant 
> information?

TeX does indeed not know anything about TrueType fonts, or about any
font for that matter. TeX has a strict separation between layout and
rendering. TeX creates the layout in a dvi file, renderers do the
rendering, e.g. a dvi viewer, the dvi to PS converter. PdfTeX does
both, however.

The knowledge about TrueType font metrics resides in the utilities
that generate TeX font metrics (tfm files) from the ttf metric files. I
do not remember which utility does that; the freetype library is very
popular in those areas. In my notes I find the following tools:

ttf2tfm, ttf2pk, ttf2afm, ttf2pfb, ttf2pt1. And an article 'Using
TrueType fonts with teTEX and dvips'. All on the TeXLive7 cdrom (a few
years old now); I suppose the most recent TeXLive distribution has the
same or similar tools.

ttf2tfm does the metrics conversion.

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Reply via email to