From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21280 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Why does ConTeXt try to load Latin Modern? Date: Fri, 08 Jul 2005 16:38:25 +0200 Message-ID: <42CE8FE1.3050604@wxs.nl> References: <129725119.20050706140210@iol.it> <20050706121813.6608@mail.comp.lancs.ac.uk> <42CBD4F0.4070401@wxs.nl> <627880484.20050706154858@iol.it> <42CBFB57.3000605@wxs.nl> <1192348060.20050706193909@iol.it> <42CC1CE9.2060106@wxs.nl> <42CC203F.3030307@elvenkind.com> <1029219557.20050706225830@iol.it> <42CC4EF2.5050002@wxs.nl> <01647009.20050707105018@iol.it> <42CD308B.3010208@wxs.nl> <20050707194042.12563@mail.comp.lancs.ac.uk> <1658238530.20050708101101@iol.it> <20050708100433.9242@mail.comp.lancs.ac.uk> <1937060797.20050708133922@iol.it> <20050708130338.948@mail.comp.lancs.ac.uk> <42CE7C35.1010307@wxs.nl> <42CE7E99.6040905@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120833586 3968 80.91.229.2 (8 Jul 2005 14:39:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2005 14:39:46 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 08 16:39:36 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dqtzc-0000k9-JZ for gctc-ntg-context-518@m.gmane.org; Fri, 08 Jul 2005 16:38:16 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3937512885; Fri, 8 Jul 2005 16:38:16 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13417-07; Fri, 8 Jul 2005 16:38:12 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7CAB412881; Fri, 8 Jul 2005 16:38:12 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B959F12881 for ; Fri, 8 Jul 2005 16:38:11 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13306-05 for ; Fri, 8 Jul 2005 16:38:10 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id C54801287C for ; Fri, 8 Jul 2005 16:38:10 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j68Ec685011086 for ; Fri, 8 Jul 2005 16:38:06 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 8DD6B31212; Fri, 8 Jul 2005 16:02:09 +0200 (CEST) Original-Received: from [10.100.1.53] (unknown [10.100.1.53]) by server-1.pragma-net.nl (Postfix) with ESMTP id 38A1318EF3 for ; Fri, 8 Jul 2005 14:02:08 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <42CE7E99.6040905@elvenkind.com> X-Virus-Scanned: ClamAV 0.86.1/971/Thu Jul 7 12:08:01 2005 on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21280 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21280 Taco Hoekwater wrote: > > Or you could do something like this: > > \def\doiffontelse#1#2#3{% > \batchmode \font\klutch=#1 \errorstopmode > \ifdim \the\fontdimen5\klutch < 1pt #3\else #2\fi > \let\klutch\relax > } > > \doiffontelse{ec-lmr10} > {\message{Up-to-date}} > {\message{Please install lmr}} > > > It gives an ugly error in the log file if the font is not found, > but that is a only a minor inconvenience. I remember that long ago taco and i had some discussion about testing stuff in font-ini, here is a residu, still in font-ini.tex: %D Some unused left||overs: %D %D \starttyping %D \def\doiffontpresentelse#1#2#3% %D {\bgroup %D \batchmode\font\dummy=\truefontname{#1}\errorstopmode %D \edef\lastfontname{\fontname\dummy}% %D \ifx\lastfontname\nullfontname\egroup#3\else\egroup#2\fi} %D %D \def\abortiffontnotfound#1% %D {\doiffontpresentelse{#1}{}{\showmessage\m!fonts{10}{\truefontname{#1}}\endinput}} %D \stoptyping a more modern definition is: \def\doiffontpresentelse#1% {\bgroup \batchmode\font\dummy=\truefontname{#1}\errorstopmode \edef\lastfontname{\fontname\dummy}% \ifx\lastfontname\nullfontname \egroup\expandafter\secondoftwoarguments \else \egroup\expandafter\firstoftwoarguments \fi} and more etex is: \def\doiffontpresentelse#1% {\bgroup \scratchcounter\interactionmode \batchmode \font\dummy=\truefontname{#1}\relax \interactionmode\scratchcounter \edef\lastfontname{\fontname\dummy}% \ifx\lastfontname\nullfontname \egroup\expandafter\secondoftwoarguments \else \egroup\expandafter\firstoftwoarguments \fi} thsi works ok with: \doiffontpresentelse{texnansi-lmr10}{YES}{NO} \doiffontpresentelse{adam-lindsay-modern-serif}{YES}{NO} i'll add them (again) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------