From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84895 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Simplefonts Date: Fri, 18 Oct 2013 18:18:50 +0200 Message-ID: References: <3288E803-9426-41F1-AA62-144E5A21A085@gmail.com> <7D24BFCF-3023-47A2-A243-582C49B7FA79@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1382113140 21410 80.91.229.3 (18 Oct 2013 16:19:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 16:19:00 +0000 (UTC) Cc: Zhichu Chen To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 18 18:19:05 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VXClV-0006qw-1j for gctc-ntg-context-518@m.gmane.org; Fri, 18 Oct 2013 18:19:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 15431101E8; Fri, 18 Oct 2013 18:16:17 +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 Ev1sewE70YSA; Fri, 18 Oct 2013 18:16:14 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D2A48101E3; Fri, 18 Oct 2013 18:16:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1DCEE101E3 for ; Fri, 18 Oct 2013 18:16:13 +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 yBcQsB-Z5dRo for ; Fri, 18 Oct 2013 18:16:11 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 67B8A101DE for ; Fri, 18 Oct 2013 18:16:11 +0200 (CEST) Original-Received: from mail-ea0-x22e.google.com (mail-ea0-x22e.google.com [IPv6:2a00:1450:4013:c01::22e]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9IGIw6S010013 for ; Fri, 18 Oct 2013 18:18:58 +0200 Original-Received: by mail-ea0-f174.google.com with SMTP id z15so2145279ead.33 for ; Fri, 18 Oct 2013 09:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=r/uW35rukbh4zM0ttQgUqxpjo/pHHw/XvYZfSQIUCSs=; b=MqlYUiqQKuQfZBphWGAQo/dRnS9FMXYmk8MispNTL9VXUSXws7IePyETnQBpfyFNb4 LWZE8D/bdt/nTfDqK9B5oWR0BexZdwme2bV1FYhfD472c194pAB8tUXj9doFUqchjU9m +yzMu3xiLgM0pp2nVqadpApdHEdSGlvg9qW0yuag1vF2Mzw0aeqKL64ziO3T/MqHr4zB XravCeIKEevKQCwyHu+XS7C03sz27GE4RZEQkuYvx6jegxma2qEbkYQ+CF/ipsNJSs9F jTUYjENjMFreZfVeTXFZaWFKfgY3uOgKOdHfAC3Hhmms3HcWFxulXXitPqZQ8AgyaXNN w+rA== X-Received: by 10.14.37.4 with SMTP id x4mr5723448eea.16.1382113137930; Fri, 18 Oct 2013 09:18:57 -0700 (PDT) Original-Received: from keima.localdomain (x2f24685.dyn.telefonica.de. [2.242.70.133]) by mx.google.com with ESMTPSA id i1sm6415001eeg.0.2013.10.18.09.18.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 09:18:57 -0700 (PDT) In-Reply-To: <7D24BFCF-3023-47A2-A243-582C49B7FA79@gmail.com> X-Mailer: Apple Mail (2.1510) X-Bayes-Prob: 0.0046 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::22e; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VKCEiWC7 - de65c5c3e10f - 20131018 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84895 Archived-At: Am 12.10.2013 um 19:39 schrieb Wolfgang Schuster : > The module provides keys to apply a certain font and feature for each alt= ernative (upright, italic etc.) > of a font, a complete list with all keys is shown in the table below. > = > ------------------------------------------------------- > | Alternative | Font | Feature | > |-----------------------------------------------------| > | tf | regularfont | regularfeatures | > | it | italicfont | italicfeatures | > | sl | slantedfont | slantedfeatures | > | bf | boldfont | boldfeatures | > | bi | bolditalicfont | bolditalicfeatures | > | bs | boldslantedfont | boldslantedfeatures | > | sc | smallcapsfont | smallcapsfeatures | > ------------------------------------------------------- > = > The feature-keys expect the name from the \definefontfeature command, whe= n you don=92t > specify a feature to a certain alternative the value from the =93features= =94 key is used. > = > When you want to set a certain font for a alternative there are different= ways, I=92m going > to show the different ways with a few examples where I change the font fo= r italic. > = > 1. Use the filename of a font. With the =93file:=94 prefix you can the te= ll the module > to look for a file with the given name, when the file isn=92t found the f= ont from > the tf-alternative is used. The file-method is also used when you omit th= e prefix. > = > \setupfontfamily [serif] [DejaVu Serif] [italicfont=3Dfile:dejavuserifbol= d] > = > \starttext > Regular and \it Italic > \stoptext > = > 2. Use a certain style. When you use the =93style: =94prefix the module l= ooks for a certain > style of the requested font. > = > \setupfontfamily [serif] [DejaVu Serif] [italicfont=3Dstyle:bolditalic] > = > \starttext > Regular and \it Italic > \stoptext > = > 3. Search for a font with a certain name. When you use the =93name:=94 pr= efix the module > looks for a font with the requested name. Names are internal values of a = font which > is sometimes the same as the filename. > = > \setupfontfamily [serif] [DejaVu Serif] [italicfont=3Dname:dejavuserifbol= d] > = > \starttext > Regular and \it Italic > \stoptext > = > 4. Use the spec information. When you use the =93spec:=94 prefix you can = request a font > with a certain =93weight=94 (bold or normal), =93style=94 (italic or norm= al) and variant (smallcaps or normal). > = > \setupfontfamily [serif] [DejaVu Serif] [italicfont=3Dspec:bold-italic] > = > \starttext > Regular and \it Italic > \stoptext > = > = > There is a possibility that I change the way to set font and features for= alternatives > in the feature to a way which is more compact and easier to parse in Lua. I changed the way to set fonts and features for certain alternatives (the e= xisting keys mentioned above will remain for a while) in the last beta and you can now s= et both values in a single setup. Below is a example where I changed the font and features for italic: \definefontfamily [mainface] [serif] [TeX Gyre Pagella] [it=3D{style:boldit= alic,features:smallcaps}] \setupbodyfont[mainface] \starttext Upright \it Italic \bf Bold \bi BoldItalic \stoptext The name for the keys are =93tf=94, =93it=94, =93sl=94, =93bf=94, =93bi=94,= =93bs=94 and =93sc=94. The values for the keys can be a font change with the methods mentioned above where the method and = argument are separated by a colon. When you want to apply a feature use the =93featu= res=94 method. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________