[NTG-context] font fallback hook (alphabet suspects)

Jano Kula jano.kula at gmail.com
Fri Jan 29 20:29:40 CET 2021


Hello to everybody!

Warning: 50 % of Greek glyphs in MWE, so they might be randomized :)

Is there any hook in the font fallback?

There are some Greek, Hebrew, etc. words used in the text. While
proofreading, the editor would like to check these words separately (glyphs
from different alphabets, unusual symbols, ...), so I'd like to typeset the
warning (margin note), where these words are located. To avoid usual markup
\greek{ὀρφανῖος} it could be useful to typeset a margin note whenever the
defined fallback is called.

The unfamiliar symbols could be in the main font and no fallback would be
called then (one can still define the fallback with the main font as in the
MWE, bold used for the illustration), but you might have a better ideas how
to point out these suspects.

The margin note is ment for searching PDF where one cannot search for color
(basic viewer), which could be the other approach (also visible in print).
I think, the color could be achieved with finalizers. One should also think
of hyphenation and l2r/r2l direction, so in the end the usual approach
might be the best way.

You might use other approaches, how to deal with suspects of this type.
Below the MWE for font fallbacks with distribution fonts.

Not critical, just looking for ideas.

Thank you,
Jano

\definefontfallback[Fallback]
    [file:DejaVuSerif-Bold.ttf]
    [0x0370-0x03FF]
    [force=yes,rscale=1]
\definefontfallback[Fallback]
    [file:DejaVuSerif-Bold.ttf]
    [0x01F40,0x01FD6]
    [force=yes,rscale=1]

\starttypescriptcollection[DejaVu]

\starttypescript[serif]
    [DejaVu]
    [name]
\definefontsynonym[Serif]
    [file:DejaVuSerif.ttf]
    [fallbacks=Fallback]
\stoptypescript

\starttypescript[DejaVu]
\definetypeface[DejaVu][rm][serif]
    [DejaVu][default]
\stoptypescript

\stoptypescriptcollection

\setupbodyfont[DejaVu]

\starttext
from ὀρφανῖος, thus
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210129/91487b59/attachment.htm>


More information about the ntg-context mailing list