When I run your code with tex live 2015 in Mac OS X, I just get a font-not-found
error. As I see it, that's because I can't just say \setmainfont{<name>}
if the font isn't installed on your system. But as this discussion shows, other people claim that's wrong. In that case I have no idea why fontspec
can't find Alegreya
.
But at any rate, if I specify the file names of the fonts, as I usually do, everything works fine:
\documentclass{report}
\usepackage{fontspec}
\setmainfont{Alegreya-Regular.ttf}
\begin{document}
fi ff fl
\end{document}

Now this code is obviously just a minimal example to illustrate how you get the ligatures. Don't use that code and expect to get bold, italic, and small caps fonts. They have to be specified as well.
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Alegreya}[
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic,
UprightFeatures = {SmallCapsFont = *SC-Regular},
ItalicFeatures = {SmallCapsFont = *SC-Italic},
BoldFeatures = {SmallCapsFont = *SC-Bold},
BoldItalicFeatures = {SmallCapsFont = *SC-BoldItalic}]
\begin{document}
fi ff fl
\textit{fi ff fl}
\textbf{fi ff fl}
\textbf{\textit{fi ff fl}}
\textsc{Small caps}
\textsc{\textit{Small caps}}
\textsc{\textbf{Small caps}}
\textsc{\textbf{\textit{Small caps}}}
\end{document}

I'm not sure why you say that Alegreya is .otf
, because the fonts that are distributed with TeX (which come from Google Fonts) are .ttf
.
Also, you say that you need fontspec
to access Icelandic characters. That's not correct, because all the characters of Modern Icelandic are included in the most common font encoding, T1
:
\documentclass{article}
\usepackage{Alegreya}
\usepackage[T1]{fontenc}
\begin{document}
\TH etta er \'islenskt m\'al, og \th a\dh\ er ekki skrifa\dh\ \'a \"o\dh ru m\'ali.
\end{document}

As per your comment, I have no idea why this would give you an error about T1
being undefined for Alegreya. I don't think the Alegreya
package ever came without T1
fonts, so that seems very odd to me. Update your Alegreya
package and try again.
xelatex -output-driver="xdvipdfmx -v -E" foo.tex