From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81685 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Different fonts for titles Date: Sun, 14 Apr 2013 23:42:16 +0200 Message-ID: <6AA76928-A71A-4686-9CF8-C2A439467B5C@gmail.com> References: <516AA262.4080509@mmnetz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1365975763 11218 80.91.229.3 (14 Apr 2013 21:42:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Apr 2013 21:42:43 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Apr 14 23:42:47 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from [195.12.62.10] (helo=balder.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1URUhB-0001vu-Hb for gctc-ntg-context-518@m.gmane.org; Sun, 14 Apr 2013 23:42:45 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C45A6101E4; Sun, 14 Apr 2013 23:42:24 +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 PXDB8nDNEukP; Sun, 14 Apr 2013 23:42:23 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id F3A3310229; Sun, 14 Apr 2013 23:42:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AFDDD10229 for ; Sun, 14 Apr 2013 23:42:21 +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 4+b0W5ifb5Qz for ; Sun, 14 Apr 2013 23:42:19 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id A22DA101E4 for ; Sun, 14 Apr 2013 23:42:19 +0200 (CEST) Original-Received: from mail-bk0-x22a.google.com (mail-bk0-x22a.google.com [IPv6:2a00:1450:4008:c01::22a]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3EM3gQI017703 for ; Mon, 15 Apr 2013 00:03:42 +0200 Original-Received: by mail-bk0-f42.google.com with SMTP id jc3so2078882bkc.1 for ; Sun, 14 Apr 2013 14:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=xTlzD28I8jqSg28TBpeoKs+qxlDJmSN56tFm7LSDf84=; b=Ype8feBS4pRapn2I8z8J/xq06OfzxHhVRVObxTKPRTT3SFSJHgfI8x39euzpO3dXRQ M++gf6S9nJaQhBPbxtLs3mHHnZwCwo0hNI8ScYPWjsi1/Uhcr61/BLB0Py2r6AeflY3A UhTlz5Fcjkfhax65kQt4wBuvL0tzI5djcsjJzgIVmfjFN/Ah2kPXG9lss/brqRA2vzP5 NYxBjePWIGUMwCkyiQvhYTotltgtXptZf2fqgkoWymuOKP7o9azYzQHK3rtU+LFSoJS/ gSTVp/IFhWsAZlz1HF+7bxvw2E5N0RKoEpjfhYB8dT6vYBIhr8u6szRe/2vDrhy0UbL0 3PSg== X-Received: by 10.204.240.145 with SMTP id la17mr7368410bkb.68.1365975738466; Sun, 14 Apr 2013 14:42:18 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbf41c1.pool.mediaWays.net. [77.191.65.193]) by mx.google.com with ESMTPS id b21sm7336707bkw.12.2013.04.14.14.42.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Apr 2013 14:42:17 -0700 (PDT) In-Reply-To: <516AA262.4080509@mmnetz.de> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01JnW3GzG - fdb32096cb64 - 20130414 (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:81685 Archived-At: Am 14.04.2013 um 14:34 schrieb H. =D6zoguz : > Hoping for some hints .... :) What you=92re looking for is the \definefont command, in one way a low leve= l method to access a font but also a usefull command to create styles for headings etc. Let me start with the following example: \definefont[Test][texgyrepagellaregular at 12pt] \starttext \Test VA ffl \stoptext What I do here is to create the new command \Test which loads the file =93t= exgrepagellaregular=94 at a size 12pt. With the optional prefix on front of the font name you can = specify the search method, context provides the three different methods a) file b) name and c) spec. a) \definefont[Test][file:texgyrepagellaregular] b) \definefont[Test][name:texgyrepagellaregular] c) \definefont[Test][spec:texgyrepagella-normal-normal] Instead of a fixed size for the font you can also use a relative size which= depends on the bodyfont. \definefont[Test][texgyrepagellaregular sa 1] \starttext \Test VA ffl \switchtobodyfont[20pt]\Test VA ffl \stoptext When you use =93sa XX=94 as argument for the size your font scales also whe= n you change the bodyfont in the middle of the document. One problem of the definitions above is that kerning, ligatures etc. aren= =92t activated for the font because no feature isn=92t applied. To apply a feature set you have to use = a different method than the one which is used in a typescript because \definefont has no feature-ke= y. What you have to do to apply the set is to append it after the name name and separate both w= ith a asterisks. \definefont[Test][texgyrepagellaregular*default sa 1] \starttext \Test VA ffl \stoptext Instead of the real name of a file you can also use a symbolic name from a = typescript. \definefont[Test][SansBold sa 1] \starttext \Test VA ffl \stoptext In this example I used the bold version of the sans style for my \Test font= , in this case you don=92t have to add the name of a feature because it has been already s= et in the typescript. A complete example in a document could be look like this: \definetypeface[mainface][rm][specserif][Antykwa Poltawskiego] \definetypeface[mainface][ss][specsans] [Iwona] \definefont[ChapterStyle][SansBold sa 3] \setuphead[chapter][style=3DChapterStyle] \setupbodyfont[mainface] \starttext \chapter{Knuth} \input knuth \stoptext 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 ___________________________________________________________________________= ________