You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Gennadiy Tsarenkov <g....@sam-solutions.net> on 2006/05/17 09:47:46 UTC

Re[2]: svn commit: r406917 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/truetype/TTFFile.java status.xml

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.

Neither TeX or LaTeX understand TTF fonts. They used much more complex
(and  thus  much  more  flexible)  font  system  comparing to the FOP.
Anyway,  for  correct  baseline-ing it requires only text metric files
for any used font to be present. At the translation moment it converts
text  metric  files  into binary representation to speed up generation
procedure.  Real  font  files  are  used  only  in rendering driver to
consider  various  device  resolutions.  So,  to  compare  FOP and TeX
baseline behavior it would be enough to compare metric files.

As  you  know,  we  were working on MathML rendering using JEuclid. In
order  to solve the baseline problem (and not only base line, there is
bigger   problem  with  some  TrueType  fonts  when  you  try  to  put
superscript  or  subscript  after the italic text) we modified the FOP
metric  files.  Within  next  couple  of days I'll release JEuclid 3.0
which uses updated metrics. May be this would help you to decide which
way this baseline have to be solved.

-- 
Best regards,
 Gennadiy                            mailto:g.tsarenkov@sam-solutions.net


Re: svn commit: r406917 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/truetype/TTFFile.java status.xml

Posted by Simon Pepping <sp...@leverkruid.eu>.
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

Re: svn commit: r406917 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/truetype/TTFFile.java status.xml

Posted by Manuel Mall <mm...@arcus.com.au>.
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?

Manuel