HI,

After a lot of consideration, more testing and some reading (including
pandoc, thanks again for the inspirational source) I feel that this is the
best approach for a first generation of the patch. It would provide relief
for many situations and a starting point for further improvement.
This functionality is somehow disruptive and I would go a path which
delivers something for users to get used to it.

Would you be more comfortable with fallbacks for the individual families in
the font-mappings-alist?
I could try to go for something like:

(defvar org-latex-font-fallback-alist
  '(("main . '(("emoji" . "Noto Color Emoji:mode-harf")
               ("han"   . "Noto CJK JP:")
               ("kana"  . "Noto CJK JP:")))
    ("sans". '(("emoji" . "Noto Color Emoji:mode-harf")
               ("han"   . "Noto Sans CJK JP:")
               ("kana"  . "Noto Sans CJK JP:")))
    etc...

And having FallbackMainFonts, FallbackSansFonts, ... (or the other way
round meaning char-family mapped for "main", "mono", etc,

There will be some repetition in the nested alists and it will be more
complex to handle customisations.
But anyhow, give me some time to check what can be done and then discuss
the possible solutions.

/PA


On Mon, 21 Apr 2025 at 12:50, Ihor Radchenko <yanta...@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paag...@gmail.com> writes:
>
> > The font configuration is done in two variables:
> >
> > (defvar org-latex-font-mapping-alist
> >   '(("main" . "Noto Serif")
> >     ("sans" . "Noto Sans")
> >     ("mono" . "Noto Sans Mono"))
> >   "Set this alist for your font preferences when exporting to
> > LuaLaTeX/XeTeX.
> > . Initially, this will generate a list of strings, each one an expansion
> > like:
> > \=\set...font{font name}")
> >
> > (defvar org-latex-font-fallback-alist
> >   '(("emoji" . "Noto Color Emoji:mode-harf")
> >     ("han"   . "Noto Sans CJK JP:")
> >     ("kana"  . "Noto Sans CJK JP:"))
> >   "Set this alist with your fallback fonts definitions when exporting to
> > LuaLaTeX/XeTeX.
> >
> > ...
> > \directlua{
> >  luaotfload.add_fallback("FallbackFonts", {
> >   "Noto Color Emoji:mode-harf",
> >  })
> > }
> >
> > \setmainfont{Noto Serif}[RawFeature=Fallbackfonts]
> > \setsansfont{Noto Sans}[RawFeature=Fallbackfonts]
> > \setmonofont{Noto Sans Mono}[RawFeature=Fallbackfonts]
>
> Does it mean that you plan to use the same fallback for main, sans, and
> mono fonts? Would it make more sense to have individual fallback for
> each?
>
> --
> 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

Reply via email to