ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font fallback hook (alphabet suspects)
@ 2021-01-29 19:29 Jano Kula
  2021-01-29 20:58 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jano Kula @ 2021-01-29 19:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1963 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2381 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-01 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 19:29 font fallback hook (alphabet suspects) Jano Kula
2021-01-29 20:58 ` Hans Hagen
2021-02-01 14:50   ` Jano Kula

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 NNTP newsgroup(s).