From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47554 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: Re: strange fontswitching error Date: Fri, 20 Feb 2009 10:24:22 +0100 Message-ID: <326847810902200124r463af6fbt4b832ca4fda47bd3@mail.gmail.com> References: <326847810902190527v1308f85ax3c3b3a3adcf62821@mail.gmail.com> <499DD0C0.1080808@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1725149243==" X-Trace: ger.gmane.org 1235122017 29073 80.91.229.12 (20 Feb 2009 09:26:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2009 09:26:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 20 10:28:11 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 1LaRg2-0005Hb-Tg for gctc-ntg-context-518@m.gmane.org; Fri, 20 Feb 2009 10:28:11 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C7ECF1FC7B; Fri, 20 Feb 2009 10:26:48 +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 31015-01; Fri, 20 Feb 2009 10:26:00 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 642291FB30; Fri, 20 Feb 2009 10:25:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 442401FADB for ; Fri, 20 Feb 2009 10:25:15 +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 30394-02 for ; Fri, 20 Feb 2009 10:24:25 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by ronja.ntg.nl (Postfix) with ESMTP id BE4161FC51 for ; Fri, 20 Feb 2009 10:24:24 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by filter1-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n1K9ONvT026172 for ; Fri, 20 Feb 2009 10:24:23 +0100 Original-Received: by nf-out-0910.google.com with SMTP id g16so87155nfd.44 for ; Fri, 20 Feb 2009 01:24:23 -0800 (PST) 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=PLug+9WU13DMyPF7zg8UVSeHpWWTO3lYPgSpKsNKPsw=; b=Lmxr1wasWQmquRsEdAOWqq+fOx5IcgjPTfG+rjF5F5BsWoBJG0/9In5eFTsaYmCNnk cl883Fi9YwvdQaTuI6KW5fL77hs4HPsVjKtqPmBmoM8kQVc/+T4lnbE9gTWV1PAmkTCh wnLQso7u2y8QMk8YPUSz0sfx2F+y3XVXRoYog= 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=BlIPVeK/L8u9iy9QZK9hrFVeGOaZsbQCzj68Lq5jy0f8/grd94Ug3pvU7Ijp4pv+to pps3GG4+b7ys0Gr1CMXZtf97m7DKGVWNV4RMCTTtFyn5wi6atFBPcSPooYHM8j1yLf0y VDM9IuzEZ+hx1W4gjXYSf/V2n22DripalhWO8= Original-Received: by 10.210.53.5 with SMTP id b5mr477165eba.131.1235121863022; Fri, 20 Feb 2009 01:24:23 -0800 (PST) In-Reply-To: <499DD0C0.1080808@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=64.233.182.188; 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: 182786757 - 07a2c5cc00ab X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 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:47554 Archived-At: --===============1725149243== Content-Type: multipart/alternative; boundary=0015174be18ae659880463563711 --0015174be18ae659880463563711 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Hans. This works, except... \usetypescriptfile[tps_timesnewroman] \usetypescript[timesnewroman] \usetypescriptfile[tps_verdana] \usetypescript[verdana] \def\myBodyFontSize{14pt} \def\myHeadFontSize{14pt} \setupbodyfont[verdana,\myBodyFontSize] \setuphead[chapter][style=3D{\switchtobodyfont[timesnewroman,\myHeadFontSiz= e]}] \starttext \chapter{First Chapter} \input knuth \stoptext (1) with for example - bodyfont =3D verdana, head font =3D timesnewroman (or the reverse) bodyfont size =3D 12pt, headfont size 12 pt =3D> pdf is fine bodyfont size =3D 13pt, headfont size 13 pt =3D> chapter head is blank bodyfont size =3D 14pt, headfont size 14 pt =3D> chapter head is blank (2) what to use instead of \definetypeface[myFont][...] to be able to write \setupbodyfont[myFont,...] and/or \switchtobodyfont[myFont,...] ? Alan On Thu, Feb 19, 2009 at 10:36 PM, Hans Hagen wrote: > Alan Stone wrote: > >> Hi, >> >> BF =3D body font >> HF =3D head font >> >> A =3D arial >> T =3D times new roman >> V =3D verdana >> >> OT =3D 12 =3D 12pt >> OF =3D 14 =3D 14pt >> >> See comments in fontswitch.tex >> >> In attachment... >> >> - fontswitch.tex: minimal example >> - tps_arial.tex, tps_timesnewroman.tex, tps_verdana.tex: typescripts >> - fontswitch.log for BFT14 + HFV14 -> font error ( same with BFA14 + HFV= 14 >> ) >> - fontswitch.pdf for BFT14 + HFV14 : chapter head is blank ( same with >> BFA14 >> + HFV14 ) >> >> After testing different font(switching) combinations... >> >> - BFA14 or BFT14 + HFVx with x not 14pt compile and print the generated >> pdf >> fine >> - BFV14 + HFV14 compiles and prints the generated pdf fine >> - BFA12, BFT12, BFV12 + HFV14 or HFV12 compile and print the generated p= df >> fine >> >> Qu=E9 passa ? >> > > you use undefined typefaces; in mkii we default to an empty fontclass whi= ch > in turn will trigger default fallbacks (i.e. the main bodyfont has no > fontclass) while in mkiv we default to the 'modern' fontclass; i'm still = not > sure if it will be kept this way but if so, i'll make a fallback again (t= his > time to a default fontclass) > > % \usetypescriptfile[tps_arial] \usetypescript[arial] > \usetypescriptfile[tps_timesnewroman] \usetypescript[timesnewroman] > \usetypescriptfile[tps_verdana] \usetypescript[verdana] > > \def\myFontSizeOT{12pt} > \def\myFontSizeOF{19pt} > > % \setupbodyfont[arial, \myFontSizeOT] > % \setupbodyfont[timesnewroman,\myFontSizeOT] > \setupbodyfont[verdana, \myFontSizeOT] > > % \setupbodyfont[arial, \myFontSizeOF] > % \setupbodyfont[timesnewroman,\myFontSizeOF] > % \setupbodyfont[verdana, \myFontSizeOF] > > % \setuphead[chapter][style=3D{\switchtobodyfont[arial,\myFontSizeOT]}] > % > \setuphead[chapter][style=3D{\switchtobodyfont[timesnewroman,\myFontSizeO= T]}] > % \setuphead[chapter][style=3D{\switchtobodyfont[verdana,\myFontSizeOT]}] > > \setuphead[chapter][style=3D{\switchtobodyfont[arial,\myFontSizeOF]}] > % > \setuphead[chapter][style=3D{\switchtobodyfont[timesnewroman,\myFontSizeO= F]}] > % \setuphead[chapter][style=3D{\switchtobodyfont[verdana,\myFontSizeOF]}] > > \starttext > > \chapter{First Chapter} > > \input knuth > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --=20 Alan --0015174be18ae659880463563711 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Hans.
 
This works, except...
 
\usetypescriptfile[tps_timesnewroman]
\usetypescript[timesnewroman]
 
\usetypescriptfile[tps_verdana]
\usetypescript[verdana]
 
\def\myBodyFontSize{14pt}
\def\myHeadFontSize{14pt}
 
\setupbodyfont[verdana,\myBodyFontSize]
\setuphead[chapter][style=3D{\switchtobodyfont[timesnewroman,\myHeadFo= ntSize]}]
 
\starttext
\chapter{First Chapter}
\input knuth
\stoptext
 
(1) with for example
 
- bodyfont =3D verdana, head font =3D timesnewroman (or the reverse)
bodyfont size =3D 12pt, headfont size 12 pt =3D> pdf is f= ine
bodyfont size =3D 13pt, headfont size 13 pt =3D> cha= pter head is blank
bodyfont size =3D 14pt, headfont size 14 pt =3D> cha= pter head is blank
 
(2) what to use instead of \definetypeface[myFont][...] to be able to = write \setupbodyfont[myFont,...] and/or \switchtobodyfont[myFont,...] ?
 
Alan

On Thu, Feb 19, 2009 at 10:36 PM, Hans Hagen <pragma@wxs.nl> wrote:
Alan Stone wrote:
Hi,

BF =3D body font
H= F =3D head font

A =3D arial
T =3D times new roman
V =3D verdan= a

OT =3D 12 =3D 12pt
OF =3D 14 =3D 14pt

See comments in fontswitch.= tex

In attachment...

- fontswitch.tex: minimal example
- t= ps_arial.tex, tps_timesnewroman.tex, tps_verdana.tex: typescripts
- font= switch.log for BFT14 + HFV14 -> font error ( same with BFA14 + HFV14 ) - fontswitch.pdf for BFT14 + HFV14 : chapter head is blank ( same with BFA1= 4
+ HFV14 )

After testing different font(switching) combinations.= ..

- BFA14 or BFT14 + HFVx with x not 14pt compile and print the gen= erated pdf
fine
- BFV14 + HFV14 compiles and prints the generated pdf fine
- BFA= 12, BFT12, BFV12 + HFV14 or HFV12 compile and print the generated pdf
fi= ne

Qu=E9 passa ?

you use undefined typefac= es; in mkii we default to an empty fontclass which in turn will trigger def= ault fallbacks (i.e. the main bodyfont has no fontclass) while in mkiv we d= efault to the 'modern' fontclass; i'm still not sure if it will= be kept this way but if so, i'll make a fallback again (this time to a= default fontclass)

% \usetypescriptfile[tps_arial]         \usetypescr= ipt[arial]
\usetypescriptfile[tps_timesnewroman] \usetypescript[timesnew= roman]
\usetypescriptfile[tps_verdana]       \usetypescri= pt[verdana]

\def\myFontSizeOT{12pt}
\def\myFontSizeOF{19pt}

% \setupbodyfont[arial,      =  \myFontSizeOT]
% \setupbodyfont[timesnewroman,\myFontSizeOT]
\= setupbodyfont[verdana,      \myFontSizeOT]

% \setupbo= dyfont[arial,        \myFontSizeOF]
% \setupbodyfont[timesnewroman,\myFontSizeOF]
% \setupbodyfont[verdana, =      \myFontSizeOF]

% \setuphead[chapter][style=3D{\s= witchtobodyfont[arial,\myFontSizeOT]}]
% \setuphead[chapter][style=3D{\s= witchtobodyfont[timesnewroman,\myFontSizeOT]}]
% \setuphead[chapter][style=3D{\switchtobodyfont[verdana,\myFontSizeOT]}]
\setuphead[chapter][style=3D{\switchtobodyfont[arial,\myFontSizeOF]}]=
% \setuphead[chapter][style=3D{\switchtobodyfont[timesnewroman,\myFontS= izeOF]}]
% \setuphead[chapter][style=3D{\switchtobodyfont[verdana,\myFontSizeOF]}]
\starttext

\chapter{First Chapter}

\input knuth

=
-----------------------------------------------------------------
                     = ;                    Hans= Hagen | PRAGMA ADE
             Ridd= erstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 4= 77 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                     = ;                     &nb= sp; | www.pragma-po= d.nl
---------------------------------------------------------------= --
_____________________________________________________________________= ______________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-c= ontext
webpage  : htt= p://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supel= ec.fr/projects/contextrev/
wiki     : http://contextgarden.net
_________________________________________= __________________________________________



--
Alan
--0015174be18ae659880463563711-- --===============1725149243== 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 ___________________________________________________________________________________ --===============1725149243==--