From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33093 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XeTeX and OpenType LM Date: Fri, 02 Feb 2007 09:26:06 +0100 Message-ID: <45C2F59E.1010804@wxs.nl> References: <6faad9f00701302044o5172093ay9510e345dc019ce3@mail.gmail.com> <45C078E0.8080003@wxs.nl> <6faad9f00701310858q5c2792aft3774199f01a33af1@mail.gmail.com> 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: sea.gmane.org 1170404786 10676 80.91.229.12 (2 Feb 2007 08:26:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2007 08:26:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 02 09:26:20 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HCtkR-0006jn-Tq for gctc-ntg-context-518@m.gmane.org; Fri, 02 Feb 2007 09:26:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CA6D8DA; Fri, 2 Feb 2007 09:25:50 +0100 (CET) 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 11778-01; Fri, 2 Feb 2007 09:25:45 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0A50CE; Fri, 2 Feb 2007 09:25:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4A6BDCE for ; Fri, 2 Feb 2007 09:25:43 +0100 (CET) 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 10491-03-2 for ; Fri, 2 Feb 2007 09:25:41 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 15713AB for ; Fri, 2 Feb 2007 09:25:40 +0100 (CET) Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 6739 for ; Fri, 02 Feb 2007 09:26:09 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) In-Reply-To: <6faad9f00701310858q5c2792aft3774199f01a33af1@mail.gmail.com> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:33093 Archived-At: Mojca Miklavec wrote: > ... much much text .. begging for []'s ... > How about this ... no quotes in specs, only file: or name: in front of the name, and for xetex we default to filenames using file: It means that existing defs need to be adapted, but this syntax is better than funny " [ ] etc and more extensible (i can intercept the prefixes in luatex and treat them accordingly) \unprotect \def\donoparsefontspec % #1 == \cs {\edef\fontfile{\truefontname\somefontname}% \ifx\fontfile\s!unknown \let\fontfile\defaultfontfile \fi \checkfontfilename \edef\lastfontname{\fontfile\somefontspec}% \ifx\fontclass\empty \expandafter\definefontlocal \else \expandafter\definefontglobal \fi} % #1 == \cs \ifnum\contextmarkmode=4 \let\checkfontfilename\relax \else \def\checkfontfilename {\expandafter\docheckfontfilename\fontfile:\empty:\empty\relax} \def\docheckfontfilename#1:#2:#3#4\relax {\edef\temp{#1}% \ifx\temp\v!file \edef\fontfile{\fontfilefile{#2}}% \else\ifx\temp\v!name \edef\fontfile{\fontfilename{#2}}% \else \edef\fontfile{\fontfilesome{#2}}% \fi\fi} \def\fontfilename#1{"#1"} \def\fontfilefile#1{"#1"} \def\fontfilesome#1{"#1"} \beginXETEX \def\fontfilename#1{"#1"} \def\fontfilefile#1{"[#1]"} \def\fontfilesome#1{"[#1]"} \endXETEX \fi \protect \starttext \definefont [blabla] [name:Latin Modern Something] \definefont [blabla] [file:texnansi-lmr10] \blabla test \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------