Re: [NTG-context] font lookup
When you know the filename, you can get the complete path like this: \starttext \ctxlua{tex.print(resolvers.find_file(texgyrepagella-regular.otf)) } \stoptext Your question is now answered but why do you need the complete path? Wolfgang I want to modify an example from Patrick (Eigenen Fontloader erstellen) in his blog. I hope I will learn a little from this. 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 ___
Re: [NTG-context] font lookup
Am 06.04.10 07:20, schrieb Peter Münster: When you know the filename, you can get the complete path like this: \starttext \ctxlua{tex.print(resolvers.find_file(texgyrepagella-regular.otf))} \stoptext Your question is now answered but why do you need the complete path? 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 ___
[NTG-context] font lookup
Hallo, 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) 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 ___
Re: [NTG-context] font lookup
Am 05.04.10 23:52, schrieb Wolfgang Werners-Lucchini: Hallo, 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 Font not found Path: /Library/Fonts/Times New Roman.ttf 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 ___
Re: [NTG-context] font lookup
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 ___
Re: [NTG-context] font lookup
On Tue, Apr 06 2010, Wolfgang Werners-Lucchini wrote: Result (on my system): Path: texgyrepagella-regular.otf Hmm! How does context resolve the complete path afterwards? Hello Wolfgang, When you know the filename, you can get the complete path like this: \starttext \ctxlua{tex.print(resolvers.find_file(texgyrepagella-regular.otf))} \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___