2

eiad is a font from a different era, and seemingly almost unusable today. I can't use it at all with XeLaTeX, and when I begrudgingly tried to use it with pdflatex, I get only an ugly rasterization, no outlines to be seen.

ex

It has been stated elsewhere that METAFONT fonts are usable with XeLaTeX—and please correct me if I'm wrong—but this seems to only be true of popular fonts that have been converted, not forgotten fonts on the margins like Eiad.

I even found a paper from 2004 (Karel Píška, “Creating Type 1 Fonts from METAFONT Sources”) which states unequivocally:

To do fully automatic conversion of a perfect METAFONT glyph definition into perfect Type 1 outline curves is very difficult at best, perhaps impossible.

You might say, “Why not just use an OpenType font?”, to which I reply, the Eiad fonts are all extremely beautiful and go well together, there are even italics and a typewriter style, there are proper bold and smallcap faces.

I don't want another font. I want Eiad, exactly Eiad, and nothing else. With that in mind, what should I do to get vectors out of it in 2019? How should I start converting it? Why can't XeLaTeX use it at all if it allegedly can use METAFONT fonts?

  • You could try porting the font from METAFONT to METATYPE1. – Henri Menke May 8 '19 at 5:53
  • If the final output is going to be rasters (e.g. you're going to print out the document, or view it on a specific screen at a fixed size), then I'd recommend not trying to get vector output (that leaves the rasterization up to some other device) and instead use METAFONT the way it is designed and intended, i.e. produce raster fonts tailored for the resolution where the fonts will be used. It's only if your document is going to be viewed on unknown low-resolution devices like computer monitors at unknown zoom settings (which admittedly is common today) that you should try to get vector fonts. – ShreevatsaR May 8 '19 at 15:37
  • @ShreevatsaR Unfortunately I have no need to print to paper, it was for web distribution, which has the problem you mentioned. I had no idea METAFONT was limited in this way, so many good old fonts are only for printing now that screen DPI is no longer guaranteed to be around 96. – Fredrick Brennan May 9 '19 at 7:23
  • METAFONT was designed for output to a high-resolution device (originally, a commercial typesetter with a resolution of over 5000 dpi). It also works decently with typical modern printers (600 dpi, 1200 dpi). Screens are still much lower resolution, but it also works fine on screens if you know the zoom level in advance. (Ultimately your PDF viewer is going to have to rasterize anyway, and METAFONT is better at it than your PDF viewer.) Of course all this is useless for the case where you want to distribute something for others to read on their screens at various zoom levels. – ShreevatsaR May 9 '19 at 8:30
2

xelatex can handle metafont fonts. But you can't use fontspec to load it, you must do it in the legacy tex way and as eiad has only support for OT1 you need to switch to this encoding:

\documentclass{article}

\begin{document}
\fontencoding{OT1}\fontfamily{eiad}\selectfont
some text in eiad 
\end{document}

enter image description here

But ...

This has the same problem as pdflatex: the font is a raster font. And it has the additional problem that OT1 is not the correct encoding for xelatex.

So you should do two things if you want to use the fonts with xelatex:

  • convert the glyphs to vector shapes, see https://texfaq.org/FAQ-textrace for hints (perhaps there are newer tools somewhere
  • make a unicode encoded open type font from it, e.g. with fontforge so that you can use it with fontspec.
  • Can I mix OT1 Eiad with regular fontspec fonts in XeLaTeX? – Fredrick Brennan May 8 '19 at 8:39
  • Sure. You only need to keep the font switching command local. But hyphenation can be wrong (but it won't work well in OT1 anyway if you use accents as shown in your example). – Ulrike Fischer May 8 '19 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.