Re: [XeTeX] what is \setmainfont used for?

2017-02-10 Thread Ulrike Fischer
Am Fri, 10 Feb 2017 08:54:09 +0100 schrieb Zdenek Wagner:

> OK, I have a newer version. Maybe the bug is known and was fixed just a few
> days ago.

What do mean by that you have newer version? Your fontspec is from
2016 and mine from 2017.

And yes the bug is known. I discussed it two weeks ago with Will. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] what is \setmainfont used for?

2017-02-09 Thread Zdenek Wagner
OK, I have a newer version. Maybe the bug is known and was fixed just a few
days ago. I use to update TL from time to time (but not in a middle of an
important project).

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2017-02-10 0:49 GMT+01:00 Ulrike Fischer :

> Am Fri, 10 Feb 2017 00:40:00 +0100 schrieb Zdenek Wagner:
>
> > Which version of fontspec dou you have? On my computer it works fine with
> > 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
>
> \ProvidesExplPackage{fontspec}%
>   {2017/01/24}{2.5d}{Font selection
> for XeLaTeX and LuaLaTeX}
>
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] what is \setmainfont used for?

2017-02-09 Thread Ulrike Fischer
Am Fri, 10 Feb 2017 00:40:00 +0100 schrieb Zdenek Wagner:

> Which version of fontspec dou you have? On my computer it works fine with
> 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX

\ProvidesExplPackage{fontspec}%
  {2017/01/24}{2.5d}{Font selection
for XeLaTeX and LuaLaTeX}


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] what is \setmainfont used for?

2017-02-09 Thread Zdenek Wagner
Which version of fontspec dou you have? On my computer it works fine with
2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2017-02-10 0:07 GMT+01:00 Ulrike Fischer :

> Am Thu, 9 Feb 2017 23:20:51 +0100 schrieb François Patte:
>
> > I don't understant how to use \setmainfont. It seems that something has
> > changed between texlive-2014 and texlive-2016.
> >
> > If I compile this :
> >
> > <
> > \documentclass[a4paper,twoside,11pt]{book}
> >
> > \usepackage{fontspec}
> > \usepackage{polyglossia}
> > \setdefaultlanguage{sanskrit}
> >
> > \setmainfont{%
> >   FreeSerif%
> > }%
> > [%
> > Mapping=velthuis-sanskrit,%
> > Script=Devanagari,
> > ]
> >
> > \begin{document}
> >   ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
> >   ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
> >   apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h
> >
> > \end{document}
> > <
> >
> > Output is not in devanagari
> >
>
> The problem is that fontspec adds by default "Ligature=TeX". In
> xelatex this is implemented through a mapping and so disables the
> Mapping=velthuis-sanskrit.
>
> This has been already discussed and hopefully Will will correct in
> the near future. In the mean time you can disable the ligature
> mapping:
>
> \documentclass[a4paper,twoside,11pt]{book}
>
> \usepackage{fontspec}
> \usepackage{polyglossia}
> \setdefaultlanguage{sanskrit}
>
> \defaultfontfeatures[\rmfamily,\sffamily]{} %<---
>
> \setmainfont{%
>   FreeSerif%
> }%
> [%
> Mapping=velthuis-sanskrit,%
> Script=Devanagari,
> ]
>
> %
> \begin{document}
>   ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
>   ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
>   apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h
>
> \end{document}
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] what is \setmainfont used for?

2017-02-09 Thread Ulrike Fischer
Am Thu, 9 Feb 2017 23:20:51 +0100 schrieb François Patte:

> I don't understant how to use \setmainfont. It seems that something has
> changed between texlive-2014 and texlive-2016.
> 
> If I compile this :
> 
> <
> \documentclass[a4paper,twoside,11pt]{book}
> 
> \usepackage{fontspec}
> \usepackage{polyglossia}
> \setdefaultlanguage{sanskrit}
> 
> \setmainfont{%
>   FreeSerif%
> }%
> [%
> Mapping=velthuis-sanskrit,%
> Script=Devanagari,
> ]
> 
> \begin{document}
>   ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
>   ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
>   apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h
> 
> \end{document}
> <
> 
> Output is not in devanagari
> 

The problem is that fontspec adds by default "Ligature=TeX". In
xelatex this is implemented through a mapping and so disables the
Mapping=velthuis-sanskrit.

This has been already discussed and hopefully Will will correct in
the near future. In the mean time you can disable the ligature
mapping:

\documentclass[a4paper,twoside,11pt]{book}

\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{sanskrit}

\defaultfontfeatures[\rmfamily,\sffamily]{} %<---

\setmainfont{%
  FreeSerif%
}%
[%
Mapping=velthuis-sanskrit,%
Script=Devanagari,
]

%
\begin{document}
  ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
  ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
  apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h

\end{document}

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] what is \setmainfont used for?

2017-02-09 Thread Philip Taylor


François Patte wrote:
> if I compile this:
>
> <--
> \documentclass[a4paper,twoside,11pt]{book}
>
> \usepackage{fontspec}
> \usepackage{polyglossia}
> \setdefaultlanguage{sanskrit}
>
> \newfontfamily{\devanagarifont}{FreeSerif}%
> [Mapping=velthuis-sanskrit,Script=Devanagari]
>
> \begin{document}
> ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
> ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
> apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h
>
> \end{document}
> <
>
> I get a correct output in devanagari script...
You have declared a new font family, but as far as I can see, you make no 
subsequent use of that declaration, François.
Of course, I know nothing about either LaTeX or fontspec (or polyglossia, for 
that matter) but that is how it appears to me.

Philip Taylor


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex