From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57890 Path: news.gmane.org!not-for-mail From: "Wolfgang Werners-Lucchini" Newsgroups: gmane.comp.tex.context Subject: Re: font lookup Date: Tue, 06 Apr 2010 02:24:29 +0200 Message-ID: <4BBA9B5D.17209.26E69C4@wwl.musensturm.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1270513359 24976 80.91.229.12 (6 Apr 2010 00:22:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Apr 2010 00:22:39 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 06 02:22:38 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NywYw-0000lI-86 for gctc-ntg-context-518@m.gmane.org; Tue, 06 Apr 2010 02:22:38 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6118AC9FF6; Tue, 6 Apr 2010 02:22:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KJE3lT+hA4bw; Tue, 6 Apr 2010 02:22:33 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4FECBC9FF2; Tue, 6 Apr 2010 02:22:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 858B0C9FF2 for ; Tue, 6 Apr 2010 02:22:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pqoQCTiwyqps for ; Tue, 6 Apr 2010 02:22:28 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by balder.ntg.nl (Postfix) with ESMTP id 81413C9FEF for ; Tue, 6 Apr 2010 02:22:28 +0200 (CEST) Original-Received: from [192.168.178.23] (p4FC79802.dip0.t-ipconnect.de [79.199.152.2]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MdqUD-1OBDgs3nB7-00QKc7; Tue, 06 Apr 2010 02:22:28 +0200 Priority: normal In-reply-to: X-mailer: Pegasus Mail for Windows (4.41, DE v4.41 R1) Content-description: Mail message body X-Provags-ID: V01U2FsdGVkX18BwQdXzqaa0Dopehf2Ti0m72a2abdtuTA9by2 JQuFu7T4uj0sfKFvaUyfAK9jNjtcCug/8Jfh/UqHm5Ac6MS7zQ P1S+L1NofyOP3gsDjrU7w== X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:57890 Archived-At: Thank you Wolfgang, > > how can I find the complete path of a existing font > > with luatex under context mkiv. I am looking for an > > equivalent function to > > > > kpse.lookup(fontname) > > > Here is a solution which consults ConTeXt?s font database, no path > in the output means the font is stored in the TeX tree. > > Example: > > \define[1]\FontLookup > {\dolookupfontbyspec{#1} > \ifcase\dolookupnoffound > Font not found\par > \else > Path: \dolookupgetkey{filename}\par > \fi} > > \starttext > \FontLookup{fontname=texgyrepagellaregular} > \FontLookup{fontname=texgyrepagellaoblique} > \FontLookup{fontname=timesnewromanpsmt} > \stoptext > > Result (on my system): > > Path: texgyrepagella-regular.otf Hmm! How does context resolve the complete path afterwards? > Font not found > Path: /Library/Fonts/Times New Roman.ttf Isn't there a lua solution? Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________