From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110429 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jano Kula Newsgroups: gmane.comp.tex.context Subject: font fallback hook (alphabet suspects) Date: Fri, 29 Jan 2021 20:29:40 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5934311440079718055==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8215"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 29 20:30:43 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l5ZTe-00023d-Jl for gctc-ntg-context-518@m.gmane-mx.org; Fri, 29 Jan 2021 20:30:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 00674280141; Fri, 29 Jan 2021 20:30:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yfWTgyp3dU0T; Fri, 29 Jan 2021 20:30:19 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E258C28013E; Fri, 29 Jan 2021 20:30:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8869A28013D for ; Fri, 29 Jan 2021 20:30:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ny44GIExNz6f for ; Fri, 29 Jan 2021 20:30:17 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.50; helo=mail-ot1-f50.google.com; envelope-from=jano.kula@gmail.com; receiver= Original-Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id ABF89280119 for ; Fri, 29 Jan 2021 20:30:17 +0100 (CET) Original-Received: by mail-ot1-f50.google.com with SMTP id d1so9676974otl.13 for ; Fri, 29 Jan 2021 11:30:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=bvpHE8iFYz/A+wY0elpG1bq5t2bgukk2IVw/JhsN6RY=; b=OZNIFsWuOrhqekWtekTEjEg5M7R/6ZvThhm9MsLEcoEiZVsNujDsZgy/CmbCjmp9a4 7Qjw0//CgxGV2xw+j9F8tzLrKlTS5/DkVGOEXhBLuoaW0lUxX6RROxDBGXjKOPLgkauF psqn39OPwX51oSUIAUtPpvkQpwXUeePAN2EIV71VYTMzfKeHkgo89eN3CDAiJUA4gElP e2RxcV3plDeVH0NrGAo4U8SXJ/iB8W7AY9DVWRY8FOn5GLkwNB6cXh9U1N02FSvbisu7 d1kmKh8tJAEjh/vjTVINZvT+ilj954obF1te5sk5K2dw7dCD1Sex9KCIrxFlsIC4uzpX 3ucw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=bvpHE8iFYz/A+wY0elpG1bq5t2bgukk2IVw/JhsN6RY=; b=LgN6tq6HnmiCsOWS+OC/tNvtd90lzdPq0r1h/CHMCrM4sLR6bgMUw6y0Wj1sZ8d1rQ 9Vpj+rkGH3DXqvdcjfSZ1Ui8d42a/cM6+futAm9h8rYD1GCKk4nZmuCULrYk2sMwyxW0 meWCSFj5/Ua/fJIDIVs0w2FlDgZA9Hp6QmQSzxx9cH4W13adGmDf4rEckL+ZMOKkWui9 bDeVufMafPgYqZDxlHLfDCvEmiAy2GfvkFCAD4Bg/zXbIhbNAzpDXx54/i4OMz85oNuR bDpq8y87SACDbEX3M57JmjJN1Wke3QNX5UAo5MlxTzh9ovq2KSZGfF2WXBw1BL02QmXB 2/Iw== X-Gm-Message-State: AOAM533Sun3/tBZAuU/D8cV8jnDsy1JmiF5ACaaEyK7edIV57YDqWlY3 WeVheCTemFR9JiMmNzKYugTf1Dlv+Dbwrlxbei/mBFS4lm8= X-Google-Smtp-Source: ABdhPJybo35uzuhhRtyw+X51L2M6Li8kz8M+vMGTEiZA7+z63BuLmTHMKJPwT7RxCAVYDru0gSKTmE9PuJK6JRkPZRU= X-Received: by 2002:a9d:64c3:: with SMTP id n3mr3895618otl.188.1611948615940; Fri, 29 Jan 2021 11:30:15 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:110429 Archived-At: --===============5934311440079718055== Content-Type: multipart/alternative; boundary="000000000000a63d3705ba0f085d" --000000000000a63d3705ba0f085d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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{=E1=BD=80=CF=81=CF=86=CE=B1=CE=BD=E1=BF=96=CE=BF=CF=82} 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=3Dyes,rscale=3D1] \definefontfallback[Fallback] [file:DejaVuSerif-Bold.ttf] [0x01F40,0x01FD6] [force=3Dyes,rscale=3D1] \starttypescriptcollection[DejaVu] \starttypescript[serif] [DejaVu] [name] \definefontsynonym[Serif] [file:DejaVuSerif.ttf] [fallbacks=3DFallback] \stoptypescript \starttypescript[DejaVu] \definetypeface[DejaVu][rm][serif] [DejaVu][default] \stoptypescript \stoptypescriptcollection \setupbodyfont[DejaVu] \starttext from =E1=BD=80=CF=81=CF=86=CE=B1=CE=BD=E1=BF=96=CE=BF=CF=82, thus \stoptext --000000000000a63d3705ba0f085d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello to everybody!

Warning: 50 % of Gr= eek glyphs in MWE, so they might be randomized :)=C2=A0=C2=A0

Is there any hook in the font fallback?

<= /div>
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 typese= t the warning (margin note), where these words are located. To avoid usual = markup \greek{=E1=BD=80=CF=81=CF=86=CE=B1=CE=BD=E1= =BF=96=CE=BF=CF=82} it could be useful to typeset a margin note when= ever the defined fallback is called.

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

The margin note is ment for searc= hing PDF where one cannot search for color (basic viewer), which could be t= he other approach (also visible in print). I think, the color could be achi= eved with finalizers. One should also think of hyphenation and l2r/r2l dire= ction, so in the end the usual approach might be the best way.
You might use other approaches, how to deal with suspects of t= his type. Below the MWE for font fallbacks with distribution fonts.

Not critical, just looking for ideas.

Thank you,
Jano

\definefontfallback[Fallback]
=C2=A0 =C2=A0 [file:DejaVuSerif-Bol= d.ttf]
=C2=A0 =C2=A0 [0x0370-0x03FF]
=C2=A0 =C2=A0 [force=3Dyes,rscal= e=3D1]
\definefontfallback[Fallback]
=C2=A0 =C2=A0 [file:DejaVuSerif-= Bold.ttf]
=C2=A0 =C2=A0 [0x01F40,0x01FD6]
=C2=A0 =C2=A0 [force=3Dyes,= rscale=3D1]

\starttypescriptcollection[DejaVu]

\starttypescri= pt[serif]
=C2=A0 =C2=A0 [DejaVu]
=C2=A0 =C2=A0 [name]
\definefonts= ynonym[Serif]
=C2=A0 =C2=A0 [file:DejaVuSerif.ttf]
=C2=A0 =C2=A0 [fal= lbacks=3DFallback]
\stoptypescript

\starttypescript[DejaVu]
\d= efinetypeface[DejaVu][rm][serif]
=C2=A0 =C2=A0 [DejaVu][default]
\sto= ptypescript

\stoptypescriptcollection

\setupbodyfont[DejaVu]<= br>
\starttext
from =E1=BD=80=CF=81=CF=86=CE=B1=CE=BD=E1=BF=96=CE=BF= =CF=82, thus
\stoptext

--000000000000a63d3705ba0f085d-- --===============5934311440079718055== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5934311440079718055==--