# XeLaTeX ttf font support

Watertank is some ttf font that I got from one of those cheap fonts CDs. I know it is installed in my system because I can use it in other programs; but when I use it in XeLaTeX (which works with other Windows fonts) XeLaTeX complains. The command is

``````\newfontface\hmathscr{Watertank}
``````

And the message is:

(C:\ProgramsToo\MiKTeX\tex\latex\oberdiek\rerunfilecheck.sty)))Running miktex-makemf.exe... miktex-makemf: The Watertank source file could not be found.

Running hbf2gf.exe...

hbf2gf (CJK ver. 4.8.0)

Couldn't find `Waterta.cfg'

miktex-maketfm: No creation rule for font Watertank.

! Font \zf@basefont=Watertank at 10.0pt not loadable: Metric (TFM) file or inst alled font not found. \scan_stop: l.23 \newfontface\hmathscr{Watertank}

If I try to use the file name (by giving Watertank.ttf), I get the following error message

xelatex.exe: Broken pipe

I tried refreshing the font cache, with fc-cache -fv, it does not work either. I tried with -output-driver=xdvipdfmx, with -output-driver=xdv2pdf, with --no-pdf

MiKTeX-XeTeX 2.9.3971 (0.9997.4) (MiKTeX 2.9)

Do I have to "prepare" the font besides installing it?

EDIT 1:

(Thanks Will Robertson) Running "xetex -no-pdf s.tex" on

``````\font\1="Watertank"\1 hello
\bye
``````

gives the same message as before.

Running "xetex -no-pdf s.tex" on

``````\font\1="[Watertank.ttf]"\1 hello
\bye
``````

produces the xdv file. The subsequent "xdvipdfmx -vv s.xdv" crashes on Windows 7 but leaves the following message

DVI Comment: XeTeX output 2011.01.16:1738 s.xdv -> s.pdf [1<C:/Windows/Fonts/Watertank.ttf@9.96pt fontmap: [C:/Windows/Fonts/Watertank.ttf]/H/65536/0/0 -> C:/Windows/Fonts/Watert ank.ttf(Identity-H)

pdf_font>> Input encoding "Identity-H" requires at least 2 bytes. pdf_font>> The -m <00> option will be assumed for "C:/Windows/Fonts/Watertank.ttf".

What is the -m option?

-

Sounds like a problem with the font if you have no trouble loading other fonts in the same way. (I've had troubles with such fonts before.) Create a minimal example in plain TeX with

``````\font\1="Watertank"\1 hello
\bye
``````

or

``````\font\1="[Watertank.ttf]"\1 hello
\bye
``````

and compile the document with

``````xetex -no-pdf «filename»
xdvipdfmx -vv «filename»
``````

to verify that it's the font that causes the problem, and if these still fail you might be able to debug the problem further by sending the info to the XeTeX mailing list. Not much we can do here, I'm afraid.

-