PS: Free* means the Free* _fonts_

On Sun, 13 Apr 2025 at 10:49, Pedro Andres Aranda Gutierrez <
paag...@gmail.com> wrote:

> A bit more info
>
> With lualatex, I get
>
> luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: File
> not found:
> "/usr/lib/firefox/fonts/TwemojiMozilla.ttf"....texmf-dist/tex/luatex/luaotfload/luaotfload-fallback.lua:50:
> attempt to inde
> x a nil value (local 'f').
> <to be read again>
> relax
> l.19 ... Serif}[RawFeature={fallback=seriffallback}]
>
> It looks that the example is very config specific, because in my case
>
>  ~ > ls /usr/lib/firefox/
> defaults  ubuntu-gnome.cfg
>
> I have been able to get some results with lualatex and the Free* in macOS,
> Debian, Ubuntu, Fedora and Windows. So what I'm after is a simple snippet
> that will provide a configuration which only depends on what TexLive &
> friends offer.
>
> Nice discussion here :-)
> /PA
>
> On Sun, 13 Apr 2025 at 09:57, Ihor Radchenko <yanta...@posteo.net> wrote:
>
>> Max Nikulin <maniku...@gmail.com> writes:
>>
>> >> \directlua{
>> >> luaotfload.add_fallback("global_fallback", {
>> >>      "Noto Serif:mode=harf;",       % 1st: Broad Unicode coverage
>> >>      "DejaVu Serif:mode=harf;",     % 2nd: Common Linux/Windows font
>> >>      "FreeSerif:mode=harf;",        % 3rd: Common TeX Live font
>> >>      "Arial Unicode MS:mode=harf;", % 4th: Windows fallback
>> >>      "Code2000:mode=harf;"          % 5th: Historic Unicode font
>> >> })
>> >> }
>> >
>> > Has anybody tested that LuaTeX can efficiently cache that some
>> > characters are missed in earlier tried fonts? It looks like a rather
>> low
>> > level feature, so without benchmarks I am unsure if it is reasonably
>> > optimized.
>>
>> I think that our first priority should be getting fallbacks
>> working. Trying to optimize it is going too far ahead.
>>
>> > This list looks like a set of fallback variants for primary font, not
>> as
>> > options to try when some characters are missed. Perhaps it may be
>> > reasonable to have predefined configuration for widely used fonts like
>> > Noto, freefonts, DejaVu, Liberation, CMU (Computer Modern Unicode),
>> > crosscore, ubuntu, etc., test what ones are installed (unless preferred
>> > family is configured by the user) and use just it.
>>
>> Yup, that's what I thought. It looks like lualatex is able to scan
>> available fonts and select first available, so we do not have to limit
>> ourselves to a single font.
>>
>> > The key point is to have a number of presets for complete set of fonts
>> > (serif, sans, mono, math) instead of simple alist. It would be
>> > unfortunate to render document with Noto Sans and FreeSerif just
>> because
>> > Noto Serif is not installed.
>>
>> +1
>>
>> >> % ===== SCRIPT-SPECIFIC FALLBACKS =====
>> >> % (Only activate for specific scripts)
>> >> \newfontfamily\cjkfallback{Noto Sans CJK SC}[Script=Han]
>> >> \newfontfamily\arabicfallback{Amiri}[Script=Arabic]
>> >> \newfontfamily\symbolfallback{Segoe UI Symbol}[
>> >>      Scale=MatchLowercase,
>> >>      RawFeature={colr=yes} % For emoji support
>> >> ]
>> > [...]
>> >> CJK: {\cjkfallback 汉语 日本語} \\
>> >
>> > I recall Juan Manuel posted examples with per-script font configuration
>> > for babel. The problem was babel language detection based on character
>> > script vs. explicit foreignlanguage commands.
>> >
>> > My experiments with hieroglyphs and emoji:
>> >
>> > For my earlier experiments with configuring fonts for LuaLaTeX see
>> > Maxim Nikulin. Re: org-mode export to (latex) PDF. Sat, 17 Jul 2021
>> > 19:35:57 +0700.
>> > https://list.orgmode.org/scuirf$m7o$1...@ciao.gmane.io
>>
>> Would you mind consolidating example lualatex document that will
>> compile? LLM example is not very useful (it does not compile) - it only
>> illustrates that automatic font fallbacks are possible. Your example
>> from the linked thread also does not compile.
>>
>> --
>> Ihor Radchenko // yantar92,
>> Org mode maintainer,
>> Learn more about Org mode at <https://orgmode.org/>.
>> Support Org development at <https://liberapay.com/org-mode>,
>> or support my work at <https://liberapay.com/yantar92>
>>
>
>
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Sagen's Paradeiser, write BE!
> Year 1 of the New Koprocracy
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Sagen's Paradeiser, write BE!
Year 1 of the New Koprocracy

Reply via email to