ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font, line spacing issues
@ 2010-11-18  0:25 Peter Davis
  2010-11-18 20:04 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Davis @ 2010-11-18  0:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2717 bytes --]

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.

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.

Here's the file:

\definepapersize[card][width=792pt,height=612pt]

\setuppapersize[card][card]

\definetypeface[impact[rm][serif][mpact regular][default]

\definetypeface[minion][rm][serif][Minion Pro Regular][default]

\definetypeface[myriad][rm][serif][Myriad Pro Regular][default]

\setupcolor[cmyk]

\setupcolors[state=start]

\definecolor[red][c=0,m=.87,y=.87,k=0]

\definelayer[textbox][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=textbox]

\def\starttextbox

{\dosingleargument\dostarttextbox}

\def\dostarttextbox[#1]%

{\def\stoptextbox{\setlayerframed[textbox][width=6cm,align=normal,frame=off,#1]{\getbuffer[textbox]}}%

\startbuffer[textbox][starttextbox][stoptextbox]}

\starttext

%\starttextbox[x=12pt,y=20pt,width=768pt]

%\useexternalfigure[ador1][Chrysanthemum.jpg][width=768pt]

%\placefigure[here,force][]{none}{\externalfigure[ador1]}

%\stoptextbox

\starttextbox[x=195.3pt,y=115.2pt,width=560.7pt]

\switchtotypeface[impact][48pt]

\midaligned{Yo, First!}

\stoptextbox

\page[empty]

\starttextbox[x=447.6pt,y=228pt,width=229.5pt]

\switchtotypeface[minion][14pt]%

Title. First Last \\

Company \\

Street Address \\

City, State, ZIP

\stoptextbox

\starttextbox[x=85.2pt,y=228pt,width=229.5pt]

\switchtotypeface[minion][14pt]%

Dear First,\\

\blank

Are you aware that now is the {\bf winter of our discontent}? It's been made
{\it glori}\color[red]{\it ous} \color[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=85.2pt,y=62.4pt,width=229.5pt]

%\useexternalfigure[ador2][pd-logo-nobg.eps][scale=245.37]

%\placefigure[here,force][pdlogo]{none}{\externalfigure[ador2]}

%\stoptextbox

\starttextbox[x=249.6pt,y=62.4pt,width=298.8pt]

\switchtotypeface[myriad][20pt]%

Peter Davis\\

Head Hoo-Ha\\

Hoo-Ha House, Inc.\\

123 Fourfivesix St.\\

Lake Placebo, NY 12345-6789

\stoptextbox

 \page[empty]

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 12768 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: font, line spacing issues
  2010-11-18  0:25 font, line spacing issues Peter Davis
@ 2010-11-18 20:04 ` Wolfgang Schuster
  2010-11-18 22:15   ` Peter Davis
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2010-11-18 20:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3273 bytes --]


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.
> 
> 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’t use it for Minion and Myriad because the system isn’t 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={...}].

\definepapersize[card][width=792pt,height=612pt]

\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=0,m=.87,y=.87,k=0]

\definelayer[textbox][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=textbox]

\def\starttextbox
  {\dosingleargument\dostarttextbox}

\def\dostarttextbox[#1]%
  {\def\stoptextbox{\setlayerframed[textbox][width=6cm,align=normal,frame=off,#1]{\getbuffer[textbox]}}%
   \startbuffer[textbox][starttextbox][stoptextbox]}

\starttext

\starttextbox[x=195.3pt,y=115.2pt,width=560.7pt,foregroundstyle={\switchtobodyfont[impact,48pt]},align=middle]
Yo, First!
\stoptextbox

\page[empty]

\starttextbox[x=447.6pt,y=228pt,width=229.5pt,foregroundstyle={\switchtobodyfont[minion,14pt]}]
Title. First Last\\
Company\\
Street Address\\
City, State, ZIP
\stoptextbox

\starttextbox[x=85.2pt,y=228pt,width=229.5pt,foregroundstyle={\switchtobodyfont[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=249.6pt,y=62.4pt,width=298.8pt,foregroundstyle={\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


[-- Attachment #1.2: Type: text/html, Size: 4487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: font, line spacing issues
  2010-11-18 20:04 ` Wolfgang Schuster
@ 2010-11-18 22:15   ` Peter Davis
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Davis @ 2010-11-18 22:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1035 bytes --]

On Thu, Nov 18, 2010 at 3:04 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> 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.
>
> 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.
>

Thanks very much, Wolfgang!  I really appreciate the clear example.


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

Sorry about that.  The .tex file has blank lines, but somehow they
disappeared in the process of copying and pasting into mail.

-pd

[-- Attachment #1.2: Type: text/html, Size: 1860 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-18 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18  0:25 font, line spacing issues Peter Davis
2010-11-18 20:04 ` Wolfgang Schuster
2010-11-18 22:15   ` Peter Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).