-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
When using the fontspec package, the current font size doesn't get automatically applied as Optical Size when rendering with luaotfload. However, it does work when HarfBuzz is the chosen renderer, so I think this is an issue of luaotfload. If not, please correct me.
Just using HarfBuzz isn't a good alternative, since it's an external program and LaTeX cannot use it's own (and very good) line breaking/paragraph formatting mechanism (correct me if I'm wrong on this, too)
MWE:
To show this, I used the Roboto Flex font. The file needs to be in the same folder and must be named "RobotoFlex.ttf". However, this can be done with any font that uses the Optical Size axis (opsz).
I'm using MiKTeX, all packages are up to date (LuaHBTeX 1.22.0).
\documentclass{article}
\usepackage{fontspec}
\setmainfont{RobotoFlex}[
Path = {./},
Extension = {.ttf}
]
\begin{document}
{\Huge Hello World!}
{\addfontfeature{Renderer = {HarfBuzz}} \Huge Hello World!}
\end{document}
Result of running the MWE:
Metadata
Metadata
Assignees
Labels
No labels