ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fonts with XeTeX
@ 2008-11-17 20:39 Bart C. Wise
  2008-11-17 21:22 ` Thomas A. Schmitz
  2008-11-17 21:25 ` Arthur Reutenauer
  0 siblings, 2 replies; 4+ messages in thread
From: Bart C. Wise @ 2008-11-17 20:39 UTC (permalink / raw)
  To: Context Mailing List

I am having difficulties writing a typescript for the Caslon font that's on my 
system.

The following works:

\definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy]
\definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic]
\definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman]

\starttext
Testing
\switchtobodyfont[Caslon-Regular] Testing
\switchtobodyfont[Caslon-Bold] Testing
\switchtobodyfont[Caslon-Italic] Testing
\stoptext


However, I tried to write a simple typescript for the same font.  I came up 
with the following:

\starttypescript[serif][caslon][uc]
    \definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc]
    \definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc]
    \definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc]
\stoptypescript

\starttypescript[serif][caslon][name]
    \definefontsynonym  [Serif]           [CaslonRegular]
    \definefontsynonym  [SerifItalic]     [CaslonItalic]
    \definefontsynonym  [SerifBold]       [CaslonBold]
\stoptypescript

\starttypescript[caslon][uc]
    \definetypeface[caslon][rm][serif][caslon][default][encoding=uc]
\stoptypescript

\usetypescript[caslon][uc]
\setupbodyfont[caslon, 12pt]

\starttext
Testing {\bf Testing} {\it Testing}
\stoptext

It fails to compile on the \setupbodyfont line.

I know I'm doing something wrong, but every variation I've tried ends up with 
a compile error, or the caslon font is never loaded and it reverts back to the 
default font.

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


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

* Re: Fonts with XeTeX
  2008-11-17 20:39 Fonts with XeTeX Bart C. Wise
@ 2008-11-17 21:22 ` Thomas A. Schmitz
  2008-11-17 21:25 ` Arthur Reutenauer
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas A. Schmitz @ 2008-11-17 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Nov 17, 2008, at 9:39 PM, Bart C. Wise wrote:

> I am having difficulties writing a typescript for the Caslon font  
> that's on my
> system.
>
> The following works:
>
> \definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy]
> \definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic]
> \definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman]
>
> \starttext
> Testing
> \switchtobodyfont[Caslon-Regular] Testing
> \switchtobodyfont[Caslon-Bold] Testing
> \switchtobodyfont[Caslon-Italic] Testing
> \stoptext
>
>
> However, I tried to write a simple typescript for the same font.  I  
> came up
> with the following:
>
> \starttypescript[serif][caslon][uc]
>    \definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc]
>    \definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc]
>    \definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc]
> \stoptypescript
>
> \starttypescript[serif][caslon][name]
>    \definefontsynonym  [Serif]           [CaslonRegular]
>    \definefontsynonym  [SerifItalic]     [CaslonItalic]
>    \definefontsynonym  [SerifBold]       [CaslonBold]
> \stoptypescript
>
> \starttypescript[caslon][uc]
>    \definetypeface[caslon][rm][serif][caslon][default][encoding=uc]
> \stoptypescript
>
> \usetypescript[caslon][uc]
> \setupbodyfont[caslon, 12pt]
>
> \starttext
> Testing {\bf Testing} {\it Testing}
> \stoptext
>
> It fails to compile on the \setupbodyfont line.
>
> I know I'm doing something wrong, but every variation I've tried  
> ends up with
> a compile error, or the caslon font is never loaded and it reverts  
> back to the
> default font.
>
Fonts in XeTeX are still a mystery to me, but from what I've learned  
in the last months, it seems that the syntax for luatex typescripts  
can and should also be used for XeTeX. This works on my system (latest  
beta):

file: type-caslon.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\starttypescript [serif] [caslon]
   \definefontsynonym [Caslon-Roman]          [file:ACaslonPro- 
Regular]  [features=default]
   \definefontsynonym [Caslon-Bold]           [file:ACaslonPro-Bold]   
[features=default]
   \definefontsynonym [Caslon-Italic]         [file:ACaslonPro- 
Italic]  [features=default]
   \definefontsynonym [Caslon-Bold-Italic]    [file:ACaslonPro- 
BoldItalic] [features=default]
   \definefontsynonym [Caslon-SmallCaps]      [file:ACaslonPro- 
Regular]  [features=smallcaps]
  \stoptypescript

\starttypescript [serif] [caslon]
   \usetypescript[serif][fallback]
   \definefontsynonym [Serif]           [Caslon-Roman]  
[features=default]
   \definefontsynonym [SerifItalic]     [Caslon-Italic]  
[features=default]
   \definefontsynonym [SerifBold]       [Caslon-Bold] [features=default]
   \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic]  
[features=default]
   \definefontsynonym [SerifCaps]       [Caslon-SmallCaps]  
[features=smallcaps]
\stoptypescript

\starttypescript [Caslon]
   \definetypeface [Caslon] [rm] [serif] [caslon] [default]
\stoptypescript

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

and then:

\usetypescriptfile[type-caslon]
\usetypescript[Caslon]
\setupbodyfont[Caslon,12pt]

\starttext

Hello World!

\stoptext

HTH

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


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

* Re: Fonts with XeTeX
  2008-11-17 20:39 Fonts with XeTeX Bart C. Wise
  2008-11-17 21:22 ` Thomas A. Schmitz
@ 2008-11-17 21:25 ` Arthur Reutenauer
  2008-11-17 22:15   ` Bart C. Wise
  1 sibling, 1 reply; 4+ messages in thread
From: Arthur Reutenauer @ 2008-11-17 21:25 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

	Hello Bart,

  Try

  \starttypescript[serif][caslon][uc]
      \definefontsynonym[CaslonRegular][name:CaslonOldFaceBT-Roman][encoding=uc]
      \definefontsynonym[CaslonItalic][name:CaslonOldFaceBT-Italic][encoding=uc]
      \definefontsynonym[CaslonBold][name:CaslonOldFaceBT-Heavy][encoding=uc]
  \stoptypescript
  
  \starttypescript[serif][caslon][name]
      \definefontsynonym  [Serif]           [CaslonRegular]
      \definefontsynonym  [SerifItalic]     [CaslonItalic]
      \definefontsynonym  [SerifBold]       [CaslonBold]
  \stoptypescript
  
  \starttypescript[caslon][uc]
      \definetypeface[caslon][rm][serif][caslon][default][encoding=uc]
  \stoptypescript
  
  \usetypescript[caslon][uc]
  \setupbodyfont[caslon, 12pt]
  
  \starttext
  Testing {\bf Testing} {\it Testing}
  \stoptext

  Note the two changes: \definetypeface's in the first typescript have
been replaced with \definefontsynonym commands, and the font names have
been prepended with "name:", forcing XeTeX to look for an installed font
instead of a TFM (in plain XeTeX, you get the same result by surrounding
the font name with double quotes).

  I am unable to test the typescript because I don't have Caslon Old
Face, but it works when I replace the font names with the appropriate
faces from Adobe Caslon, which I have.

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


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

* Re: Fonts with XeTeX
  2008-11-17 21:25 ` Arthur Reutenauer
@ 2008-11-17 22:15   ` Bart C. Wise
  0 siblings, 0 replies; 4+ messages in thread
From: Bart C. Wise @ 2008-11-17 22:15 UTC (permalink / raw)
  To: ntg-context

Arthur,

This works!  Thanks for your help.

Bart

On Monday 17 November 2008 02:25:15 pm Arthur Reutenauer wrote:
> 	Hello Bart,
>
>   Try
>
>   \starttypescript[serif][caslon][uc]
>      
> \definefontsynonym[CaslonRegular][name:CaslonOldFaceBT-Roman][encoding=uc]
> \definefontsynonym[CaslonItalic][name:CaslonOldFaceBT-Italic][encoding=uc]
> \definefontsynonym[CaslonBold][name:CaslonOldFaceBT-Heavy][encoding=uc]
> \stoptypescript
>
>   \starttypescript[serif][caslon][name]
>       \definefontsynonym  [Serif]           [CaslonRegular]
>       \definefontsynonym  [SerifItalic]     [CaslonItalic]
>       \definefontsynonym  [SerifBold]       [CaslonBold]
>   \stoptypescript
>
>   \starttypescript[caslon][uc]
>       \definetypeface[caslon][rm][serif][caslon][default][encoding=uc]
>   \stoptypescript
>
>   \usetypescript[caslon][uc]
>   \setupbodyfont[caslon, 12pt]
>
>   \starttext
>   Testing {\bf Testing} {\it Testing}
>   \stoptext
>
>   Note the two changes: \definetypeface's in the first typescript have
> been replaced with \definefontsynonym commands, and the font names have
> been prepended with "name:", forcing XeTeX to look for an installed font
> instead of a TFM (in plain XeTeX, you get the same result by surrounding
> the font name with double quotes).
>
>   I am unable to test the typescript because I don't have Caslon Old
> Face, but it works when I replace the font names with the appropriate
> faces from Adobe Caslon, which I have.
>
> 	Arthur
> ___________________________________________________________________________
>________ 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
> ___________________________________________________________________________
>________

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


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-17 20:39 Fonts with XeTeX Bart C. Wise
2008-11-17 21:22 ` Thomas A. Schmitz
2008-11-17 21:25 ` Arthur Reutenauer
2008-11-17 22:15   ` Bart C. Wise

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