Questions tagged [luaotfload]
{luaotfload} is a package to load OpenType Fonts(OTF) in Plain TeX/ LaTeX and to select OTF font features.
148
questions
2
votes
2
answers
79
views
How to define a new font family without specifying a font in advance (using the default one instead)?
I want to setup a semantic font family for my class with \newfontfamily\COMPONENTFont{XXX}.
Users of the class are free to use their font of choice for COMPONENT, for instance font YYY: \...
8
votes
1
answer
299
views
How to access non-Unicode glyphs from OTFs with Lua(La)TeX?
I opened Shobhika font in FontForge and it has certain glyphs which I am guessing aren't encoded in Unicode (if I understand this business correctly). E.g., have a look at the following slot.
What I ...
5
votes
0
answers
60
views
Process \hbox with luaotfload
I have a ‘plain’ \hbox with a series of glyphs which haven’t been processed with luaoftload (at least, not fully processed, although ideally and for for what I want they shouldn’t be processed at all),...
2
votes
1
answer
84
views
Some code ligatures work in xelatex but not lualatex
While looking at this question I noticed that some of the code ligatures from the JetBrains Mono font (freely available from their website) worked in xelatex, but not in lualatex. Compare:
Xelatex
...
5
votes
1
answer
110
views
LuaLaTeX, raise or lower an unboxed glyph, preserve kerning
LuaLaTeX (via luaotfload and fontspec) knows many properties of font glyphs, and many of them can be shown to the user. So it seems to me that what I am about to ask is "possible".
EDIT: As ...
3
votes
1
answer
66
views
Luaotfload get font grid units
The following code writes the character width (cursor advance width), and the x and y coordinates of the glyph bounding box, to the log file. Here it is for letter "a" :
\documentclass[12pt]{...
3
votes
1
answer
105
views
Luaotfload for emdash hyphen
Using lualatex, TeXlive 2023.
I have discovered something that works using "brute force".
Now, I would like to make it work "according to the rules".
Situation: In a word processor,...
2
votes
0
answers
52
views
luaotfload creates corrupt gzip files
In our team we are investigating performance issues (much longer compile time and huge memory usage) when compiling big documents with LuaLaTeX. When looking into the font loading mechanism, we ...
1
vote
0
answers
34
views
The accents are not aligned properly when using the libertinus otf with LuaLaTeX engine
The fonts I am using are ``libertinus otf - (math font)'', SourceSansPro - (Text Font). The math alphabet should follow "Source Sans Pro" font. So, I use the below code to change the math ...
3
votes
1
answer
109
views
Test for font character, LuaLaTeX
This question "has been answered before", but not directly to the question. My question pertains only to LuaLaTeX, only to OpenType fonts using UTF-8 encoding, only to text mode (not math), ...
0
votes
1
answer
48
views
luaotfload: list available axes of variable font
Suppose I load a font via luaotftool like this
\font\MyFont="OpenSans:mode=node;" at 10pt
Now, I could find out whether this is a variable-weight font as follows:
\directlua{ local ...
2
votes
0
answers
107
views
Making vector fonts from metafont sources in LuaTeX?
According to the presentation "TUG 2020 — Marcel Krüger — MetaPost-based, dynamic extensible delimiters for LuaTeX" it is possible to generate "fully hinted, vector glyphs" from (...
3
votes
1
answer
109
views
How to add (fake) bold feature to fallback font using luaotfload luatex
I have this in my preamble:
\usepackage{luacode}
\begin{luacode*}
luaotfload.add_fallback("FallbackFonts", {
"Noto Color Emoji:mode=harf",
"Noto Sans CJK JP:"
})
\end{...
2
votes
1
answer
103
views
LuaTeX: Print glyphs with codepoint value -1 by name
Context
I would like to print a full glyph table for a given font. Glyphs in an open type font can be identified by
an optional code point value
by a glyph name
Some fonts like cambriai.ttf have ...
0
votes
2
answers
77
views
adding letterspacing using luaotfload
The letterspace feature of luaotfload does not work in math mode. I tried to implement my own feature as follows:
\documentclass{minimal}
\directlua{
do
local function mathletterspace(tfmdata, ...
2
votes
1
answer
129
views
LuaTeX: How to slant, extend or embolden only some characters of a font, NOT the whole font?
In luaotfload we can slant, extend or embolden a whole font by writing something like \font\x="xxx.otf:+slant=a;+extend=b;+embolden=c" at d pt. But what can I do when I would like to apply ...
5
votes
1
answer
212
views
How to manipulate selected letters in LuaTeX?
Please look at the following MWE:
\documentclass[20pt]{extarticle}
\usepackage{unicode-math}
\usepackage{luacode}
%% Works: change width of 𝑓
\begin{luacode}
local function newwidth(tfmdata)
tfmdata....
2
votes
0
answers
78
views
What is the difference between file font.lua and the font itself?
When LuaLaTeX/fontspec uses a font, say Erewhon-Regular.otf, it creates a file erewhon-regular.lua that is put in (user's)Library/texlive/2022/texmf-var/luatex-cache/generic/fonts/otl/. Actually it is ...
0
votes
0
answers
41
views
LuaTeX compilation completed and no errors, yet font doesn't show up
I decided to try using some new fonts and LuaLaTeX, and so I downloaded some fonts and installed them using the instructions from the first answer in this post. I put the setup into my preamble and ...
0
votes
1
answer
54
views
luaotfload-tool error on Solaris Intel
Fully updated TexLive 2022 on Solaris x86_64 Intel which is preventing any docs compiling under lualatex:
$ luaotfload-tool -u
luaotfload | db : Font names database not found, generating new one.
...
3
votes
2
answers
140
views
How to combine fonts with luaotfload?
Consider this MWE:
\documentclass{article}
\usepackage{fontspec}
\directlua{luaotfload.add_fallback("noto_fallback",
{
"NotoSerif:mode=base;color=FF8800;",
})}
\setmainfont{...
4
votes
1
answer
547
views
fontspec can't find font, but luaotfload-tool can
I've installed a font (in this case "Rubik") that's not in the LaTeX Font Catalogue (those seem to all work fine), and tried to use it in a simple MWE:
\documentclass{article}
\usepackage{...
3
votes
1
answer
163
views
\addfontfeatures combining issues
I am trying to set up additional weights and widths for a variable font:
\DeclareRobustCommand{\blackseries}{\addfontfeature{RawFeature={+axis={wght=900}}}}
\DeclareRobustCommand{\cond}{\...
2
votes
2
answers
352
views
newpx makes fontspec fail
If I use the newpx package and then load fontspec and try to select a font it fails. See the minimal example below.
The files (compiled with lualatex) for which fontspec font selection fails (by ...
1
vote
0
answers
282
views
Lualatex don't work after updates
After updating texlive2021 all documents don't compile anymore and I get these error messages in the logfile:
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load "luaotfload&...
1
vote
0
answers
73
views
Luaotfload: change kerning for many characters at once
How can I iterate over many characters? And how can I iterate over hexadecimal values?
Not working MWE:
\documentclass{article}
\usepackage{unicode-math}
\directlua{function W(s) return string.gsub(&...
5
votes
0
answers
72
views
LuaLaTeX font chainsubstitution works only for the first font loaded
Here is an extremely simplified version of my code from this answer, where I finally found a workaround to this problem:
\documentclass{article}
\tracinglostchars=3 % Panic if a font does not contain ...
2
votes
0
answers
238
views
Microtype warnings (~100) with fontsetup (NewComputerModern)
I have been using the microtype package together with the fontsetup package.
The document seems to compile normally. Protrusion and expansion also seem to be working, but I usually get around 100 ...
0
votes
0
answers
39
views
Access glyph contours through luaotfload
Can I access the countours that make up a glyph through luaotfload?
I can see that luaotfload contains (in fontloader-font-ttf.lua) code for parsing the glyf table, which should store the outlines ...
3
votes
1
answer
200
views
why is latex's ltluatex.sty required for plain luaotfload?
I tried (successfully) to compile a sober Plain LuaTeX format and discovered, with some surprise, that loading the standard luaotfloader in Plain requires a piece of code, ltluatex.tex which requires ...
1
vote
0
answers
95
views
How to change math-font for pgfplot environments to sans, if necessary with luaotfload fallback?
I would like to change my fonts and especially my math fonts only for my graphs to my sans font Segoe UI. Unfortunately, it doesn't work.
I tried already the following sugestions:
Change math font ...
5
votes
1
answer
196
views
chainsubstitution: which rule can detect the last character?
In the following MWE, I want to replace all ſ by s if they are at the last position of a line or document or some place where there is no next character.
I added two rules to show that it works for ...
1
vote
2
answers
431
views
Contextual alternates and lettrine - LuaLaTeX
I'm using a font with "calt" (contextual alternates) on LuaLaTeX - as a matter of fact, BemboBookMT. So, for example, Q has a "tail" when followed by a u:
When I use lettrine, I ...
4
votes
0
answers
151
views
Lua font handler can change some STIX Two Math kerns but not others
The STIX Two Math font leaves large gaps between some pairs of characters, such as 'dp' or 'df'. The Lua otf font handler is able to reduce these gaps for some pairs (e.g., 'ab' or 'ad'), but it ...
1
vote
1
answer
96
views
Top accent position of OTF math font in XeTeX and LuaTeX
MWE:
% Xe-/LuaLaTeX
\documentclass{article}
\usepackage{unicode-math}
\setmathfont[math-style=literal]{Latin Modern Math}
\begin{document}
$\dot b, \dot 𝑏, \dot{\rm b}$
\end{document}
The accent ...
0
votes
0
answers
97
views
Strange error when compiling document with Cambria font using lualatex in TeX Live 2021
The following LaTeX document results in this error when compiled with lualatex in TeX Live 2021.
warning (node filter): error: ...exmf-dist/tex/luatex/luaotfload/luaotfload-ha
rf-plug.lua:455: ...
5
votes
1
answer
484
views
LuaLaTeX: Smarter font selection macro for super-families
NOTE: This question is not answered yet. The only "answer" to this question from user Davislor does not answer this question, even though it has up-votes to make it look like. Please feel ...
3
votes
1
answer
157
views
luatexja-preset 'yu-win10' not working under Win10
Since some update (see edit), I have not been able to compile files containing Japanese text using the yu-win10 preset provided by luatexja-preset under Windows 10.
However, if I compile the same code ...
2
votes
0
answers
136
views
luaoftload v3.17 with HarfBuzz does awful line breaking with Garamond
I have this long document which I've been maintaining for years now, which I use Adobe's Garamond Premier Pro font for typesetting, and the whole document is fine-tuned to avoid overfull boxes and ...
1
vote
1
answer
159
views
Less space (glue) inserted when using ~
\input luaotfload.sty
\font\bsk=[BaskervilleMTPro-Regular]:script=latn;
\bsk
If the dimension $M$ were less than the number $N$ of data sites, then the columns of $A$ couldn’t span the whole of~$R^N$...
13
votes
1
answer
1k
views
Substituting fonts for emojis in LuaLaTeX
Inspired by this question, I try to use a different font for all emoji characters in the document. In the code sample below, I build the is_emoji function according to unicode standards.
\...
4
votes
1
answer
2k
views
Use pandoc/latex on Docker with LuaLaTeX PDF engine and TeX Gyre Fonts
Motivation
Original question from pandoc discuss.
To build an Docker image allowing pandoc --pdf-engine=lualatex test.md -o test.pdf with the source file test.md as follow:
---
mainfont: TeX Gyre ...
2
votes
0
answers
118
views
LuaTeX: Microtype/fontspec/luaotfload buggy interaction canceling each other's settings
Microtype and fontspec/luaotfload seem to interact, and cancel each other's settings. In the following code, fontspec option Color=FF0000 and \lsstyle interact to cancel each others effect (coloring &...
1
vote
1
answer
192
views
Using chain substitution to add alternative characters contextually in LuaLaTeX
I'm trying to add some contextual alternatives to Linux Libertine using fonts.handlers.otf.addfeature. I can add these characters correctly using an ordinary substitution, but they are not recognized ...
1
vote
1
answer
279
views
Issue selecting font from TrueType Collection with LuaTeX
I'd like to use the Gill Sans font, which is installed in /Library/Fonts/GillSans.ttc on my Mac. According to the fontspec documentation, I should be able to use TrueType Collections by specifying the ...
1
vote
1
answer
634
views
LuaLaTeX produces no output in Flatpak TeXLive
I'm currently working on getting TeXLive usable in Linux Flatpaks, however LuaLaTeX "silently" fails and I have no idea what might be wrong or where to start. The output and symptoms are ...
0
votes
0
answers
66
views
Why can't lualatex in MiKTeX find stmaryrd fonts unless pdflatex is run first? [duplicate]
MNWE:
\documentclass{acmart}
\usepackage{stmaryrd}
\begin{document}
$\Mapsto$
\end{document}
Running lualatex on this file gives a log containing
luaotfload | cache : Lookup cache loaded from C:/...
2
votes
1
answer
183
views
LuaHBTeX Renderer=OpenType + BibLaTeX adventures part 2
(Continued from Freeze with fontspec's Renderer=OpenType + ItalicFont, biblatex, and polyglossia (Greek))
News:
Author names and order matter (I wish I was joking: “Jane McGo” works but “Jane McGoop”...
1
vote
0
answers
260
views
luaotfload: bug in newest version (26.04.2020)? [closed]
I compiled this MWE on two different PCs running MikTeX version 2.9.7400:
\documentclass{scrreprt}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\begin{document}
Some text.
\end{document}
...
0
votes
0
answers
172
views
Some bugs in LuaHBTeX or LuaOTFload with mode=harf?
Please try the following MWEs with LuaHBTeX:
% Plain LuaHBTeX
\input luaotfload.sty
\font\twentyfiverm="MinionPro-Regular.otf:%
mode=harf;script=latn;language=DFLT;+tlig" at%
\directlua{tex....