Pedro Andres Aranda Gutierrez <[email protected]> writes:
>> (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.
>
> I really don't see it. Really sorry.
>
> I feel it is more natural to say
> 'for the "main" family use font "FreeSerif" (with features "whatever" if
> needed)' and
> 'when emacs finds script "emoji" in the buffer, add font "Noto Color Emoji"
> with features "mode=harf" to the list of fallbacks'.
And that "main" vs "emoji" is exactly what is confusing for me. When
looking at it, I feel a temptation to write
'(("main" :font "FreeSerif")
("emoji" :font "Noto Emoji"))
That's because I am not at all familiar with LaTeX terminology about
"font families" and "main", "math", "emoji" are all look the same on my
side. It does not help either that one of the possible values for Emacs
script names is "mathematical" (that can be confused with LaTeX's "math").
So, I propose to mark "main"/"sans"/"math"/"mono" explicitly with some
keyword (like :family) to distinguish it from emacs scripts that should
go into fallback.
> Why? In both cases I see the sequence
> (family/script) -> font -> features
> more natural, because family and script determine the font, not the other
> way round.
> Moreover, the script as returned by emacs is the key in my definition of
> the alist and has family is a fixed set of values.
That family/script part is what is confusing me.
Also, family -> font is not natural to me when I think about polyglossia
setup:
\\newfontfamily{\\englishfont}{Noto Serif}
Note how we no longer have a linkage of family -> font and instead
simply specify font per language without explicitly writing for which
family it needs to be used.
This last example is why I prefer ("font name" <font-plist>) instead of
("family" :font "font-name" <font-plist>)
My variant will apply to all cases, including polyglossia's default font
setting. So, we will be able to use the same value format for fontspec,
polyglossia, and babel.
>> 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.
>
> In this case, I fear we would quite diverge from the things users will find
> in the Internet.
Could you elaborate? I do not suggest to drop
:font "Noto Color Emoji" :features "mode=harf"
I just suggest to allow :font "Noto Color Emoji:mode=hard" everywhere,
not just in fallback fonts.
>> I hope my intentions are clearer now.
>
> I understand you what you want, but I fear this will convolute the code
> unnecessarily.
My main concern now is not code convolution, but making sure that the
configuration is less confusing to users. For the code, I do not think
that what I propose will make code convoluted. (I have rough idea in
mind about how to implement things, and I can to it myself once we
finalize the format that satisfy both of us)
--
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>