Discussion:
Query : prevent XeTeX from trying to create any font-related files
(too old to reply)
Philip Taylor (RHUoL)
2018-03-30 16:43:20 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I am working over a slow and unreliable remote desktop connection
to a colleague's computer who needs to be able to replicate my
work on the Lambeth Palace Catalogue of Greek MSS.  At the moment,
his system lacks some of the required fonts, but trying to
identify exactly <i>which </i>fonts are lacking is proving very
difficult, because rather than simply reporting that a certain
font cannot be found, XeTeX is trying to create TFM, MF, and
whatever files for the missing fonts.  This appears to take an
eternity, and it may even have hung.  The last part of the console
log reads as follows :</p>
<p>
<blockquote type="cite">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output
written on Master.pdf (552 pages).<br>
SyncTeX written on Master.synctex.gz.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transcript
written on Master.log.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Gill Sans MT Condensed:color=BF0000',
contains ' '</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Gill Sans MT Condensed:color=BF0000',
contains ' '</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Gill Sans MT Condensed:color=FFFFFE00',
contains ' '</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Traditional Arabic', contains ' '</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Traditional Arabic', contains ' '</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:
Running mktextfm Optima</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">The
command name is
C:\Users\Public\TeX\Live\2018\bin\win32\mktextfm</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:
Appending font creation commands to missfont.log.</p>
</blockquote>
</p>
<p>Now it is completely unclear to me why XeTeX is trying to create
TFM/MF/whatever files at all, since all fonts are referenced using
the quoted-string syntax that indicate to XeTeX that these are
system (Truetype/Opentype) fonts, not TeX fonts with associated
TFM/MF/whatever files.  However, I am less concerned with <i>why</i>
it is trying to create these files than I am in simply inhibiting
the behaviour.  May I therefore ask the <i>cognoscenti </i>how I
can prevent XeTeX from trying to create any font-related files at
all ?  Please note that XeTeX is being launched from TeXworks,
which may restrict the set of possible solutions.</p>
<p>Many thanks in advance :<br>
Philip Taylor<br>
</p>
</body>
</html>
Jonathan Kew
2018-03-30 17:34:28 UTC
Permalink
Post by Philip Taylor (RHUoL)
kpathsea: Running mktextfm Optima
The command name is C:\Users\Public\TeX\Live\2018\bin\win32\mktextfm
kpathsea: Appending font creation commands to missfont.log.
Now it is completely unclear to me why XeTeX is trying to create
TFM/MF/whatever files at all, since all fonts are referenced using the
quoted-string syntax that indicate to XeTeX that these are system
(Truetype/Opentype) fonts, not TeX fonts with associated TFM/MF/whatever
files.
IIRC (it's been a long time) quoting the name is not an absolute switch;
it's treated as a hint to look first for a system font by that name, and
only fall back to trying it as a TFM name if not found.
Post by Philip Taylor (RHUoL)
  However, I am less concerned with /why/ it is trying to create
these files than I am in simply inhibiting the behaviour.  May I
therefore ask the /cognoscenti /how I can prevent XeTeX from trying to
create any font-related files at all ?
I haven't tried it, but my impression is that setting

MKTEXTFM = 0

in texmf.cnf (or maybe as an environment variable? not sure...) should
disable the attempt to automatically create missing TFMs, which is what
is happening here.

JK
Philip Taylor (RHUoL)
2018-03-30 17:57:16 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Jonathan Kew wrote:<br>
</div>
<blockquote type="cite"
cite="mid:609edcb3-b0c7-7969-e25c-***@gmail.com"><br>
IIRC (it's been a long time) quoting the name is not an absolute
switch; it's treated as a hint to look first for a system font by
that name, and only fall back to trying it as a TFM name if not
found.
<br>
</blockquote>
Ah, had not realised that ...<br>
<blockquote type="cite"
cite="mid:609edcb3-b0c7-7969-e25c-***@gmail.com">I
haven't tried it, but my impression is that setting
<br>
<br>
MKTEXTFM = 0
<br>
<br>
in texmf.cnf (or maybe as an environment variable? not sure...)
should disable the attempt to automatically create missing TFMs,
which is what is happening here.<br>
</blockquote>
OK, many thanks, will try that.  In the meantime I tried "XeTeX
--help" and found amongst the output the following :<br>
<br>
<blockquote type="cite">[-no]-mktex=FMT         disable/enable
mktexFMT generation (FMT=tex/tfm)</blockquote>
<br>
so that may be an alternative, and one which I can implement in
TeXworks configuration interface (always easier than trying to work
out exactly <i>which </i>version of "texmf.cnf" I should edit !). 
Unfortunately my colleague has logged back in in the meantime, so I
will need to wait a while to test.<br>
<br>
Incidentally, I know that you (Jonathan) are no longer actively
maintaining XeTeX, but may I ask whether you consider it would be
(relatively) straightforward to extend the syntax of the "color"
attribute of the "\font" command to accept colour models rather than
assume (and accept) only RGB expressed as six hex digits ?  I ask
because I find that whereas Fileprint.org handle my RGB fonts OK, my
local printing company do not, and it would be helpful to be sure
that I am generating CMYK font calls rather than RGB.  In my last
print job, which I have had to send off to Fileprint because the
local results were so bad, all emboldening was lost and my deep red
and deep green (220000 &amp; 002200) came out virtually black :-(<br>
<br>
** Phil.<br>
<br>
</body>
</html>
Zdenek Wagner
2018-03-30 18:48:19 UTC
Permalink
Post by Jonathan Kew
IIRC (it's been a long time) quoting the name is not an absolute switch;
it's treated as a hint to look first for a system font by that name, and
only fall back to trying it as a TFM name if not found.
Ah, had not realised that ...
I haven't tried it, but my impression is that setting
MKTEXTFM = 0
in texmf.cnf (or maybe as an environment variable? not sure...) should
disable the attempt to automatically create missing TFMs, which is what is
happening here.
OK, many thanks, will try that. In the meantime I tried "XeTeX --help"
[-no]-mktex=FMT disable/enable mktexFMT generation (FMT=tex/tfm)
so that may be an alternative, and one which I can implement in TeXworks
configuration interface (always easier than trying to work out exactly *which
*version of "texmf.cnf" I should edit !). Unfortunately my colleague has
logged back in in the meantime, so I will need to wait a while to test.
You can try on your own computer, just make a tiny test file which requests
o nonsense font which is not available in your system.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
Philip Taylor (RHUoL)
2018-03-30 18:57:13 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"> </head> <body text="#000000" bgcolor="#FFFFFF"> <p><br> </p> <br> <div class="gmail_quote">Zdenek Wagner wrote: <div><br> </div> <div>&gt; You can try on your own computer, just make a tiny test
file which requests o nonsense font which is not available in
your system.<br>
<br>
Good idea.  Unfortunately adding "-no-mktex=tfm" and
"-no-mktex=tex" did not help :  here follow the beginning of the
source file and the beginning and end of the console log :<br>
<br>
\magnification 1750 % 1830 % This should set only body-font,
body-font related fonts and leading
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\font
\nonsensefont = "Not really a font at
all":color=224466;embolden=2;slant=-0.2</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">\nonsensefont</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">...<br>
</p>
<br>
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live
2018/W32TeX) (preloaded format=xetex)
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
restricted \write18 enabled.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">entering
extended mode</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">(./Menu-2018.tex</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">! Font
\nonsensefont="Not really a font at
all:color=224466;embolden=2;slant=-0</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">.2"
not loadable: Metric (TFM) file or installed font not found.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;to
be read again&gt; </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">
\nonsensefont </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">l.4
\nonsensefont</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">? </p>
<br>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output
written on Menu-2018.pdf (15 pages).</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">SyncTeX
written on Menu-2018.synctex.gz.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Transcript
written on Menu-2018.log.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">kpathsea:make_tex:
Invalid filename `Not really a font at
all:color=224466;embolden=2;slant=-0', contains ' '</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;"><br>
</p>
</div>
</div>
<br>
</body>
</html>
Philip Taylor (RHUoL)
2018-03-30 19:15:37 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Whereas Jonathan's environment variable idea worked a treat.  But
then I realised that command-line qualifiers that <i>follow</i>
the file name are not identified as such, so I promoted them to
the beginning of the parameter/qualifier list and now all works
fine.  Many thanks everyone.</p>
<p>** Phil.<br>
</p>
</body>
</html>
Ulrike Fischer
2018-03-30 19:19:14 UTC
Permalink
Post by Philip Taylor (RHUoL)
Unfortunately adding "-no-mktex=tfm" and
--no-mktex=tfm works for me.

mktextfm is not called.
Post by Philip Taylor (RHUoL)
2" not loadable: Metric (TFM) file or installed font not found.
Well naturally you still get an error. If a font is not found what
else should xetex do?
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
Philip Taylor (RHUoL)
2018-03-30 19:26:08 UTC
Permalink
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
Ulrike Fischer wrote:<br> <br> <span style="white-space: pre-wrap; display: block; width: 98vw;">&gt; not loadable: Metric (TFM) file or installed font not found.
&gt;
&gt; Well naturally you still get an error. If a font is not found what
&gt; else should xetex do?


</span><br>
Report the fact, of course; but that was not the question -- it was
why XeTeX was trying to create TFMs/MFs/whatever for what was
flagged as a system font using the string-quote syntax.  The
significant line was the very last :<br>
<br>
<blockquote type="cite">kpathsea:make_tex: Invalid filename `Not
really a font at all:color=224466;embolden=2;slant=-0', contains '
'</blockquote>
<br>
Philip Taylor<br>
<br>
</body>
</html>
Karl Berry
2018-03-30 21:07:13 UTC
Permalink
FWIW, pretty much everything in texmf.cnf can be overridden by envvars
of the same name. In Bourne syntax:

MKTEXTFM=0; export MKTEXTFM
MKTEXPK=0; export MKTEXPK
MKTEXMF=0; export MKTEXMF
MKTEXFMT=0; export MKTEXFMT

(As I recall, nothing enables the other MKTEX* by default.)

Loading...