It's another bug in the metric files for the Alegreya font. None of the italic or slanted fonts has the correct value in \fontdimen1
. You can use the same workaround I proposed for How can some eastern European diacritics be correctly displayed with the Alegreya font and pdftex? modified for taking also into account the value in \fontdimen1
, but you should file a bug report.
\documentclass{scrbook}
\usepackage[T1]{fontenc}
\DeclareFontFamily{T1}{Alegreya-LF}{}
\newcommand{\adjustalegreyaxheight}{\fontdimen5\font=\fontcharht\font`x }
\newcommand{\adjustalegreyaslant}{\fontdimen1\font=0.25pt }
\makeatletter
\let\Alegreya@@scale\@empty
%%% uncomment the next line if you want to scale the font,
%%% changing the value to what suits you
% \def\Alegreya@@scale{s*[0.9]}%
\makeatother
\DeclareFontShape{T1}{Alegreya-LF}{k}{n}{
<-> \Alegreya@@scale Alegreya-Black-lf-t1
}{\adjustalegreyaxheight}
\DeclareFontShape{T1}{Alegreya-LF}{k}{it}{
<-> \Alegreya@@scale Alegreya-BlackItalic-lf-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{k}{sl}{
<-> ssub * Alegreya-LF/k/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{b}{n}{
<-> \Alegreya@@scale Alegreya-Bold-lf-t1
}{\adjustalegreyaxheight}
\DeclareFontShape{T1}{Alegreya-LF}{b}{it}{
<-> \Alegreya@@scale Alegreya-BoldItalic-lf-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{b}{sl}{
<-> ssub * Alegreya-LF/b/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{m}{n}{
<-> \Alegreya@@scale Alegreya-Regular-lf-t1
}{\adjustalegreyaxheight}
\DeclareFontShape{T1}{Alegreya-LF}{m}{it}{
<-> \Alegreya@@scale Alegreya-Italic-lf-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{m}{sl}{
<-> ssub * Alegreya-LF/m/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{bx}{sl}{
<-> ssub * Alegreya-LF/b/sl
}{\adjustalegreyaxheight\adjustalegreyaslant}
\DeclareFontShape{T1}{Alegreya-LF}{bx}{n}{
<-> ssub * Alegreya-LF/b/n
}{\adjustalegreyaxheight}
\DeclareFontShape{T1}{Alegreya-LF}{bx}{it}{
<-> ssub * Alegreya-LF/b/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
\usepackage{Alegreya}
\begin{document}
Normal text. \emph{Emphasized text.} \emph{Emphasized text including \emph{emphasized} text.}
The x-height: \expandafter\texttt\expandafter{\the\fontdimen5\font}
The height of `x': \expandafter\texttt\expandafter{\the\fontcharht\font`x}
Rodion \^{S}edrin
\u{U}ladz\`{i}m\`{i}r Damarackij
V\^{a}\v{c}\`{e}sla\u{u} Kuzn\^{a}co\u{u}
\footnotesize
The x-height: \expandafter\texttt\expandafter{\the\fontdimen5\font}
The height of `x': \expandafter\texttt\expandafter{\the\fontcharht\font`x}
Rodion \^{S}edrin
\u{U}ladz\`{i}m\`{i}r Damarackij
V\^{a}\v{c}\`{e}sla\u{u} Kuzn\^{a}co\u{u}
\end{document}

I've left the bits in the other answer, for completeness.
Explanation
In order to see if a font is slanted, LaTeX examines the parameter \fontdimen1
in the current font. If this is zero, LaTeX assumes it's upright.
More flexible hack
Here is code that should take care of all the four combination (lining/oldstyle, tabular/nontabular) for figures, so that Alegreya
can be called with any option.
\documentclass{scrbook}
\usepackage[T1]{fontenc}
%%%%% HACK BEGINS
\def\adjustalegreyaslant{\fontdimen1\font=0.25pt }
\def\adjustalegreyaxheight{}
%%%% remove the following when you have Alegreya
%%%% with the date 2014-01-18 (or later)
\def\adjustalegreyaxheight{\fontdimen5\font=\fontcharht\font`x }
\begingroup\makeatletter
%%% scale option
\let\alegreyascale\@empty
%%% uncomment the next line if you want to scale the font,
%%% changing the value to what suits you
% \def\alegreyascale{s*[0.9]}
%% spaces and end of lines are ignored
\catcode`\ =9 \endlinechar=-1
\newcommand\adjustallalegreyafamilies[2]{
\def\alegreyasuffix{#1}\def\alegreyainfix{#2}
\DeclareFontFamily{T1}{Alegreya-\alegreyasuffix}{}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{k}{n}{
<-> \alegreyascale Alegreya-Black-\alegreyainfix-t1
}{\adjustalegreyaxheight}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{k}{it}{
<-> \alegreyascale Alegreya-BlackItalic-\alegreyainfix-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{k}{sl}{
<-> ssub * Alegreya-\alegreyasuffix/k/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{b}{n}{
<-> \alegreyascale Alegreya-Bold-\alegreyainfix-t1
}{\adjustalegreyaxheight}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{b}{it}{
<-> \alegreyascale Alegreya-BoldItalic-\alegreyainfix-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{b}{sl}{
<-> ssub * Alegreya-\alegreyasuffix/b/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{m}{n}{
<-> \alegreyascale Alegreya-Regular-\alegreyainfix-t1
}{\adjustalegreyaxheight}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{m}{it}{
<-> \alegreyascale Alegreya-Italic-\alegreyainfix-t1
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{m}{sl}{
<-> ssub * Alegreya-\alegreyasuffix/m/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{bx}{sl}{
<-> ssub * Alegreya-\alegreyasuffix/b/sl
}{\adjustalegreyaxheight\adjustalegreyaslant}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{bx}{n}{
<-> ssub * Alegreya-\alegreyasuffix/b/n
}{\adjustalegreyaxheight}
%
\DeclareFontShape{T1}{Alegreya-\alegreyasuffix}{bx}{it}{
<-> ssub * Alegreya-\alegreyasuffix/b/it
}{\adjustalegreyaxheight\adjustalegreyaslant}
}
% execute the above for all four combinations
\adjustallalegreyafamilies{LF}{lf}
\adjustallalegreyafamilies{OsF}{osf}
\adjustallalegreyafamilies{TLF}{tlf}
\adjustallalegreyafamilies{TOsF}{tosf}
\endgroup
%%%%% HACK ENDS
%%%% now you can load the Alegreya package with the desired options
\usepackage[osf]{Alegreya}
\begin{document}
0123456789{\bfseries 0123456789}{\itshape 0123}{\slshape 0123}
Normal text. \emph{Emphasized text.} \emph{Emphasized text including \emph{emphasized} text.}
The x-height: \expandafter\texttt\expandafter{\the\fontdimen5\font}
The height of `x': \expandafter\texttt\expandafter{\the\fontcharht\font`x}
Rodion \^{S}edrin
\u{U}ladz\`{i}m\`{i}r Damarackij
V\^{a}\v{c}\`{e}sla\u{u} Kuzn\^{a}co\u{u}
\footnotesize
The x-height: \expandafter\texttt\expandafter{\the\fontdimen5\font}
The height of `x': \expandafter\texttt\expandafter{\the\fontcharht\font`x}
Rodion \^{S}edrin
\u{U}ladz\`{i}m\`{i}r Damarackij
V\^{a}\v{c}\`{e}sla\u{u} Kuzn\^{a}co\u{u}
\end{document}
\adjustalegreyaxheight
, but the hack remains essentially the same.