[XeTeX] Re: Mathtime fonts

Paul Edney edney at northwestern.edu
Mon Sep 6 17:51:42 CEST 2004


>On Sat, 4 Sep 2004 23:29:34 +0100, Jonathan Kew wrote:
>
>On 4 Sep 2004, at 10:02 pm, Paul Edney wrote:
>
>  > Perhaps I should remove the fink one anyway.  I initially installed it
>  > for some other GNU package, but perhaps I can symlink the fink one to
>  > Gerben's.  But I'd rather change only one thing at a time for now.
>  >
>  >
>  >> How did you generate .otf files from the .pfb ones? Creating .otf
>  >> files that will work right with XeTeX can be a bit of a hassle, and I
>  >> haven't gotten everything documented nicely yet. (Sorry!)
>  >>
>  >> Did you do this for the CM fonts (if so, why? the XeTeX installer
>  >> should have provided them), or only for the MathTime ones?
>  >>
>  >
>  > I converted the mac font using CMacTeX's 'lwfn2pfb' script. This
>  > conversion seems to work fine, as these fonts do render in LaTeX, but
>  > are 'not found' in XeTeX.  To convert them to otf, I opened the .pfb
>  > files (mtex.pfb, mtsy.pfb, and rmtmi.pfb) in fontforge and generated
>  > the Open Type (CFF) with an .otf extension.  I also tried Open Type
>  > (Mac Font) and removed the '.dfont' part of the '.otf.dfont'
>  > extension.  With the Mac Font version, XeTeX reports 'not found' and
>>  the display is completely blank (no +,-, and parentheses here).
>
>When you say they're "not found in XeTeX", I assume you're getting a
>message such as
>
>	*** font mtex (MTEX: file 'mtex') not found

yes.  I should have given a verbatim quote.  My bad, sorry.


>printed on the console? This is coming from xdv2pdf rather than from
>xetex itself, as that's the process that needs access to the actual
>glyphs; the xetex formatting process depends only on the TFMs.
>
>>  I didn't touch the CM fonts at all. Only the 3 mathtime fonts I
>>  mentionned above.
>
>OK. Do plain CM examples (such as "CM-test.tex" from the XeTeX Sample
>Files archive) work?
>


yes, they do, both in XeTeX and LaTeX.

I read on some list (I'll try to find the exact reference again) that 
Gerben's distribution actually substitutes CM for another font.  As 
far as I can tell, it _is_ CM that is displayed on my screen, not 
some substitute.  Furthermore, the output from LaTeX and XeTeX are 
identical.  But then again, I have the CM-super package installed as 
well.



>  >
>>  there is no explicit encoding, as in, for example:
>>  cmtex10 CMTEX10 " TeXd9b29452Encoding ReEncodeFont " <d9b29452.enc
>>  <cmtex10.pfb
>
>With no explicit encoding, it's kind of a lottery as to whether you'll
>get the right glyphs; XeTeX (or rather xdv2pdf), generating PDF through
>CoreGraphics, has to take the character codes from your document and
>draw glyphs that it identifies by glyph ID within the font. But without
>a .enc file, it doesn't have knowledge of the encoding vector that was
>supposed to be used. For many of the fonts I converted to .otf, I was
>able to arrange the conversion so that there's a simple character/glyph
>correspondence, but this may not always work out so well.
>
>So I'm guessing that one reason only a few characters show up is that
>the .otf fonts don't have the glyphs in the order xdv2pdf is expecting
>(or guessing). An .enc file would probably help....except that there's
>probably no 'name' table in these .otf fonts either, and so xdv2pdf
>would be unable to apply it.


It this to mean that Gerben's LaTeX and TeXshop don't use xdv2pdf at 
all to generate their pdf's?  If I use LaTeX with Mathtime and 
TeX+ghostscript instead of PDFtex, and then use dvipdf on the .dvi 
(note, not .xdv) file, then the characters still display correctly in 
the pdf document.

Obviously I'm way out my league here, but could there be a 
fundamental difference in the way .xdv and .dvi are encoded (i.e., 
more than just an 'extension' of dvi, as the 'x' implies).  And by 
association, do xdv2pdf and dvipdf read fonts in fundamentally 
different ways?



>If I learned enough about FontForge, maybe I could come up with a
>.pfb->.otf script that handles these issues..... or if I thoroughly
>documented what xdv2pdf is doing, maybe someone else would deal with
>it. It's all just a question of time.....
>
>>  I'm guessing (very wildly) from Bruno's message below that this
>>  reencoding step might have an effect.  Btw, Bruno, I used to use
>>  mathtime on textures through ATM, so the fonts were never in the
>>  system folder.  But why would TeX search the classic folder for fonts
>>  in the first place?  Did I misunderstand you?  Should I _also_ copy
>>  the original mathtime fonts to the system folder, or at least activate
>>  them with fontbook?
>>
>>  Also, could Bruno's note about the hybrid mathtime explain why +, -,
>>  \ldots, and parentheses (of all sizes) render, but nothing else?
>
>Maybe; I don't fully understand what that's about. I wonder if it's
>simply a character/glyph mapping problem, though.
>


Jonathan, is adding these tables manually to an otf font doable for 
the non-font-expert, and if so, do you have a reference as to how 
these tables are encoded so I might give it a shot for mathtime?


>  >
>>  so technically it would be incorrect to think
>>  XeTeX = ( LaTeX + additional_font_engines ), right?
>
>XeTeX = TeX (e-TeX, actually) + Unicode + additional font support + PDF
>output (via xdv2pdf)
>
>But xdv2pdf does *not* support all the same font formats (in
>particular, .vf and .pfb, and bitmap fonts) as standard DVI drivers or
>pdfTeX.
>
>So roughly speaking, XeLaTeX = LaTeX + Unicode + Apple fonts -
>.vf/.pfb/.pk fonts.
>

neat! thanks for clarifying.  Which reminds me: all my files are 
saved as UTF-8 in TeXshop, FWIW.

--Paul



More information about the XeTeX mailing list