Pedro Andres Aranda Gutierrez <paag...@gmail.com> writes: >> I think that we can take inspiration from >> https://tecosaur.github.io/emacs-config/config.html#font-collections >> and introduce an idea of font collections. >> The font collections are named font presets that can be selected as a >> whole. (and potentially contributed by users) >> > In using a variable, I'm following the approach of eglot.
I do not suggest removing the variable. But I suggest adding a keyword as an extra option. I am not sure how eglot is relevant to Org mode. >> Then, we can introduce a #+LATEX_FONT: collection-name >> keyword so that users can set it per-document. > > Wouldn't that mean a lot of user centric configuration. I think we can > share documents better if we have the document and the .dir-locals.el > distributed. So it might be more reproducible, because it would not depend > so much on the local user configurations. I see a lot of resistance in > people WRT 2 things: > 1.- if they have to start creating a "giant" Emacs configuration, vs. they > get a zip file with everything and they can start working on the doc > 2.- if the document header starts to grow too much with too many things > users need to learn. I do not think that .dir-locals.el is the best approach. What I suggest is the following: 1. We introduce org-latex-fontsets variable that will hold pre-defined set of fonts that we ship with Org mode. 2. #+LATEX_FONT: fontset_name will simply choose from that variable. So, all the users need to export the shared document is Org mode version that has a given fontset. No downsides compared to .dir-locals.el 3. In addition to using fontsets, I still want to leave an option to configure fonts directly in Org document. But I'd prefer to avoid dir locals if we can do the same with keywords. Keywords are more explicit and more readable (at least, we can make them more readable). >> > + :fallback (("emoji" . "Noto Color Emoji:mode=harf") >> > + ("han" . "Noto Serif CJK JP:") >> > + ("kana" . "Noto Serif CJK JP:"))) >>... >> This sounds like something intersecting polyglossia, or maybe I miss >> something? > > No, this is the fallback mechanism for fontspec only. The "emoji", "han", > etc. are detected with Juan Manuel's code. > Then the fallback configuration using the luaotfoffload mechanism is > generated for the scripts that are detected *and* defined in the font > configuration. I see. So, "emoji", "han", and "kana" are the character sate names internally used by Emacs, right? In this case, I think that we may also want some kind of generic fallback; not just for specific character sets (which is "unicode" charset as per 34.7 Character Sets section of Elisp manual) Maybe we can then use `char-charset' instead of directly querying `char-script-table'. > Again, please go through the examples I attached as a ZIP to my message in > the hope that they would show what I want to achieve from the document > layout point of view. I did, but I am not sure what to make out of it other than noting that it already works better than main. -- 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>