"Pedro A. Aranda" <[email protected]> writes:
> Sorry for the length of the message...
>
> I'm not answering inline, because I want to give this discussion a
> (hopefully) new approach that should make the design and layout for
> `org-latex-fontspec-config' more understandable. Let's go step-by-step
> in a green-slate approach. Let's forget everything we knew and loved
> about fonts in LaTeX and org and start from scratch:
>
> 1. Typesetting in (Lua)LaTeX is about putting characters in a document.
> ...
I understand all the above, yes.
> 9. Emacs happens to know about scripts. Thanks to the code provided by
> J.M. MacĂas, we can get a list of 'special' scripts used in a document.
> This list provides the hint we need to guess which font LuaLaTeX will
> need for unsupported characters.
> 10. Since we have the scripts, we can use them as the _key_ in the
> fallback alist. Mapping the script to the full font specification
> simplifies this list. Once again, please note that the Emacs script name
> does not appear in the LaTeX code. LuaLaTeX only needs to know that it
> should try with 'Noto Color Emoji' if a character is not supported by
> the font used by default. We can supply a larger list that the exporter
> will then adapt taking the actual scripts contained in the document.
> This makes the whole process 'grow as you go' as I pointed out in EmacsConf.
This should probably be explained in the manual. Currently, the manual
does not specify whether "script" is named by Emacs or it is something
from LaTeX world.
> 10. Alternatives: If we really need a plist here, if should be like:
>
> ("emoji" :font "Noto Color Emoji" :features "mode=harf")
What I rather had in mind is standard notation for all fonts (fallback
or not):
("font-name" :key1 val1 :key2 val2 ...)
Then,
(setq org-latex-fontspec-config
'(("main" :font "FreeSerif"
:fallback (("emoji" . "Noto Color Emoji:mode=harf")))))
becomes
'(("FreeSerif" :family "main"
:fallbacks (("Noto Color Emoji" :emacs-script "emoji" :features "mode=harf")
...))
...)
Note how "main" and "emoji" are clearly marked as something different -
one is :family, while another is :script/:emacs-script/:onchar or some
other distinct name.
> However, when looking for 'fallback fonts' in the Internet, you will
> find the 'compact' definition used backend the backend and, I feel, this
> expanded version may introduced confusion. I would rather not go this way.
Do you mean "Noto Color Emoji:mode=harf" notation?
I actually have no problem with it, but if we allow it in fallback
fonts, let's allow it in main fonts as well.
What I really want to achieve is uniform notation, and I really want to
avoid different ways to express the same thing (e.g. font features) in
different parts of the configuration. If features are passed as property
in one part of latex config, but can be a part of font name in another,
users will have a hard time remembering where to use which.
I hope my intentions are clearer now.
--
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>