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

* Re: font fallback hook (alphabet suspects)
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2021-01-29 20:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jano Kula

On 1/29/2021 8:29 PM, Jano Kula wrote:

> 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.
Already there for ages ... testsuite goodies-002.tex + demo.lfg shows 
how to color your special characters ... one of the probably many 
unknown features -)

There's also this:

\enabletrackers[fonts.missing=replace]

\startTEXpage
     Jano uses \char 12345.
\stopTEXpage

and of course you then watch the log ... (at the meeting Ton showed 
other proofing tricks).


Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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

* Re: font fallback hook (alphabet suspects)
  2021-01-29 20:58 ` Hans Hagen
@ 2021-02-01 14:50   ` Jano Kula
  0 siblings, 0 replies; 3+ messages in thread
From: Jano Kula @ 2021-02-01 14:50 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

Hello Hans!

Thanks.

On Fri, 29 Jan 2021 at 21:58, Hans Hagen <j.hagen@xs4all.nl> wrote:

> > Not critical, just looking for ideas.
> Already there for ages ... testsuite goodies-002.tex + demo.lfg shows
> how to color your special characters ... one of the probably many
> unknown features -)
>

I was thinking goodies could be the answer even for the font fallbacks
hooks.
Unicode blocks are colored and wikified
<https://wiki.contextgarden.net/Font_Goodies> (simplified example) now,
which definitely helps.

I'm fine with logs and trackers, but the original idea was to search PDF by
the editor to make a visual check (made fast by searching), confirming the
glyphs are right, not only they do exist in the font. Just wanted to ask if
there is any existing machinery which could be used for that: switching
font fallback would issue, for example, a margin note command.

J.

[-- Attachment #1.2: Type: text/html, Size: 1398 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).