From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57078 Path: news.gmane.org!not-for-mail From: Michael Saunders Newsgroups: gmane.comp.tex.context Subject: simplefonts Date: Sun, 14 Mar 2010 08:12:05 -0500 Message-ID: <54d7f5601003140612q60e57ccctc1dba0df39454a32@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: dough.gmane.org 1268572341 23162 80.91.229.12 (14 Mar 2010 13:12:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 14 Mar 2010 13:12:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 14 14:12:17 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqnc8-0000cd-Oa for gctc-ntg-context-518@m.gmane.org; Sun, 14 Mar 2010 14:12:16 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 372AEC9D15; Sun, 14 Mar 2010 14:12:16 +0100 (CET) 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 Ra5FYG641ekP; Sun, 14 Mar 2010 14:12:13 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E31FC9CCF; Sun, 14 Mar 2010 14:12:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8B218C9CCF for ; Sun, 14 Mar 2010 14:12:12 +0100 (CET) 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 PYGZGvtaZlg5 for ; Sun, 14 Mar 2010 14:12:09 +0100 (CET) Original-Received: from mail-gw0-f41.google.com (mail-gw0-f41.google.com [74.125.83.41]) by balder.ntg.nl (Postfix) with ESMTP id 75733C9CC3 for ; Sun, 14 Mar 2010 14:12:09 +0100 (CET) Original-Received: by gwb17 with SMTP id 17so1031037gwb.14 for ; Sun, 14 Mar 2010 06:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=PnQDF5iNiV1o7Opbgb6aUgKyFPALZ+s05xdsOH1YZIA=; b=WawMcW6J0cbjRWKZcIlthwY4tqOUlTflEWubJNpmfLSvISDK7NafZ+E2yjyLT6ztU3 j3k9BfCzbprrcPbb2tZfZ1cjb4Ulpmf85K9zyDqf6T24TdyMVmBZZLqV68ApmTVAFJf5 YRhx/KQ9+vd8qMK6nrYMz2WIn9wQyxoJ1JsIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=cl5hTw1EFzoQ8j9jqc2LequsNHx0dLOkT0PA+/2DgeE8ZUOl5wGPQni6Pp6sW/XY4N vPKWT2x/d9VyrLyGlnRqkd7M3uIjy7F+tgq8aiBOcFC9msZVmb5Kup9aoj3fIn4pU1Tv UfgjnAJIOaVlEesqJDXlAvhIINLKPpJR1qHHs= Original-Received: by 10.101.155.38 with SMTP id h38mr2019953ano.131.1268572325492; Sun, 14 Mar 2010 06:12:05 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:57078 Archived-At: Thomas A. Schmitz: Thank you, Thomas. I've been studying this closely. > A typescript file can contain a series of typeface definitions, e.g., one for serif, one for sans, one for mono, one for math, etc. hence the syntax \starttypescript [] [] I see! So, I'm guessing that it is this which connects the typescripts to the font switching commands like \rm. My guess is: switch serif \rm sans \ss mono \tt math \mm ?? \hw ?? \cg and that Context only permits these six families? > > In the typography manual, Hans says, > > "The third and fourth > > arguments to \definetypeface are pointers to already declared font > > sets; these are defined elsewhere." I think by "font set" he must > > mean a typescript like garamondprem, but I don't know where the font > > set (typescript?) "serif" is or why two font sets need to be pointed > > to. > ??? That's how I feel. The command in question was: \definetypeface [GaramondPrem] [rm] [serif] [garamondprem] [default] The typography document says that the "[serif] [garamondprem]" "are pointers to already declared font sets; these are defined elsewhere." I know now that "[garamondprem]" is the "font set" in your typescript. I don't know what font set "[serif]" points to or why. > The same typography document goes on to explain the fifth > argument: > "The fifth argument to \definetypeface specifies specific font size > setups (if any), these will be covered in section ?? in the next > chapter." > This is getting scary, but I'm hoping putting "[optical]" there will > solve everything. > I don't follow. http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf says: "The fifth argument to \definetypeface specifies specific font size setups (if any), these will be covered in section ?? in the next chapter." If this chapter were inserted into the manual, the next chapter would be about color and backgrounds, so, no luck searching there. But, I noticed that that fifth argument was filled by "[optical]" at the bottom of this page: http://wiki.contextgarden.net/Optical_Size so: "\definetypeface [minion-pro] [rm] [serif] [minion-pro] [optical]" > > I'm confused about how [GaramondPremUpper] and [garamondpremupper] > > seem to be getting associated with [rm] and [serif] after they were > > already associated with > > [GaramondPrem] and [garamondprem]. I don't see how, when I now use \rm, the > > machine is going to know whether I mean garamondpremupper or garamondprem. > > The rest of the file seems straightforward. > In ConTeXt, you are always within a certain bodyfont (the one defined with the \definetypeface command). A switch like \it or \rm will thus take the italic/roman from this bodyfont. Meaning: when you say \setubodyfont[GaramondPrem], it will use "normal" Garamond Premier, if you use \switchtobodyfont[GaramondPremUpper], it will use the superior numbers variant. Ahhh, okay. It wasn't intuitive to me, as a user, that a relatively small change (from, say, oldstyle to superiors) would take a much bigger switch (of the whole bodyfont) than would a relatively big change (from, say, roman to italic, which only needs a little \it). I wrote a set of font switches once (in LaTeX) that were all little digraph codes (major axis: rm, it, sl, ui; minor axis: rg, ac, sc, sw, in, su, nu, de, po, pl, to, tl + ornaments, which handles all of the variations that Adobe makes, anyway). Maybe I'll be able to reproduce it once I get this working. > > I get the error: > > !undefined control sequence > > \usetypescript > > l.12 \usetypescript > > [GaramondPrem] > Then we will need your example - this is not normal behavior. okay: First, I put an almost exact copy of your file (with your comments commented out) in type-garamondprem.tex in C:\contextminimal\tex\texmf-local and ran luatools --generate, which seems to see the directory alright. Then I put the commands: \usetypescriptfile [type-garamondprem] \usetypescript [GaramondPremUpper] \usetypsecript [GaramondPrem] \setupbodyfont [GaramondPrem,12pt] in my preamble, with nothing else. When I try to run Context, the above error was returned. For the record, here is the exact contents of type-garamondprem.tex: %So we define a set of such features for the different font instances we want to define. %In my case, I want regular text with oldstyle figures, small caps with lining figures, and superior numerals. This goes into your typescript: \definefontfeature [myroman] [protrusion=pure,expansion=quality,script=latn,liga=yes,onum=yes,pnum=yes,kern=yes,tlig=yes,trep=yes] \definefontfeature [mysmcp] [mode=node,script=latn,language=dflt,liga=yes,onum=yes,pnum=yes,kern=yes,tlig=yes,trep=yes,smcp=yes] \definefontfeature [mysup] [mode=node,script=latn,onum=no,pnum=yes,sups=yes] %Next step: we set up the "normal" and smallcaps font: \starttypescript [serif] [garamondprem] \definefontsynonym [Garamond-Roman] [name:garamondpremierpro] [features=myroman] \definefontsynonym [Garamond-Bold] [name:garamondpremierprobold] [features=myroman] \definefontsynonym [Garamond-Italic] [name:garamondpremierproitalic] [features=myroman] \definefontsynonym [Garamond-Bold-Italic] [name:garamondpremierprobolditalicc] [features=myroman] \definefontsynonym [Garamond-SmallCaps] [name:garamondpremierpro] [features=mysmcp] \stoptypescript \starttypescript [serif] [garamondprem] \definefontsynonym [Serif] [Garamond-Roman] [features=myroman] \definefontsynonym [SerifItalic] [Garamond-Italic] [features=myroman] \definefontsynonym [SerifBold] [Garamond-Bold] [features=myroman] \definefontsynonym [SerifBoldItalic] [Garamond-Bold-Italic] [features=myroman] \definefontsynonym [SerifCaps] [Garamond-SmallCaps] [features=mysmcp] \stoptypescript %Finally, define your first typeface: \starttypescript [GaramondPrem] \definetypeface [GaramondPrem] [rm] [serif] [garamondprem] [default] \stoptypescript %Next step: defining a typeface with superior numbers for footnote references etc.: \starttypescript [serif] [garamondpremupper] \definefontsynonym [GaramondPremUpper-Roman] [name:agaramondproregular] [features=mysup] \stoptypescript \starttypescript [serif] [garamondpremupper] \definefontsynonym [Serif] [GaramondPremUpper-Roman] [features=mysup] \definefontsynonym [SerifItalic] [Serif] \definefontsynonym [SerifBold] [Serif] \definefontsynonym [SerifBoldItalic] [Serif] \definefontsynonym [SerifCaps] [Serif] \stoptypescript \starttypescript [GaramondPremUpper] \definetypeface [GaramondPremUpper] [rm] [serif] [garamondpremupper] [default] \stoptypescript %Save this typescript somewhere where ConTeXt can find it and run luatools --generate. To use these in your documents, you need these lines Thank you again, this has been a huge help. ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________