From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48500 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: Re: font switching questions Date: Wed, 18 Mar 2009 09:12:00 +0100 Message-ID: <326847810903180112r369058daxc1ead108ac62746a@mail.gmail.com> References: <326847810903171448l5208311do3b5d440486dd8122@mail.gmail.com> <49C023EF.9050106@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1818293499==" X-Trace: ger.gmane.org 1237363980 10209 80.91.229.12 (18 Mar 2009 08:13:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2009 08:13:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 18 09:14:17 2009 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 1Ljquf-00082I-MY for gctc-ntg-context-518@m.gmane.org; Wed, 18 Mar 2009 09:14:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6F9411FD6D; Wed, 18 Mar 2009 09:12:45 +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 29992-02-13; Wed, 18 Mar 2009 09:12:10 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B64FB1FD02; Wed, 18 Mar 2009 09:12:10 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 54AC31FD02 for ; Wed, 18 Mar 2009 09:12:09 +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 12026-02-3 for ; Wed, 18 Mar 2009 09:12:01 +0100 (CET) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by ronja.ntg.nl (Postfix) with ESMTP id 828101FCF3 for ; Wed, 18 Mar 2009 09:12:01 +0100 (CET) Original-Received: from mail-ew0-f173.google.com (mail-ew0-f173.google.com [209.85.219.173]) by filter2-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n2I8C09j000435 for ; Wed, 18 Mar 2009 09:12:00 +0100 Original-Received: by ewy21 with SMTP id 21so2130738ewy.2 for ; Wed, 18 Mar 2009 01:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=jG/DbkyE3lO7e76MBY/+uDCvlHQDU1qld6KoF8ngPeQ=; b=oqxy7fzhdJoovA4Of+tmqzqyMJR0q4tpSqmcGtfRsVp7uC/GiS0QHDS9Gh6hA8hXuY NSvIRCTQ2/qN7SzGQIy/ZejHyxzJ+PTPA4bG+nhv5Q8aJMjUcywaZ+q78S/lgAZn4g4G IfuChoDbK9eC5N1YZo/i3S+gfzsSJEQyTYuRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=yCq0b4dKeMvmv4RzjmboG4jGoXFsuQZtAuququet+iDWzMDoY1WDxaOW5fdwddGgFG mDMhEHpBEuVtj8xDVL7MU8v5ouqspb8Sj3rPMg4mGc22nFDnwovbgmJdR4Grd09wYkMD t9Dl8hYzQ6dBh5DdQBMmv6MqMVqYLnIFiV5B0= Original-Received: by 10.216.7.212 with SMTP id 62mr22805wep.92.1237363920167; Wed, 18 Mar 2009 01:12:00 -0700 (PDT) In-Reply-To: <49C023EF.9050106@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.219.173; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 195264048 - 2ae828ce95a1 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:48500 Archived-At: --===============1818293499== Content-Type: multipart/alternative; boundary=0016364c7a27eb64d60465603ca2 --0016364c7a27eb64d60465603ca2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Mar 17, 2009 at 11:27 PM, Hans Hagen wrote: > Alan Stone wrote: > >> Ahoi, >> >> Following a previous discussion, I've been advised to "try to avoid >> \switchtobodyfont and use \definedfont or \definefont instead". >> > > what is better depends on the situation > > - for a structured document using \switchtobodyfont is ok > > - for special layout elements (headers, title pages, keywords) \definefont > might be handier (esp when funny sizes are used) > > - when using \definefont it can be handy to use the symbolic names (Serif, > SansBold etc) and sizes (sa 1.2) because that makes redefinition easier > > (1) What's the difference between \definefont and \definedfont ? >> > > \definefont defines a macro that represents a font, and \definedfont just > switches to a font (the forst one is more efficient when you switch often) > > (2) In the underneath example... >> >> (2a) how to implement \define(d)font for font switching ? >> >> (2b) how to define \myFontHook ? >> >> Thanks, >> Alan >> >> \usemodule[t-lettrine] >> >> \usetypescriptfile[tps_arial] >> \usetypescript[arial] >> > > ... just look how gyre typefaces are defined > > \setupbodyfont[myFont,\myFontSize] >> > > just \setupbodyfont[myFont,12pt] > > and an occasional \definefont[BigFont][SerifBold sa 3.5] which gives you > \BigFont Which low level command allows to fill in \definefont[SomeFont][SomeSynonym sa SomeScale] with SomeSynonym=Sans(X)/Serif(X) (X)=Bold/Italic, i.e. regardless of the synonym's name (defined in the typescript)? > >> \setuphead[chapter][style={\switchtobodyfont[myOtherFont,\myOtherFontSize]}] >> > > it depends on what can occur in a title, if there's math and monospaced and > whatever being used mixed, then best use a typeface (apart from the one time > definition it's quite fast to switch a typeface) > Alan --0016364c7a27eb64d60465603ca2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Mar 17, 2009 at 11:27 PM, Hans Hagen <pragma@wxs.nl> wrote:
Alan Stone wrote:
Ahoi,

Following a previou= s discussion, I've been advised to "try to avoid
\switchtobodyf= ont and use \definedfont or \definefont instead".

what is better depends on the situation

- for= a structured document using \switchtobodyfont is ok

- for special l= ayout elements (headers, title pages, keywords) \definefont might be handie= r (esp when funny sizes are used)

- when using \definefont it can be handy to use the symbolic names (Ser= if, SansBold etc) and sizes (sa 1.2) because that makes redefinition easier= =20


(1) What's the difference be= tween \definefont and \definedfont ?

\definefont = defines a macro that represents a font, and \definedfont just switches to a= font (the forst one is more efficient when you switch often)=20


(2) In the underneath example...=

(2a) how to implement \define(d)font for font switching ?

(2= b) how to define \myFontHook ?

Thanks,
Alan

\usemodule[t-lettrine]

\usetypescriptfile= [tps_arial]
\usetypescript[arial]

... just loo= k how gyre typefaces are defined

\setupbodyfont[myFont,\myFontSiz= e]

just \setupbodyfont[myFont,12pt]

and an occas= ional \definefont[BigFont][SerifBold sa 3.5] which gives you =A0\BigFont
=A0
Which low level command=A0allows to fill in \definefont[SomeFont][Some= Synonym sa SomeScale] with SomeSynonym=3DSans(X)/Serif(X) (X)=3DBold/Italic= , i.e. regardless of the synonym's name (defined in the typescript)?
=A0
\setuphead[chapter][style=3D{\sw= itchtobodyfont[myOtherFont,\myOtherFontSize]}]

it= depends on what can occur in a title, if there's math and monospaced a= nd whatever being used mixed, then best use a typeface (apart from the one = time definition it's quite fast to switch a typeface)
Alan
--0016364c7a27eb64d60465603ca2-- --===============1818293499== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1818293499==--