On 11/13/07, Jeff Smith wrote:
> On Nov 10, 2007 9:23 PM, Mojca Miklavec wrote:
> > Of course not :)
> >
> > You can say (features=default is optional)
> >     \definefontsynonym[SomeFont][name:Font Name][features=default]
> > which means that XeTeX will call the font
> >     \font\somefont="FontName;mapping=tex-text,..." (tex-text is
> > implied by features=default)
> >
> > Back in January and before one achived the same by saying
> >     \definefontsynonym[SomeFont]['Font Name;mapping=tex-text'][encoding=uc]
> > Now encoding=uc is not needed any more since it's implied when one
> > runs XeTeX or LuaTeX. To be honest, it's not completely clear to me
> > what should happen with type-xtx typescripts (how to remove uc
> > encoding from there).
> >
> > The other possibility is to say
> >     \definefontsynonym[SomeFont][file:lmroman12-regular][features=default]
> > which means that XeTeX will load the font "lmroman12-regular.otf" from
> > texmf tree, the equivalent in plain XeTeX being
> >     \font\somefont="[lmroman12-regular];mapping=tex-text,..."
> >
> > When there is neither file: nor name: prefix
> > (\definefontsynonym[SomeFont][lmr12]), it means that XeTeX will try to
> > load a font in this order
> > - lmr12 (good old tfm fonts)
> > - "lmr12"
> > - "[lmr12]"
> > (the order might change)
>
> Hmmm.. must I use \setupbodyfont as well when using the
> \definefontsynonym method? Because those alternative methods don't
> work.
> This works:
>
> \definetypeface[corps][rm][Xserif][Garamond Premier Pro]
> \setupbodyfont[corps,12pt]

Oh, sorry. I should explan a bit more in detail. When you're using
Xsans, you're actually using approxximately the following shortcuts
(see type-xtx.tex; although what I'm sending here are the new/fixed
definitions, they should work the same way):

\starttypescript[Xserif][all][name]
\definefontsynonym[Dummy]          [name:\typescripttwo]   [features=default]
\definefontsynonym[DummyItalic]    [name:\typescripttwo/I] [features=default]
\definefontsynonym[DummyBold]      [name:\typescripttwo/B] [features=default]
\definefontsynonym[DummyBoldItalic][name:\typescripttwo/BI][features=default]
\definefontsynonym[DummyCaps]      [name:\typescripttwo]   [features=smallcaps]
...
\definefontsynonym[Serif]           [Dummy]
\definefontsynonym[SerifBold]       [DummyBold]
\definefontsynonym[SerifItalic]     [DummyItalic]
\definefontsynonym[SerifBoldItalic] [DummyBoldItalic]
\definefontsynonym[SerifCaps]       [DummyCaps]
\stoptypescript

Xserif defines the whole family, so switches like \bf, \bi, ... etc
will work properly.

> But not this:
>
> \definefontsynonym[corps][name:Garamond Premier Pro][features=default]
>  or
> \definefontsynonym[corps][file:GaramondPremrPro.][features=default]
>  or
> \definefontsynonym[corps][Garamond Premier Pro][features=default]

That only defines a font, but doesn't switch to it. You could:
1.) use \definedfont[corps], but things like \bf for example won't work
2.) use \definefontsynonym[Serif][file:GaramondPremrPro][features=default]
3.) create a proper typescript, here's an example from type-xtx, which
you can adapt for your needs:

\starttypescript[serif][timesnewroman]
\definefontsynonym[MSTimes]          [name:Times New Roman]
[features=default]
\definefontsynonym[MSTimesItalic]    [name:Times New Roman Italic]
[features=default]
\definefontsynonym[MSTimesBold]      [name:Times New Roman Bold]
[features=default]
\definefontsynonym[MSTimesBoldItalic][name:Times New Roman Bold
Italic][features=default]
\stoptypescript

\starttypescript[serif][timesnewroman][name]
\definefontsynonym[Serif]           [MSTimes]
\definefontsynonym[SerifBold]       [MSTimesBold]
\definefontsynonym[SerifItalic]     [MSTimesItalic]
\definefontsynonym[SerifBoldItalic] [MSTimesBoldItalic]
\definefontsynonym[SerifSlanted]    [MSTimesItalic]
\definefontsynonym[SerifBoldSlanted][MSTimesBoldItalic]
\definefontsynonym[SerifCaps]       [MSTimes]
\stoptypescript

\definetypeface[mytimes][rm][serif][timesnewroman]
\setupbodyfont[mytimes,12pt]

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

Reply via email to