On 16/07/2021 02:40, Juan Manuel Macías wrote:
Maxim Nikulin writes:
In CSS it is possible to specify a list of fonts and a glyph is taken
from the first font where it is present. Despite particular fonts have
limited coverage, I see wide range of Unicode characters on web pages,
that is why I am almost sure that system font libraries combine fonts.
In LuaTeX you can associate a font family to a range or a group of
characters.
texto = unicode.utf8.gsub ( text, "([\u{e000}-\u{f8ff}])", "\\puatext{%1}" )
I expect it is terribly inefficient for long spans of text in particular
language. Command should not be per-character, preferably per-paragraph
or at least per-word
"([\u{e000}-\u{f8ff}]+)"
However maybe you just do not use sequences of symbols from private use
area.
I think that low level implementation in browser or in some underlying
library is much faster
<dl>
<dt>LM Roman 12</dt>
<dd style="font-family: 'LM Roman 12'">abc абв…с</dd>
<dt>LM Roman 12, CMU Serif</dt>
<dd style="font-family: 'LM Roman 12', 'CMU Serif'">abc абв…с</dd>
</dl>