From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63680 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: font, line spacing issues Date: Thu, 18 Nov 2010 21:04:43 +0100 Message-ID: <895E7F7B-FAEC-4B20-AE64-0C8C49C95058@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/mixed; boundary="===============1734952454==" X-Trace: dough.gmane.org 1290110812 17667 80.91.229.12 (18 Nov 2010 20:06:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2010 20:06:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 18 21:06:48 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 1PJAkp-0005J4-G2 for gctc-ntg-context-518@m.gmane.org; Thu, 18 Nov 2010 21:06:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7B7A9CA864; Thu, 18 Nov 2010 21:06:46 +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 IdoJl9uqVVsx; Thu, 18 Nov 2010 21:06:40 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F310CA852; Thu, 18 Nov 2010 21:06:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F2BAFCA852 for ; Thu, 18 Nov 2010 21:06:38 +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 mqEJLTQ7LkT1 for ; Thu, 18 Nov 2010 21:06:24 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 61A2ECA851 for ; Thu, 18 Nov 2010 21:06:24 +0100 (CET) Original-Received: from mail-gw0-f41.google.com (mail-gw0-f41.google.com [74.125.83.41]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAIK6MIL014629 for ; Thu, 18 Nov 2010 21:06:23 +0100 Original-Received: by gwj16 with SMTP id 16so129849gwj.14 for ; Thu, 18 Nov 2010 12:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=+KppmhErsht85cKRKmaCcBTzXueQrfHcZbKsHm3N2wU=; b=cTZ7rqFYnT1YsXUUXh1eYiO3/VL0Yeuenq0PSj7tyKVOMozu94TDERerAiTLDzLIa7 nZf/4Q0X0fQMBovMpdwrB1hSfIUlqFaW1qbHCx569aRdpKkfcW1cWm/EYfexXsvXlP/u 0at1u7SH/7oMS5k4297oOYvQD22ZQNntseh4U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=RTx2mYx6Dwph/yX3BG7Y3KYMMkqT5kPpD6QttqdsK2G6yrfvbWgY484y2yLN4/rRRz FpZlEUYqQ8jAYdbJcHcD1rgRafP2X+nfKwEJBx74rxHPdShEmrtr0W4XJYYxx33zTRNt GeWj6ZFcQcsjv7Gsas6N35Q1Km+0A6SovITLU= Original-Received: by 10.204.65.131 with SMTP id j3mr1030124bki.144.1290110780433; Thu, 18 Nov 2010 12:06:20 -0800 (PST) Original-Received: from [192.168.2.23] (p5B292FF6.dip.t-dialin.net [91.41.47.246]) by mx.google.com with ESMTPS id f21sm452826bkf.0.2010.11.18.12.06.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Nov 2010 12:06:19 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; 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: 0bDwI6mhA - 7bf931f6fa25 - 20101118 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:63680 Archived-At: --===============1734952454== Content-Type: multipart/alternative; boundary=Apple-Mail-1-418354636 --Apple-Mail-1-418354636 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 18.11.2010 um 01:25 schrieb Peter Davis: > As an experiment, I'm trying to duplicate a sample InDesign document = with ConTeXt. I'm getting the overall layout (though my image positions = need tweaking), but I'm having some problems with the fonts. >=20 > I'm following the examples in = http://www.pragma-ade.com/general/manuals/showfont.pdf , but I haven't = seen the \switchtotypeface operator documented anywhere else. I'm on a = Windows 7 machine, with minimals installed. I'm trying to use some of = the system fonts (Minion, Impact, Myriad), but all I seem to get is CMR. Use \switchtobodyfont to switch to a different font. With your font settings context expects predefined lists with links to = the font files (from symbolic names, e.g. \rm, \ss, \tf, \it etc. to the = real files) but in my example below you can see a method (specserif and = specsans) which does what you expect but i didn=92t use it for Minion = and Myriad because the system isn=92t perfect yet and you get unwanted = results. > Also, the line spacing on the paragraph at the top of the second page = seems very weird. It's an address, and the bottom line is much too high = relative to the spacing of the other lines. See my example, i set the font switch with \starttextbox or to be true = with \framed[foregroundstyle=3D{...}]. \definepapersize[card][width=3D792pt,height=3D612pt] \setuppapersize[card][card] \definetypeface[impact][rm][specserif][Impact] [default] %\definetypeface[minion][rm][specserif][Minion Pro][default] % This does = not produce the desired result, %\definetypeface[myriad][ss][specsans] [Myriad Pro][default] % therefore = i load the adobe typescripts \usetypescriptfile[type-adobe] \definetypeface[minion][rm][serif][minion][default] \definetypeface[myriad][ss][sans] [myriad][default] \definecolor[red][c=3D0,m=3D.87,y=3D.87,k=3D0] \definelayer[textbox][width=3D\paperwidth,height=3D\paperheight] \setupbackgrounds[page][background=3Dtextbox] \def\starttextbox {\dosingleargument\dostarttextbox} \def\dostarttextbox[#1]% = {\def\stoptextbox{\setlayerframed[textbox][width=3D6cm,align=3Dnormal,fram= e=3Doff,#1]{\getbuffer[textbox]}}% \startbuffer[textbox][starttextbox][stoptextbox]} \starttext = \starttextbox[x=3D195.3pt,y=3D115.2pt,width=3D560.7pt,foregroundstyle=3D{\= switchtobodyfont[impact,48pt]},align=3Dmiddle] Yo, First! \stoptextbox \page[empty] = \starttextbox[x=3D447.6pt,y=3D228pt,width=3D229.5pt,foregroundstyle=3D{\sw= itchtobodyfont[minion,14pt]}] Title. First Last\\ Company\\ Street Address\\ City, State, ZIP \stoptextbox = \starttextbox[x=3D85.2pt,y=3D228pt,width=3D229.5pt,foregroundstyle=3D{\swi= tchtobodyfont[minion,14pt]}] Dear First, \blank Are you aware that now is the {\bf winter of our discontent}? It's been = made {\it glori}{\red\it ous} {\red\bi sum}{\bi mer} by this son of = York. \blank I say let's put it back the way it was. Are you with me, Last? \blank Good. \blank -pd \stoptextbox = \starttextbox[x=3D249.6pt,y=3D62.4pt,width=3D298.8pt,foregroundstyle=3D{\s= witchtobodyfont[myriad,20pt]}] Peter Davis\\ Head Hoo-Ha\\ Hoo-Ha House, Inc.\\ 123 Fourfivesix St.\\ Lake Placebo, NY 12345-6789 \stoptextbox \page[empty] \stoptext PS. Please put blank lines in your file to make it easier to read the = source. Wolfgang --Apple-Mail-1-418354636 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
As an = experiment, I'm trying to duplicate a sample InDesign document with = ConTeXt.  I'm getting the overall layout (though my image positions = need tweaking), but I'm having some problems with the fonts.

I'm following the examples in http://www= .pragma-ade.com/general/manuals/showfont.pdf , but I haven't = seen the \switchtotypeface operator documented anywhere else.  I'm = on a Windows 7 machine, with minimals installed.  I'm trying to use = some of the system fonts (Minion, Impact, Myriad), but all I seem to get = is CMR.

Use \switchtobodyfont to = switch to a different font.

With your font = settings context expects predefined lists with links to the font files = (from symbolic names, e.g. \rm, \ss, \tf, \it etc. to the real files) = but in my example below you can see a method (specserif and specsans) = which does what you expect but i didn=92t use it for Minion and Myriad = because the system isn=92t perfect yet and you get unwanted = results.

Also, the line spacing = on the paragraph at the top of the second page seems very weird. =  It's an address, and the bottom line is much too high relative to = the spacing of the other lines.

See my = example, i set the font switch with \starttextbox or to be true with = \framed[foregroundstyle=3D{...}].

\definepap= ersize[card][width=3D792pt,height=3D612pt]

\setup= papersize[card][card]

\definetypeface[impact][rm]= [specserif][Impact]   =  [default]
%\definetypeface[minion][rm][specserif][Minion = Pro][default] % This does not produce the desired = result,
%\definetypeface[myriad][ss][specsans] [Myriad = Pro][default] % therefore i load the adobe = typescripts

\usetypescriptfile[type-adobe]
<= div>
\definetypeface[minion][rm][serif][minion][default]
\definetypeface[myriad][ss][sans] = [myriad][default]

\definecolor[red][c=3D0,m=3D.87= ,y=3D.87,k=3D0]

\definelayer[textbox][width=3D\pa= perwidth,height=3D\paperheight]

\setupbackgrounds= [page][background=3Dtextbox]

\def\starttextbox
  {\dosingleargument\dostarttextbox}

\def\dostarttextbox[#1]%
  {\def\stoptextbox{\se= tlayerframed[textbox][width=3D6cm,align=3Dnormal,frame=3Doff,#1]{\getbuffe= r[textbox]}}%
   = \startbuffer[textbox][starttextbox][stoptextbox]}

\starttext

\starttextbox[x=3D195.3pt,y=3D115.2pt= ,width=3D560.7pt,foregroundstyle=3D{\switchtobodyfont[impact,48pt]},align=3D= middle]
Yo, = First!
\stoptextbox

\page[empty]
<= div>
\starttextbox[x=3D447.6pt,y=3D228pt,width=3D229.5pt,for= egroundstyle=3D{\switchtobodyfont[minion,14pt]}]
Title. First = Last\\
Company\\
Street Address\\
City, = State, = ZIP
\stoptextbox

\starttextbox[x=3D85.2= pt,y=3D228pt,width=3D229.5pt,foregroundstyle=3D{\switchtobodyfont[minion,1= 4pt]}]
Dear First,
\blank
Are you aware = that now is the {\bf winter of our discontent}? It's been made {\it = glori}{\red\it ous} {\red\bi sum}{\bi mer} by this son of = York.
\blank
I say let's put it back the way it was. = Are you with me, = Last?
\blank
Good.
\blank
-pd
\stoptextbox

\starttextbox[x=3D249.6pt,y=3D= 62.4pt,width=3D298.8pt,foregroundstyle=3D{\switchtobodyfont[myriad,20pt]}]=
Peter Davis\\
Head Hoo-Ha\\
Hoo-Ha House, = Inc.\\
123 Fourfivesix St.\\
Lake Placebo, NY = 12345-6789
\stoptextbox

\page[empty]

\stoptext

PS. Please put = blank lines in your file to make it easier to read the = source.

Wolfgang

= --Apple-Mail-1-418354636-- --===============1734952454== 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1734952454==--