ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XeTeX "tex-text" mapping problem
@ 2007-02-12  9:46 Oliver Buerschaper
  2007-02-12 11:12 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Buerschaper @ 2007-02-12  9:46 UTC (permalink / raw)
  To: mailing ConTeXt users list for

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

Hi all,

there seems to be a problem with the XeTeX engine and the  
"mapping:tex-text" feature for OpenType fonts. Try this:

---

\usetypescriptfile[type-minion]
\usetypescript[minion][uc]
\setupbodyfont[minion,13pt]

\starttext
There is --- without any doubt --- a tiny problem.
\stoptext

---

together with the attached typescript file. Unfortunately, "---" is  
not replaced by an em dash :-( Substituting works flawlessly for  
plain XeTeX examples. Of course, replacing "---" with the proper  
Unicode em dash in the above source solves the problem (by avoiding it).

Any hints as to what I've done wrong?

Best,
Oliver



[-- Attachment #2: type-minion.tex --]
[-- Type: application/octet-stream, Size: 1148 bytes --]

% Font-specific typescripts [family][typescript name][encoding]

\starttypescript[serif][minion][uc]
	\definefontsynonym[MinionRegular]   ["Minion Pro:mapping=tex-text;+onum"][encoding=uc]
	\definefontsynonym[MinionItalic]    ["Minion Pro/I:mapping=tex-text"]    [encoding=uc]
	\definefontsynonym[MinionCaps]      ["Minion Pro:mapping=tex-text;+smcp"][encoding=uc]
	\definefontsynonym[MinionBold]      ["Minion Pro/B:mapping=tex-text"]    [encoding=uc]
	\definefontsynonym[MinionBoldItalic]["Minion Pro/BI:mapping=tex-text"]   [encoding=uc]
\stoptypescript


% Map from font-specific names to ConTeXt-wide names

\starttypescript[serif][minion][name]
	\definefontsynonym[Serif]           [MinionRegular]
	\definefontsynonym[SerifItalic]     [MinionItalic]
	\definefontsynonym[SerifSlanted]    [MinionItalic]
	\definefontsynonym[SerifCaps]       [MinionCaps]
	\definefontsynonym[SerifBold]       [MinionBold]
	\definefontsynonym[SerifBoldItalic] [MinionBoldItalic]
	\definefontsynonym[SerifBoldSlanted][MinionBoldItalic]
\stoptypescript


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

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: XeTeX "tex-text" mapping problem
  2007-02-12  9:46 XeTeX "tex-text" mapping problem Oliver Buerschaper
@ 2007-02-12 11:12 ` Hans Hagen
  2007-02-12 13:14   ` Mojca Miklavec
  2007-02-12 13:28   ` Oliver Buerschaper
  0 siblings, 2 replies; 4+ messages in thread
From: Hans Hagen @ 2007-02-12 11:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
> Hi all,
>
> there seems to be a problem with the XeTeX engine and the 
> "mapping:tex-text" feature for OpenType fonts. Try this:
>
> ---
>
> \usetypescriptfile[type-minion]
> \usetypescript[minion][uc]
> \setupbodyfont[minion,13pt]
>
> \starttext
> There is --- without any doubt --- a tiny problem.
> \stoptext
>
> ---
>
> together with the attached typescript file. Unfortunately, "---" is 
> not replaced by an em dash :-( Substituting works flawlessly for plain 
> XeTeX examples. Of course, replacing "---" with the proper Unicode em 
> dash in the above source solves the problem (by avoiding it).
>
> Any hints as to what I've done wrong?
what is mapping=tex-text supposed to do? 

Hans 


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

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

* Re: XeTeX "tex-text" mapping problem
  2007-02-12 11:12 ` Hans Hagen
@ 2007-02-12 13:14   ` Mojca Miklavec
  2007-02-12 13:28   ` Oliver Buerschaper
  1 sibling, 0 replies; 4+ messages in thread
From: Mojca Miklavec @ 2007-02-12 13:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2/12/07, Hans Hagen wrote:
> Oliver Buerschaper wrote:
> > Hi all,
> >
> > there seems to be a problem with the XeTeX engine and the
> > "mapping:tex-text" feature for OpenType fonts. Try this:
> >
> > ---
> >
> > \usetypescriptfile[type-minion]
> > \usetypescript[minion][uc]
> > \setupbodyfont[minion,13pt]
> >
> > \starttext
> > There is --- without any doubt --- a tiny problem.
> > \stoptext
> >
> > ---
> >
> > together with the attached typescript file. Unfortunately, "---" is
> > not replaced by an em dash :-( Substituting works flawlessly for plain
> > XeTeX examples. Of course, replacing "---" with the proper Unicode em
> > dash in the above source solves the problem (by avoiding it).
> >
> > Any hints as to what I've done wrong?
> what is mapping=tex-text supposed to do?

Since commercial fonts usually don't have ligatures which are common
for TeX (one of them being endash and emdash), this options
artificially adds some more ligatures (or perhaps does other things as
well), so that TeX works as usual.

In 99% cases, "Mapping=tex-text" should be applied to the font used by
XeTeX. (If possible, it would be great if it could be applied
automatically to any OpenType font used by XeTeX.)

Example from http://wiki.contextgarden.net/Fonts_in_XeTeX:
    \definefontsynonym  [DidotRegular]['Didot:mapping=tex-text']   [encoding=uc]

That's one of the features where I warned you about the colon (but as
I understood you, you were trying to move those options to the last
argument). But I don't know what the current state with font switching
and font parameters is.

Mojca

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

* Re: XeTeX "tex-text" mapping problem
  2007-02-12 11:12 ` Hans Hagen
  2007-02-12 13:14   ` Mojca Miklavec
@ 2007-02-12 13:28   ` Oliver Buerschaper
  1 sibling, 0 replies; 4+ messages in thread
From: Oliver Buerschaper @ 2007-02-12 13:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> Hi all,
>>
>> there seems to be a problem with the XeTeX engine and the
>> "mapping:tex-text" feature for OpenType fonts. Try this:
>>
>> ---
>>
>> \usetypescriptfile[type-minion]
>> \usetypescript[minion][uc]
>> \setupbodyfont[minion,13pt]
>>
>> \starttext
>> There is --- without any doubt --- a tiny problem.
>> \stoptext
>>
>> ---
>>
>> together with the attached typescript file. Unfortunately, "---" is
>> not replaced by an em dash :-( Substituting works flawlessly for  
>> plain
>> XeTeX examples. Of course, replacing "---" with the proper Unicode em
>> dash in the above source solves the problem (by avoiding it).
>>
>> Any hints as to what I've done wrong?
> what is mapping=tex-text supposed to do?

As far as I understood it's supposed to map TeX character sequences  
like "--" or "---" onto the corresponding Unicode characters. In fact  
these sequences aren't necessary at all, one could easily type the  
appropriate Unicode dashes in the source code. However, for the  
source editor I use a monospaced font which makes it rather hard to  
distinguish those proper Unicode dashes. I guess the character  
substitution that "mapping=tex-text" performs will extend to few  
other TeX sequences as well ... but definitely not for accented  
characters. Perhaps

http://scripts.sil.org/cms/scripts/page.php? 
site_id=nrsi&item_id=xetex_faq#ligs

might be helpful.

Oliver

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

end of thread, other threads:[~2007-02-12 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  9:46 XeTeX "tex-text" mapping problem Oliver Buerschaper
2007-02-12 11:12 ` Hans Hagen
2007-02-12 13:14   ` Mojca Miklavec
2007-02-12 13:28   ` Oliver Buerschaper

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