At 04:36 PM 1/24/2002 +0100, Taco Hoekwater wrote:
>On Thu, 24 Jan 2002 14:45:25 +0100
>"Hans Hagen" <[EMAIL PROTECTED]> wrote:
>
> > sure, but the main problem is that one cannot ask the filesystem what 
> fonts
> > there are (try to open a font file from within tex); also, building this
> > into context only for cmr is not worth the trouble and slowing down 
> overhead
>
>Well, actually, this works ...
>
>\newif\iffontexists
>
>\def\testfont#1{{\batchmode
>   \global\fontexistsfalse
>   \font\junk=#1\junk
>   \ifdim\fontdimen5\junk>0pt
>     \global\fontexiststrue
>   \fi }}
>
>\testfont{cmr10 }
>\testfont{cmmmr10 }

i know -)

actually i had this for some time (and in font-ini.tex there is still the 
leftover:)

%  safer but sometimes introducing newlines in the log
%
%  \batchmode
%  \font\lastloadedfont\fontfile\somefontspec\relax
%  \errorstopmode
%  \edef\lastfontname{\fontname\lastloadedfont}%
%  \ifx\lastfontname\nullfontname
%    \showmessage{\m!fonts}{10}{\fontfile}%
%    \expandafter\font\csname#1\endcsname=\defaultfontfile\somefontspec\relax
%  \else
%    \expandafter\let\csname#1\endcsname\lastloadedfont
%  \fi

as commented: newlines in th elog, and i hate an ungly  log

a pitty that a decent test didn't make it into etex

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-pod.nl
-------------------------------------------------------------------------

Reply via email to