-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support for OpenType Variable Fonts #321
Comments
fontspec only provides an interface to what luaotfload and XeTeX can do. I’m out of the loop as to whether they support OT variable fonts… as soon as they have the capability I can add it to fontspec.
|
I suggest report to upstream: |
According to upstream in latex3/luaotfload#120, the default |
It already works under % !TEX program = lualatex
\documentclass{article}
\usepackage{forloop}
\usepackage{fontspec}
\setmainfont{Hundred.ttf} %https://github.com/edward-martyr/Hundred-ASCII/blob/master/Hundred.ttf
\begin{document}
\newcounter{themenumber}
\forloop{themenumber}{20}{\value{themenumber} < 101}{{\addfontfeatures{RawFeature={+axis={wght=\arabic{themenumber}}}}a}}
\end{document} |
There seems to be an issue in picking the correct default values for the font axes: for instance \documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\setmainfont{Source Serif 4 Variable}
\begin{document}
The quick brown fox jumps over the lazy dog.
\end{document} fails, unless you add a \defaultfontfeatures{RawFeature={+axis={wght=100}}} before the However, if I am correct, the font |
Version 1.8 of the OpenType font format specification introduced Variable Fonts and Adobe's Source * Pro fonts using this mechanisms are already available (see the "Releases" section of the GitHub repos) and more fonts using this mechanisms may follow soon.
Using this approach it would be possible to allow arbitrary selection of font weight and (optical) font size.
Will
fontspec
implement mechanisms supporting OT Variable Fonts?The text was updated successfully, but these errors were encountered: