Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Size feature + variable fonts = unexpected output #534

Open
Keks-Dose opened this issue Oct 31, 2024 · 1 comment
Open

Size feature + variable fonts = unexpected output #534

Keks-Dose opened this issue Oct 31, 2024 · 1 comment

Comments

@Keks-Dose
Copy link

https://tex.stackexchange.com/questions/729880/size-features-for-variable-fonts-have-non-consistent-output

MWE:

\DocumentMetadata{lang=de}
\documentclass[parskip=half, ngerman, fontsize=12pt, paper=A5, DIV=25]{scrartcl}
\usepackage{babel}
\usepackage{fontspec}

% \setsansfont{Alegreya Sans Regular}[
% Renderer = HarfBuzz,
% SizeFeatures = {
%   {Size = -11, OpticalSize = 16, Color=AA0000},
%   {Size=11-13, OpticalSize=36, Color=00AA00},    
%   {Size=13-, OpticalSize=72, Color=0000AA}},
% BoldFont=Alegreya Sans Bold,
% ItalicFont=Alegreya Sans Italic,
% BoldItalicFont=Alegreya Sans BoldItalic,
% BoldFeatures = {
%   SizeFeatures = {
%   {Size = -11, OpticalSize = 16, Color=AA0000},
%   {Size=11-13, OpticalSize=36, Color=00AA00},    
%   {Size=13-, OpticalSize=72, Color=0000AA}},
%   }
%     ]

\setsansfont{FrauncesVariable.ttf}[
%Renderer = HarfBuzz,
SizeFeatures = {
  {Size = -11, OpticalSize = 16, Color=AA0000},
  {Size=11-13, OpticalSize=36, Color=00AA00},    
  {Size=13-, OpticalSize=72, Color=0000AA}},
BoldFont = *,
ItalicFont = FrauncesItalicVariable.ttf,
BoldItalicFont = FrauncesItalicVariable.ttf, 
UprightFeatures = {Weight = 300},
ItalicFeatures = {Weight = 300},
BoldFeatures = {Weight = 600},
BoldItalicFeatures = {Weight = 600},
]

\renewcommand{\familydefault}{\sfdefault}

\title{Fraunces}

\newcommand{\blindsatz}{Lorem ipsum dolor sit amet, consectetuer
  adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque
  pharetra sollicitudin. Praesent imperdiet mi nec ante. Donec
  ullamcorper, felis non sodales commodo,}



\begin{document}
\maketitle{}



1234567890

\blindsatz{}\footnote{\blindsatz{}}

\emph{\blindsatz{} 1234567890}

\textbf{\blindsatz{}}

\textbf{\emph{\blindsatz{}}}

\end{document}
% Local Variables:
% TeX-engine: Lua-dev
% End:

The italic paragraph is green, despite there is no size + color command for the italic. 
![241031-Fraunces-Variable](https://github.com/user-attachments/assets/76eed7e2-20c1-4279-8465-f4f54ae0a703)

Works with Alegreya Sans as expected. I used Fraunces, because it is mentioned in the luaotfload manual.

@zauguin
Copy link
Member

zauguin commented Nov 17, 2024

Personally I would have expected the SizeCommands to be inherited by other styles and am more surprised that bold italic is not showing up in green, but in any case luaotfload is working as expected here and rendering exactly what is requested by fontspec. Moving to fontspec to figure out what the intended behavior is and if it fits what's currently happening.

@zauguin zauguin transferred this issue from latex3/luaotfload Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants