[lltx] [fontspec] selecting font features has no effect?

Diederick C. Niehorster dcnieho at gmail.com
Tue Mar 30 13:49:43 CEST 2010


Hi Will,

Thanks for the quick update, just got the newest fontspec from github.

On Tue, Mar 30, 2010 at 4:07 PM, Will Robertson <wspr81 at gmail.com> wrote:
> On 30/03/2010, at 4:17 PM, Diederick C. Niehorster wrote:
>
>> %\setmainfont[Mapping=tex-text,Ligatures=Common]{TeX Gyre Heros}
>> \setmainfont[Mapping=tex-text,Ligatures=Common]{Arno Pro}
>
> This is going to be a problem, I can tell.
> LuaTeX uses a different mechanism to get TeX ligatures; you want to use "Ligatures=TeX" instead of "Mapping=tex-text". (The former will also work in XeTeX.)

Done, works for both XeTeX and LuaTeX.

>
> (P.S.  You should never have to write "Ligatures=Common". I need to write something about that in the manual.)

Ah, I remember having to do that when I first tried out fontspec a
long time ago, by default i got historic ligatures as well... Can't
remember where that happened and its not happening with the current
font. Now I was trying if explicitly turning it on might make them pop
up ;)

>> {\addfontfeature{RawFeature=+swsh}\textit{Test}}
>
> What does  "\addfontfeature{Style=Swash}" say?

Well, it says not available in XeTeX :P
I've modified my source too:
---
\documentclass[11pt]{article}

\usepackage{lipsum}
\usepackage{fontspec}
%\setmainfont[Ligatures=TeX]{TeX Gyre Heros}
\setmainfont[Ligatures=TeX]{Arno Pro}

\begin{document}
``fi fl ffi--ffl---ff!`''\par
\textsc{Test}
\typeout{--1--}
{\addfontfeature{RawFeature=+swsh}\textit{Test}}
\typeout{--2--}
{\addfontfeature{Style=Swash}\textit{Test}}
\typeout{--3--}
{\fontspec[Style=Swash]{Arno Pro Italic}Test}

\lipsum
\end{document}
---
Compiling in XeTeX gets me:
---
--1--
--2--
 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro',
(fontspec)   with script 'Latin', and language 'Default'.

--3--
 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro Italic/I',
(fontspec)   with script 'Latin', and language 'Default'.

 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro Italic/I',
(fontspec)   with script 'Latin', and language 'Default'.

 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro Italic/BI',
(fontspec)   with script 'Latin', and language 'Default'.

 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro Italic/BI',
(fontspec)   with script 'Latin', and language 'Default'.
---
I guess those are all normal, the upright Arno Pro has no swash (so
there is no check if the raw feature requested exists?) and I guess
the italic variant of Arno Pro Italic does not exist ;)
See the attached output *_xelatex.pdf, the second attempt does not
yield a swash, whereas the first does (I like it the first does,
RawFeature is powerful in this sense!).

LuaTeX breaks here on not finding Arno Pro Italic, tho it has it in
its otfl-names.lua:
---
--1--

--2--

 fontspec Warning:  OpenType feature 'Style=Swash' (+swsh) not available
(fontspec)   for font 'Arno Pro',
(fontspec)   with script 'Latin', and language 'Default'.


--3--

! Font \zf at basefont=Arno Pro Italic at 10.95pt not loadable: metric data not fo
und or bad.
<to be read again>
                   \let
l.16 {\fontspec[Style=Swash]{Arno Pro Italic}
                                             Test}
---
--- otfl-names.lua:
{
   ["checksum"]="F342E0175B3F2F8E22AF2FA67EB88D92",
   ["familyname"]="ArnoPro",
   ["filename"]="arnopro-italic.otf",
   ["fontname"]="ArnoPro-Italic",
   ["fontstyle_name"]="Italic",
   ["fullname"]="Arno Pro Italic",
   ["names"]={
    ["family"]="arnopro",
    ["fullname"]="ArnoPro-Italic",
    ["psname"]="ArnoPro-Italic",
    ["subfamily"]="Italic",
   },
   ["size"]={ 120, 140, 110 },
   ["slant"]=-11,
   ["weight"]=400,
   ["width"]=5,
  }
---
Note that LuaTex outputs the same warning for case two about a missing feature.

I then comment out case 3 and luatex compiles succesfully. However,
the resulting document has no ligatures (whether TeX ligatures, or
f_i), no swash and no small caps, see attached *_lualatex.pdf.

By the way, why is the font attempted to be loaded at 10.95pt when I
request 11pt?

Best,
Dee

To unsubscribe from this group, send email to lualatex-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_xelatex.pdf
Type: application/pdf
Size: 20865 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100330/a5ef5dea/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_lualatex.pdf
Type: application/pdf
Size: 17600 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100330/a5ef5dea/attachment-0001.pdf>


More information about the lualatex-dev mailing list