From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: orgmode <emacs-orgmode@gnu.org>
Cc: Ihor Radchenko <yantar92@gmail.com>,
Stefan Nobis <stefan-ml@snobis.de>,
Maxim Nikulin <manikulin@gmail.com>, Timothy <tecosaur@gmail.com>
Subject: Fallback fonts in LuaTeX via 'luaotfload.add_fallback' (was "Fontsets")
Date: Tue, 12 Jul 2022 15:26:57 +0000 [thread overview]
Message-ID: <87bktus666.fsf_-_@posteo.net> (raw)
In-Reply-To: <87lesysgsh.fsf@posteo.net> ("Juan Manuel Macías"'s message of "Tue, 12 Jul 2022 11:37:34 +0000")
Today I discovered that luaotfload included in v. 3.12 a new
experimental function, luaotfload.add_fallback, to be able to add a list
of fallback fonts to a LuaTeX document, at a low level.
(More info on page 18 of the luaotfload manual, with some examples).
I've been experimenting a bit with this function. For example:
#+begin_src latex
\documentclass{article}
\usepackage{fontspec}
\directlua{
luaotfload.add_fallback ("fallbacktest",
{
"oldstandard:mode=harf;script=grek;color=0000FF;",
"oldstandard:mode=harf;script=cyrl;color=0000FF;",
"freeserif:mode=harf;script=arab;color=0000FF;",
"freeserif:mode=harf;script=dev2;color=0000FF;",
}
)
}
\setmainfont{latinmodernroman}[RawFeature={fallback=fallbacktest}]
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus.
Δαρείου καὶ Παρυσάτιδος γίγνονται παῖδες δύο, πρεσβύτερος μὲν
Ἀρταξέρξης, νεώτερος δὲ Κῦρος· ἐπεὶ δὲ ἠσθένει Δαρεῖος καὶ ὑπώπτευε
τελευτὴν τοῦ βίου, ἐβούλετο τὼ παῖδε ἀμφοτέρω παρεῖναι. ὁ μὲν οὖν
πρεσβύτερος παρὼν ἐτύγχανε· Κῦρον δὲ μεταπέμπεται ἀπὸ τῆς ἀρχῆς ἧς
αὐτὸν σατράπην ἐποίησε, καὶ στρατηγὸν δὲ αὐτὸν ἀπέδειξε πάντων ὅσοι ἐς
Καστωλοῦ πεδίον ἁθροίζονται.
Emacs написан на двух языках: C и Emacs Lisp (Elisp, диалект Лиспа).
При этом сам редактор является интерпретатором Elisp. По сути дела,
большая часть Emacs написана на языке Elisp, и её можно рассматривать
как расширение к основной программе. Пользователи могут сами создавать
части Emacs, от отдельных функций до новых основных режимов. При этом
можно переопределять любые Elisp-функции, в том числе и те, что
являются частью самого редактора, и модифицировать функциональность
Emacs, изменив соответствующим образом некоторые функции.
Native speakers of Arabic generally do not distinguish between Modern
Standard Arabic and Classical Arabic as separate languages; they refer
to both as al-ʻArabīyah al-Fuṣḥá (العربية الفصحى) meaning the pure
Arabic. They consider the two forms to be two registers of one
language. When the distinction is made, they are referred to as فصحى
العصر Fuṣḥá al-ʻAṣr (MSA) and فصحى التراث Fuṣḥá al-Turāth (CA)
respectively.
उदु ज्योतिरमृतं विश्वजन्यं विश्वानरः सविता देवो अश्रेत् ।\\
क्रत्वा देवानामजनिष्ट चक्षुराविरकर्भुवनं विश्वमुषाः ॥ १ ॥\\
प्र मे पन्था देवयाना अदृश्रन्नमर्धन्तो वसुभिरिष्कृतासः ।\\
अभूदु केतुरुषसः पुरस्तात्प्रतीच्यागादधि हर्म्येभ्यः ॥ २ ॥
\end{document}
#+end_src
The main drawback I've found to this (at least I don't know how to solve
it at the moment) is that the fallback feature cannot be added via
\defaultfontfeatures. That would avoid having to (re)define all the
main/sans/mono/math families.
Best regards,
Juan Manuel
next prev parent reply other threads:[~2022-07-12 15:32 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 12:17 LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Juan Manuel Macías
2022-07-08 15:49 ` Uwe Brauer
2022-07-08 16:46 ` Juan Manuel Macías
2022-07-08 15:54 ` Greg Minshall
2022-07-08 16:13 ` Thomas S. Dye
2022-07-08 17:27 ` Bruce D'Arcus
2022-07-08 19:03 ` Juan Manuel Macías
2022-07-08 18:49 ` Thomas S. Dye
2022-07-09 2:23 ` Max Nikulin
2022-07-09 3:23 ` Thomas S. Dye
2022-07-09 11:10 ` Juan Manuel Macías
2022-07-09 3:24 ` Tim Cross
2022-07-09 3:50 ` Ihor Radchenko
2022-07-09 4:10 ` Tim Cross
2022-07-09 5:35 ` Dominik Schrempf
2022-07-09 6:31 ` Max Nikulin
2022-07-09 9:59 ` Juan Manuel Macías
2022-07-09 23:49 ` Tim Cross
2022-07-10 11:19 ` M-x org-create-worg-article command? (was: LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX?) Ihor Radchenko
2022-07-10 19:06 ` Tim Cross
2022-07-11 2:09 ` Ihor Radchenko
2022-07-11 2:49 ` Tim Cross
2022-07-11 3:18 ` Ihor Radchenko
2022-07-11 4:00 ` Tim Cross
2022-07-11 4:20 ` Ihor Radchenko
2022-07-10 19:31 ` LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Juan Manuel Macías
2022-07-09 10:42 ` Juan Manuel Macías
2022-07-09 12:15 ` Max Nikulin
2022-07-09 14:58 ` Juan Manuel Macías
[not found] ` <b58ee3cc-c58c-b627-9cc5-51993020db2c@gmail.com>
2022-07-09 20:22 ` Juan Manuel Macías
2022-07-10 20:23 ` [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...") Juan Manuel Macías
2022-07-10 20:31 ` Juan Manuel Macías
2022-07-10 20:58 ` Tim Cross
2022-07-11 13:34 ` Juan Manuel Macías
2022-07-11 2:19 ` Ihor Radchenko
2022-07-11 7:50 ` Stefan Nobis
2022-07-11 14:19 ` Timothy
2022-07-11 15:00 ` Juan Manuel Macías
2022-07-11 17:45 ` fontsets (was: [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...")) Timothy
2022-07-11 22:09 ` fontsets Juan Manuel Macías
2022-07-12 7:12 ` fontsets Stefan Nobis
2022-07-12 11:37 ` fontsets Juan Manuel Macías
2022-07-12 15:26 ` Juan Manuel Macías [this message]
2022-07-15 14:35 ` Fallback fonts in LuaTeX via 'luaotfload.add_fallback' (was "Fontsets") Max Nikulin
2022-07-11 3:59 ` [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...") Greg Minshall
2022-07-11 8:05 ` Stefan Nobis
2022-07-11 11:39 ` Juan Manuel Macías
2022-07-11 12:04 ` Juan Manuel Macías
2022-07-11 12:31 ` Max Nikulin
2022-07-11 14:23 ` Juan Manuel Macías
2022-07-11 17:20 ` Max Nikulin
2022-07-16 3:01 ` Max Nikulin
2022-07-11 17:08 ` LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX? Max Nikulin
2022-07-10 2:12 ` Max Nikulin
2022-07-09 0:34 ` Matt Huszagh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bktus666.fsf_-_@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@gmail.com \
--cc=stefan-ml@snobis.de \
--cc=tecosaur@gmail.com \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).