From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/42436 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Whacko font behaviour ? ( Or Am I ? :O) Date: Mon, 14 Jul 2008 22:30:32 +0200 Message-ID: <3712BF40-8198-44D1-9CFC-717C361B79C4@gmail.com> References: <326847810807141222h63f39b8dp6d1a41bf5c1dbe68@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216067546 12091 80.91.229.12 (14 Jul 2008 20:32:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2008 20:32:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 14 22:33:12 2008 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 1KIUjI-0003np-BB for gctc-ntg-context-518@m.gmane.org; Mon, 14 Jul 2008 22:33:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BCCA01FC06; Mon, 14 Jul 2008 22:32:07 +0200 (CEST) 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 00969-01-11; Mon, 14 Jul 2008 22:31:15 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 610511FC91; Mon, 14 Jul 2008 22:31:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 062611FC03 for ; Mon, 14 Jul 2008 22:31:13 +0200 (CEST) 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 00969-01-10 for ; Mon, 14 Jul 2008 22:30:38 +0200 (CEST) Original-Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by ronja.ntg.nl (Postfix) with ESMTP id EC29C1FC91 for ; Mon, 14 Jul 2008 22:30:37 +0200 (CEST) Original-Received: by fk-out-0910.google.com with SMTP id 18so2880221fks.2 for ; Mon, 14 Jul 2008 13:30:37 -0700 (PDT) Original-Received: by 10.187.168.2 with SMTP id v2mr1980346fao.23.1216067437592; Mon, 14 Jul 2008 13:30:37 -0700 (PDT) Original-Received: from ?192.168.2.23? ( [91.41.101.192]) by mx.google.com with ESMTPS id g28sm12378618fkg.8.2008.07.14.13.30.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Jul 2008 13:30:36 -0700 (PDT) In-Reply-To: <326847810807141222h63f39b8dp6d1a41bf5c1dbe68@mail.gmail.com> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:42436 Archived-At: Am 14.07.2008 um 21:22 schrieb Alan Stone: > ConTeXt ver: 2008.07.10 08:40 MKIV fmt: 2008.7.10 int: english/ > english > > See test.tex in attachement. > > The following combinations give the following results after > compiling with > > texmfstart texexec --lua test.tex > > ------------------------------------------------------------------------------- > > (1) \definefont[myChapterFont][myHeadingsFont sa 1.728] % with You could either use a real font name like 'Arial' or a symbolic name defined with \definefontsynonym like 'Serif', 'SerifBold', 'Sans', 'Dummy-Regular' etc. in the second argument of \definefont but not the name for a font collection defined with \definetype, in your case \definefont[myChapterFont][Sans sa 1.728] or \definefont[myChapterFont][DummyRegular sa 1.728] > \setuphead[chapter][style=myChapterFont] % or > \setuphead[chapter][style=\myChapterFont] % or > \setuphead[chapter][style={\myChapterFont}] > > generates the following compile error... > > ! Font \**myChapterFont**:=myHeadingsFont at 20.736pt not loadable: > metric data not found or bad. > > \relax > \dododefinefont ...ontspec {#2}\rawfontidentifier > \let > \localrelativefontsiz... > \dosetfontattribute ...me #1#2\@EA \endcsname \fi > \empty > \doplaceheadnumbertext ...bute {\??ko #1}\c!style > \getvalue {\??ko > #1\c!comm... > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1} > {#3}{#4}... > l.54 \chapter{chapter test} > > ? > ! Emergency stop. > > \relax > \dododefinefont ...ontspec {#2}\rawfontidentifier > \let > \localrelativefontsiz... > \dosetfontattribute ...me #1#2\@EA \endcsname \fi > \empty > \doplaceheadnumbertext ...bute {\??ko #1}\c!style > \getvalue {\??ko > #1\c!comm... > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1} > {#3}{#4}... > l.54 \chapter{chapter test} > > ! ==> Fatal error occurred, no output PDF file produced! > > ------------------------------------------------------------------------------- > > (2) \definefont[myChapterFont][Sans sa 1.728] % with > > \setuphead[chapter][style=myChapterFont] % or > \setuphead[chapter][style=\myChapterFont] % or > \setuphead[chapter][style={\myChapterFont}] > > displays the chapter heading with a scaled LMSans10-Regular font This did happen because Latin Modern Sans is the default sans serif font, you have to define a typescript with the desired font as sans style or you use a symbolic name for 'myChapterFont', in your case 'Dummy-Regular'. \starttypescript [myBodyFont] \definetypeface [myBodyFont] [rm] [serif] [myBodyFont] [default] \definetypeface [myBodyFont] [ss] [sans] [myHeadingsFont] [default] \stoptypescript works with the definition from you because it use now Arial as sans font. > ------------------------------------------------------------------------------- > > (3) this displays the chapter heading font correctly > > \setuphead[chapter][style={\tfc\myHeadingsFont}] > > ------------------------------------------------------------------------------- > > (4) \setuphead[chapter][style={\tfc\Sans}] > > generates the following compile error... > > ! Undefined control sequence. > \@@kochapterstyle ->\tfc \Sans > > \doifdefinedelse #1->\edef \p!defined {#1 > }\ifcsname \detokenize \@EA > {\p!def... > \doconvertfont #1->\doifdefinedelse {\@letter@ #1} > {\doifelsenothing > {#1}\go... > \dosetfontattribute ...me #1#2\@EA \endcsname \fi > \empty > \doplaceheadnumbertext ...bute {\??ko #1}\c!style > \getvalue {\??ko > #1\c!comm... > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1} > {#3}{#4}... > l.54 \chapter{chapter test} > > ? > ! Emergency stop. > \@@kochapterstyle ->\tfc \Sans > > \doifdefinedelse #1->\edef \p!defined {#1 > }\ifcsname \detokenize \@EA > {\p!def... > \doconvertfont #1->\doifdefinedelse {\@letter@ #1} > {\doifelsenothing > {#1}\go... > \dosetfontattribute ...me #1#2\@EA \endcsname \fi > \empty > \doplaceheadnumbertext ...bute {\??ko #1}\c!style > \getvalue {\??ko > #1\c!comm... > \dodododoconstructhead ...{\finalsectionnumber }}} > \writesection {#1} > {#3}{#4}... > l.54 \chapter{chapter test} > > ! ==> Fatal error occurred, no output PDF file produced! The correct definition is: \setuphead[chapter][style={\tfc\ss}] You should also read Aditya Mahajans about article about fonts: http://wiki.contextgarden.net/Font_Switching http://www.tug.org/TUGboat/Articles/tb28-2/tb89mahajan.pdf Regards, Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________