Pedro Andres Aranda Gutierrez <[email protected]> writes:
> there are a couple more commits in the feature branch. Against my
> judgement, but I have included the possibility of using main,sans and mono
> everywhere. Once again, I don't like that at all, because it diverges from
> the examples people can find in the Internet and that will be a source of
> confusion.
I think it is ok to leave LaTeX name in the main text in the manual but
put a footnote that alternative name (tt / mono, etc) can be used
interchangeably. WDYT?
> That is done. I allow the default features to be a string of
> comma-separated feature definitions. Internally, it also allows the default
> features to be a list of strings, each with one feature definition. It
> mimics the '+' in the default features definition.
Thanks!
One note about the code:
> + (setq font-family (alist-get font-family org-latex--long2short-family
> font-family nil #'string=))
This implies that *only* main/sans/mono/math will be allowed, but not
tt/sf/rm. Looks like an omission.
>> What about
>>
>> (("main" :font "TeXGyreSchola"
>> :fallbacks (("AppleColorEmoji:mode=harf" :script "emoji")))
>
> They are not strictly the same,OK. But it is always the font family or the
> missing script that trigger the use of a font.
>
> Your example in the current format
>
> (("main" :font "TeXGyreSchola"
> :fallbacks (("emoji" :font "AppleColorEmoji:mode=harf")))
>
> reads as:
> For the 'main' font family use system font "Tex Gyre Schola" and,
> if Emacs tells you that there are characters it identifies as "emoji",
> use font "Apple Color Emoji", which needs to use the HarfBuzz renderer.
> As I have already explained, it is always a
> family/script -> font+optional config
> mapping. It hardly can be more consistent.
Ok. This looks good enough for me.
> BTW, look at the new missing font parser in one of the last commits.
One comment on the code:
> + ;; Sort the list by FONT
> + (sort font-script #'(lambda (s1 s2)
> + (string< (car s1) (car s2))))
> + ;; Remove duplicates
> + (delete-dups font-script)
You should use (setq (sort ...)) and (setq (delete-dups ..)).
Also, if we know the problematic characters, I am wondering if we can
extract the logic from `describe-char-display' and suggest specific font
to be used. (This is optional, but sounds fairly easy).
-
And further comments on earlier commits:
About :features / :props alias.
Same comment about the manual as for the font familiar.
Additionally, ox-latex code added :features as an alias to :props but
not :props as an alias to :features. I think we should have both, so
that people can use them interchangeably.
About :fallback.
One possible common need could be setting a fallback without changing
the default font. Maybe we can give an example of that in the manual.
Or, alternatively, may we make :font option in
`org-latex-polyglossia-font-config' optional and use the default font if
it is not specified?
--
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>