From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57037 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: simplefonts Date: Fri, 12 Mar 2010 21:11:22 +0100 Message-ID: <15AD5E9D-8B8E-43FA-9980-92B9F786E974@uni-bonn.de> References: <54d7f5601003121111g59f37924q6e03dffb49e6ea32@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1268424724 6464 80.91.229.12 (12 Mar 2010 20:12:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Mar 2010 20:12:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 12 21:12:00 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 1NqBDC-0006Yb-7Y for gctc-ntg-context-518@m.gmane.org; Fri, 12 Mar 2010 21:11:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F1DFFC9DA7; Fri, 12 Mar 2010 21:11:52 +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 tyfOVCVsn+2F; Fri, 12 Mar 2010 21:11:50 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C000EC9D6C; Fri, 12 Mar 2010 21:11:42 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4BB85C9D6C for ; Fri, 12 Mar 2010 21:11:41 +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 iaSnAxA-PdDp for ; Fri, 12 Mar 2010 21:11:38 +0100 (CET) Original-Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by balder.ntg.nl (Postfix) with ESMTP id AF28AC9D24 for ; Fri, 12 Mar 2010 21:11:38 +0100 (CET) Original-Received: from [87.178.77.195] (account tschmit1@uni-bonn.de HELO [192.168.0.2]) by fe2.uni-bonn.de (CommuniGate Pro SMTP 5.2.12) with ESMTPA id 34297740 for ntg-context@ntg.nl; Fri, 12 Mar 2010 21:11:38 +0100 In-Reply-To: <54d7f5601003121111g59f37924q6e03dffb49e6ea32@mail.gmail.com> X-Mailer: Apple Mail (2.1077) 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:57037 Archived-At: Hi Michael, This is not to disparage Wolfgang's great simplefonts module, but I learnt setting up fonts the old-fashioned way (with typescripts), so I will give a few explanations about this approach. Most of what you want can be achieved easily. I have Garamond Premier myself, and this is how I set it up: It looks like you're only using mkiv. So: call a file type-garamondprem.tex. Here's what we will do: first, we want to find out what features our font offers. On my system: otfinfo -f ~/texmf/fonts/opentype/adobe/garmprem/GaramondPremrPro.otf aalt Access All Alternates c2sc Small Capitals From Capitals calt Contextual Alternates case Case-Sensitive Forms cpsp Capital Spacing dlig Discretionary Ligatures dnom Denominators fina Terminal Forms frac Fractions hist Historical Forms kern Kerning liga Standard Ligatures lnum Lining Figures numr Numerators onum Oldstyle Figures ordn Ordinals ornm Ornaments pnum Proportional Figures salt Stylistic Alternates sinf Scientific Inferiors size Optical Size smcp Small Capitals ss01 Stylistic Set 1 ss02 Stylistic Set 2 ss03 Stylistic Set 3 sups Superscript tnum Tabular Figures zero Slashed Zero You can enable these features with the four-letter-code and "yes." 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,lnum=yes,tnum=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 \usetypescriptfile[type-garamondprem] \usetypescript[GaramondPremUpper] \usetypsecript[GaramondPrem] \setupbodyfont[GaramondPrem,11pt] OK so far? On Mar 12, 2010, at 8:11 PM, Michael Saunders wrote: > > Thank you once again. That _did_ work, after I got rid of an \os (I > used it because I saw it in the manual). > > The command \definefontfeature intrigues me greatly. I wonder if it > could solve all my problems. I'd love to understand it so that I > don't end up coming in here and asking you to write all my font setups > line by line. I Googled it and found only a few scattered examples > here and there, mostly from this list. I wish I could find an > explanation of it written down somewhere. For example, I would very > much like to know: > > 1. What the first two arguments do. > 2. What keys and values are available for the third, and what they mean. See above: all the font features your font offers. > 3. Once I have composed a \definefontfeature command, how do I use it > in the text. > 4. For example, I gathered that I needed a [default] [default] > [...onum=yes...] to get oldstyle numerals by default, but what if I > want to use some lining numerals here and there? > \definefontfeature [lining] [lining] [...onum=no...] > {\lining 123} > doesn't do it. You can write {\sc 123} (because your smallcap font has lining figures). \os is tied to math and creates problems when used with professional fonts that don't have an accompanying math font. > 5. How I could use the superior and inferior shapes in my font---like > for the footnotemarks, for example? You have defined a font instance with superiors. To use it, set up your footnotes accordingly: \setupfootnotes[textstyle=normal, textcommand={\switchtobodyfont[GaramondPremUpper]}, numbercommand={\switchtobodyfont[GaramondPremUpper]}] > 6. Could I use \definefontfeature to set up the different design sizes > of my font (I'm trying to use some standard Adobe fonts like Garamond > Premiere Pro, which have design sizes), as well as its other features? I haven't yet played with this, sorry. > 7. Maybe \definefontfeature is how I should turn on hz? With the fontfeature, we have defined to use protrusion=pure,expansion=quality . To enable it, put this in the preamble of your document: \enableprotruding \enableadjusting HTH Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________