On 21/04/2025 18:07, Pedro Andres Aranda Gutierrez wrote:
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...
From my point of view, complex elisp data structures have advantage
over a block of raw LaTeX code only if
- elisp code can drop fonts for scripts not used in the current document,
- elisp or lua code may skip fonts that are not installed,
- there is defcustom user option and #+options: keyword to switch whole
group of fonts (main+sans+mono+math+small caps) at once from e.g. Noto
to CMU (Computer Modern Unicode) or to set priorities, e.g. freefont, or
noto, or dejavu if some font is missed in higher priority groups.
Preferably code should be able to obtain list of scripts supported by a
given font.
If list of fonts and fallbacks is not modified during export then I
expect that for users it will be easier to adjust raw LaTeX code then to
deal with custom DSL.
> (defvar org-latex-font-mapping-alist
> '(("main" . "Noto Serif")
> ("sans" . "Noto Sans")
> ("mono" . "Noto Sans Mono"))
... and math
> "Noto Color Emoji:mode-harf",
From some message of Juan Manuel I expected that it is possible to set
harfbuzz mode by default without repeating it for each font. Are there
disadvantages or compatibility issues?