Questions tagged [luaotfload]

{luaotfload} is a package to load OpenType Fonts(OTF) in Plain TeX/ LaTeX and to select OTF font features.

Filter by
Sorted by
Tagged with
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: \...
Polizi8's user avatar
  • 181
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 ...
Niranjan's user avatar
  • 3,070
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),...
Javier Bezos's user avatar
  • 9,267
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 ...
mbert's user avatar
  • 2,521
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 ...
rallg's user avatar
  • 967
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]{...
rallg's user avatar
  • 967
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,...
rallg's user avatar
  • 967
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 ...
suricata78's user avatar
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 ...
CS Kumar's user avatar
  • 1,253
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), ...
rallg's user avatar
  • 967
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 ...
steve's user avatar
  • 2,060
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 (...
Weißer Kater's user avatar
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{...
Andrew15_5's user avatar
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 ...
Guest's user avatar
  • 131
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, ...
Achim's user avatar
  • 1
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 ...
Weißer Kater's user avatar
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....
Weißer Kater's user avatar
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 ...
Jacques André's user avatar
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 ...
Revise's user avatar
  • 355
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. ...
PLK's user avatar
  • 22.4k
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{...
Ingmar's user avatar
  • 6,568
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{...
steve's user avatar
  • 2,060
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}{\...
Michael Fraiman's user avatar
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 ...
Xorios's user avatar
  • 102
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&...
Wolfgang's user avatar
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(&...
Weißer Kater's user avatar
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 ...
Davislor's user avatar
  • 43.1k
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 ...
Martin Dagleish's user avatar
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 ...
renkema's user avatar
  • 356
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 ...
jarnosz's user avatar
  • 4,203
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 ...
SvA's user avatar
  • 37
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 ...
Guest's user avatar
  • 131
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 ...
Iacobus1983's user avatar
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 ...
John's user avatar
  • 2,401
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 ...
Weißer Kater's user avatar
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: ...
Karl Ove Hufthammer's user avatar
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 ...
codepoet's user avatar
  • 1,286
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 ...
schoekling's user avatar
  • 3,102
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 ...
The Drunken Whaler's user avatar
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$...
User's user avatar
  • 2,540
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. \...
Alan Xiang's user avatar
  • 4,892
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 ...
GNUSupporter 8964民主女神 地下教會's user avatar
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 &...
codepoet's user avatar
  • 1,286
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 ...
John's user avatar
  • 2,401
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 ...
Adam Liter's user avatar
  • 12.5k
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 ...
ljrk's user avatar
  • 273
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:/...
Jason Gross's user avatar
  • 2,085
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”...
gnucchi's user avatar
  • 936
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} ...
C.Carl's user avatar
  • 718
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....
Weißer Kater's user avatar