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

Diederick C. Niehorster dcnieho at gmail.com
Wed Mar 31 03:35:58 CEST 2010

On Wed, Mar 31, 2010 at 6:11 AM, Will Robertson <wspr81 at gmail.com> wrote:
> On 30/03/2010, at 10:19 PM, Diederick C. Niehorster wrote:
>
>> \typeout{--1--}
>> \typeout{--2--}
>> \typeout{--3--}
>> {\fontspec[Style=Swash]{Arno Pro Italic}Test}
>
> Nice test, thanks.
> I don't have Arno Pro and this really shows what's going on.
> I think you've pretty much worked out why it didn't work the first time around; although fontspec should be smarter about applying {Style=Swash} even if it's not present in the upright font.
>
> (And you've noted that RawFeature doesn't check its input; this is something I'd like to change eventually too.)
>
> For your example above, you'd want to use markup like
>
>
> or (better)
>
>   \newfontface\swash[Style=Swash]{Arno Pro Italic}
>   ...
>   \swash
>
>
>> Note that LuaTex outputs the same warning for case two about a missing feature.
>
> Does seem like something is wrong with the LuaTeX processing in this example.
>
>
>> By the way, why is the font attempted to be loaded at 10.95pt when I
>> request 11pt?
>
> A legacy design decision in LaTeX.
> I'd have to look up the exact maths to check why that was chosen as the "rounded value" close to some geometric progression.

Ah, so its somewhere deep in LaTeX, maybe something for someone else
to check up on then, in general it seems nice to get exactly what you
want, should be no problem anymore nowadays. Anyway, its pretty close.

I just updated to the very latest luaotfload from github and added
your two suggested test cases, but I had to run with my old fontname
database, I'm having issues with it not being generated correctly

Testcase:
----
\documentclass[11pt]{article}

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

\begin{document}
fi fl ffi--ffl---ff!''\par
\textsc{Test}
\typeout{--1--}
\typeout{--2--}
\typeout{--3--}
{\fontspec[Style=Swash]{Arno Pro Italic}Test}
\typeout{--4--}
\typeout{--5--}
\newfontface\swash[Style=Swash]{Arno Pro Italic}
{\swash Test}

\lipsum
\end{document}
----

here's what i get:

XeTeX (log + output attached):
Notice that attempt 5 fails (I kept pressing enter till processing
completed). Also notice that 4 should be fine, but no swash is
actually found in the output file

LuaTeX (log + output attached):
No ligatures, swashes, smallcaps (note the very first test is supposed
to be in small caps, like in teh xetex output). Also, both cases 3 and
5 fail. regarding case 3, I seem to be having more issues with the
font name database under lua, so that might be related ;)

Georg, i see very similar memory usage. Taco looked into it and
submitted one small patch plus noted that some memory use
optimizations in the context version of the code are not in the latex
versions yet. The difference in his test was between around 800 and
around 350 MB (latex and context respectively). Anyway, as long as the
machine doesn't run out, we're good!

Best,
Dee

--
To unsubscribe, reply using "remove me" as the subject.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_luatex.log
Type: application/octet-stream
Size: 131079 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100331/852bdea2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_luatex.pdf
Type: application/pdf
Size: 17635 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100331/852bdea2/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_xetex.log
Type: application/octet-stream
Size: 112026 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100331/852bdea2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lipsum_test_xetex.pdf
Type: application/pdf
Size: 20900 bytes
Desc: not available
URL: <http://tug.org/pipermail/lualatex-dev/attachments/20100331/852bdea2/attachment-0001.pdf>
`