From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72317 Path: news.gmane.org!not-for-mail From: "Christian" Newsgroups: gmane.comp.tex.context Subject: Re: Fonts in Mk IV -- \definefontalternative documentation? Date: Fri, 11 Nov 2011 11:13:52 +0100 Message-ID: <004401cca05a$9cf87090$d6e951b0$@gmx.de> References: 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 1321006494 21472 80.91.229.12 (11 Nov 2011 10:14:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2011 10:14:54 +0000 (UTC) To: "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 11 11:14:42 2011 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 1ROo89-0003aP-Tc for gctc-ntg-context-518@m.gmane.org; Fri, 11 Nov 2011 11:14:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9516FCB0DA; Fri, 11 Nov 2011 11:14: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 7a8cLjC8zckp; Fri, 11 Nov 2011 11:14:41 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 97A88CB0D2; Fri, 11 Nov 2011 11:14:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CEEE8CB0D0 for ; Fri, 11 Nov 2011 11:14:33 +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 3LThJhs7y4GP for ; Fri, 11 Nov 2011 11:14:19 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 26D49CB0D4 for ; Fri, 11 Nov 2011 11:13:55 +0100 (CET) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id pABADsVq013878 for ; Fri, 11 Nov 2011 11:13:54 +0100 Original-Received: (qmail invoked by alias); 11 Nov 2011 10:13:53 -0000 Original-Received: from f053215227.adsl.alicedsl.de (EHLO christiandelux) [78.53.215.227] by mail.gmx.net (mp042) with SMTP; 11 Nov 2011 11:13:53 +0100 X-Authenticated: #61879178 X-Provags-ID: V01U2FsdGVkX18tb+EzdOEtZxekZX+rXyx1po/n+TqewnMqig6WWd V2ke/tzBSAQXdA In-Reply-To: X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLIcSUmYagPtAYzuzwxrkTFDmFI5pOvz7qg Content-Language: de X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eFTKdS0A - d9cff275fba1 - 20111111 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:72317 Archived-At: Hello and welcome to the world of ConTeXt! I was in you place about one year ago :) The best way to get started with fonts is probably the simplefonts module. I haven't used anything since I started and was able to do everything I wished for, so far. Installation: Run first-setup.sh --modules="t-simplefonts" if you use Context standalone (if not, refer to http://wiki.contextgarden.net/Modules for installation and download links). Then this file should get you started: %%% BEGIN \usemodule[simplefonts] \definefontfeature[default][default][mode=node,script=latn,kern=yes,palt=yes,tlig=yes,trep=yes,init=yes,size=yes] %some default features \definefontfeature[frac][default][frac=yes] % opentype 'frac' feature for nice fractions \definefontfeature[sups][default][sups=yes] \definefontfeature[onum][default][onum=yes] % old-style figures \definefontfeature[lnum][default][lnum=yes] \setupsimplefonts[expansion=quality, protrusion=quality] % sort of microtype thing. makes things look better =) \setmainfont[Myriad Pro] % set Myriad as main font \definesimplefonttypeface[sb][Myriad Pro][regularfont=myriadprosemibold, italicfont=myriadprosemiboldit] % define a second font called 'sb' for semibold \starttext Test normal\\ {\sb Test semibold}\\ {\sb \it Test semibold}\\ {\bf Test bold}\\ Opentype font feature demonstration:\\ {\addff{onum} 1234} 1234\\ {\addff{frac} 1/17} \stoptext %%% END > Hello, I am coming to ConTeXt from LaTeX and have a typescript question. I > was searching for information on the mailing list about defining semibold and > other font variants, and found the following. Can you tell me if further > information is only available in the book "context mkiv -- Fonts" or can I find it > somewhere else? I have searched through the revised Fonts chapter of the > ConTeXt manual but the \definefontalternative macro and the approach > described here are not documented there. > > The approach below works for me if I adapt it to Adobe Garamond Premier > Pro, but I am attempting to build a typescript for that handles optical weights, > small caps, etc and I have not been able to make it work yet. > > Before I try posting a minimal example, I would like to be sure that I am > looking at the right documentation. I have looked at the "Fonts in LuaTeX" > page on Contextgarden as well, but I don't think I have a full understanding > of typescripts using OSFONTDIR fonts yet. If there is something I am missing > please let me know. > > Thanks, > PPN > > > > Based on ideas from the forthcoming book "context mkiv -- Fonts": > > % note: I have deleted all lines except the relevant ones for defining > % the semi bold alternatives > > \definefontalternative [sb] > \definefontalternative [si] > > \definebodyfont [default] [ss] > [sb=SansSemiBold sa 1, > si=SansSemiBoldItalic sa 1] > > \starttypescript [sans] [myriadpro] > \definefontsynonym [MyriadPro-SemiBold] [name:myriadprosemibold] > \definefontsynonym [MyriadPro-SemiBoldIt][name:myriadprosemiboldit] > \stoptypescript > > \starttypescript [sans] [myriadpro] > \definefontsynonym [SansSemiBold] [MyriadPro-SemiBold] > [features=default] > \definefontsynonym [SansSemiBoldItalic] [MyriadPro-SemiBoldIt] > [features=default] > \stoptypescript > > \starttypescript [myriadpro] > \definetypeface [myriadpro] [ss] [sans] [myriadpro] [default] > \stoptypescript > > \usetypescript[myriadpro] > > \starttext > > \switchtobodyfont[myriadpro,ss] > > \sb Hello > \si Italic > > \stoptext > > > -- > Peter Park Nelson > peter.park.nelson@gmail.com ___________________________________________________________________________________ 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 ___________________________________________________________________________________