From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33099 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: XeTeX and OpenType LM Date: Fri, 2 Feb 2007 14:23:57 +0100 Message-ID: <6faad9f00702020523i7f10b847j52a9bf8e74c2e634@mail.gmail.com> References: <6faad9f00701302044o5172093ay9510e345dc019ce3@mail.gmail.com> <45C078E0.8080003@wxs.nl> <6faad9f00701310858q5c2792aft3774199f01a33af1@mail.gmail.com> <45C2F59E.1010804@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170423145 11629 80.91.229.10 (2 Feb 2007 13:32:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2007 13:32:25 +0000 (UTC) Cc: Jonathan Kew To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 02 14:32:17 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 dough.gmane.org with esmtp (Exim 4.50) id 1HCyWT-0007ss-V8 for gctc-ntg-context-518@m.gmane.org; Fri, 02 Feb 2007 14:32:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C3471B3; Fri, 2 Feb 2007 14:26:39 +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 07403-01; Fri, 2 Feb 2007 14:26:38 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EDED218E; Fri, 2 Feb 2007 14:23:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 22F6C18E for ; Fri, 2 Feb 2007 14:23:34 +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 07009-10 for ; Fri, 2 Feb 2007 14:23:30 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by ronja.ntg.nl (Postfix) with ESMTP id 151CC188 for ; Fri, 2 Feb 2007 14:23:29 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id k27so1043107nfc for ; Fri, 02 Feb 2007 05:23:59 -0800 (PST) Original-Received: by 10.49.28.3 with SMTP id f3mr6383352nfj.1170422637473; Fri, 02 Feb 2007 05:23:57 -0800 (PST) Original-Received: by 10.48.209.2 with HTTP; Fri, 2 Feb 2007 05:23:57 -0800 (PST) In-Reply-To: <45C2F59E.1010804@wxs.nl> Content-Disposition: inline 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:33099 Archived-At: On 2/2/07, Hans Hagen wrote: > 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: I would default to "name:" > 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 Great! I need to try to run these, but I like the syntax. Although it would probably make sense to default to "name" (so: no brackets, \def\fontfilesome#1{"#1"}) under XeTeX. Those fonts that come as .otf are relatively rare and for those (I have Polish fonts in mind) ConTeXt can provide ready typescripts with "file:" prefix. I assume that for most users it would be an overhead having to write "name:" for each single font that they want to use, and most such fonts are probably installed on the system. There is one more thing though. I'm taking these from Adam's notes on the wiki: \definefontsynonym [DidotCaps] ['Didot:mapping=tex-text; Letter Case=Small Capitals;Ligatures=!Common Ligatures'] [encoding=uc] I have to check the state of special features in case of [this/syntay/for/fonts.otf], but is it possible that the colon might interfere with definitions such as the one above? Now I need to actualy run your code on some examples ... Mojca