emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fallback fonts in LuaTeX via 'luaotfload.add_fallback' (was "Fontset


From: Max Nikulin
Subject: Re: Fallback fonts in LuaTeX via 'luaotfload.add_fallback' (was "Fontsets")
Date: Fri, 15 Jul 2022 21:35:48 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 12/07/2022 22:26, Juan Manuel Macías wrote:
Today I discovered that luaotfload included in v. 3.12 a new
experimental function, luaotfload.add_fallback, to be able to add a list
of fallback fonts to a LuaTeX document, at a low level.
...
   \documentclass{article}
   \usepackage{fontspec}
   \directlua{
   luaotfload.add_fallback ("fallbacktest",{
   "oldstandard:mode=harf;script=grek;color=0000FF;",
   "oldstandard:mode=harf;script=cyrl;color=0000FF;",
   "freeserif:mode=harf;script=arab;color=0000FF;",
   "freeserif:mode=harf;script=dev2;color=0000FF;",
   })}
   \setmainfont{latinmodernroman}[RawFeature={fallback=fallbacktest}]
...
The main drawback I've found to this (at least I don't know how to solve
it at the moment) is that the fallback feature cannot be added via
\defaultfontfeatures. That would avoid having to (re)define all the
main/sans/mono/math families.

I agree that defining fallbacks for each font family is inconvenient. Defining font per script resembles specifying fonts per language in babel configuration, however fallback should work without explicit switching of language. I have seen that babel may determine language from character code points, but I have not tried if it works reliable and if it affects performance (as it does for fallback fonts).

Maybe I did not read the manual with enough attention, maybe I tried it with too old version of LuaTeX, but I had a problem with Emoji. Depending on font such symbols either broke compilation or did not appear in PDF (accordingly to pdffonts font was embedded, text may be copied, but PDF viewers displayed blank space).

https://list.orgmode.org/orgmode/scuirf$m7o$1@ciao.gmane.io/
Maxim Nikulin. Re: org-mode export to (latex) PDF. Sat, 17 Jul 2021 19:35:57 +0700




reply via email to

[Prev in Thread] Current Thread [Next in Thread]