From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107198 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Re: How do I add cyrillic to my typescript/document? Date: Mon, 4 May 2020 00:36:11 +0200 Message-ID: References: <7B138924-D7B4-4244-ABDA-5F8F78D699FD@rna.nl> <1f1f73d4-9ce9-fd20-04b6-7814d9112c97@gmx.es> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============0092584842593499880==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56188"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 04 00:36:32 2020 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 1jVNDs-000EVB-9n for gctc-ntg-context-518@m.gmane-mx.org; Mon, 04 May 2020 00:36:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A6C3F183A36; Mon, 4 May 2020 00:36:20 +0200 (CEST) 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 BDQk32-Myc3y; Mon, 4 May 2020 00:36:19 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A3FE8183A34; Mon, 4 May 2020 00:36:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D8073183A34 for ; Mon, 4 May 2020 00:36:17 +0200 (CEST) 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 H72DRQCYJQwL for ; Mon, 4 May 2020 00:36:15 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 51FC2183A20 for ; Mon, 4 May 2020 00:36:15 +0200 (CEST) Original-Received: from luna-wifi.rna.nl (luna-wifi.rna.nl [192.168.2.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id 3FB333E123F8 for ; Mon, 4 May 2020 00:36:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1588545373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xx0fKp8gC7HvbHLLYdCzHflVyJhL1YQGyeLmY4AMhqQ=; b=L4HGFJ6lXDxugtDv58M5qGqiULWns2AEpd8sBDuaRSTB3CWYWdfJOFUtZdl5ZMocUllIQ5 0axLpcct+wbuDJV+mGZMUJKvm9eonXjupQdKvnVH7CuRDi7GA/7FaU+fuP1SdtOVOFEacx nsnLmHdqCEA5rf8OsaJhkhw3Xszf1PJ4MAiizxwFf+HFaeKRGI/NpgSv1etnPYDjkteK6W WFBokckmt1biE6qzjZ7FPi0NZcdipqAu3a/Id4aLUMggI8Exc+amZccBSdYF+hfqYofe6E QAU9gsqdfIUSS1AtQu9xZvUB09uTTmlxMsd2ClGWcosYAZXEPwu9cVBHzkumVQ== In-Reply-To: <1f1f73d4-9ce9-fd20-04b6-7814d9112c97@gmx.es> X-Mailer: Apple Mail (2.3445.104.14) 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:107198 Archived-At: --===============0092584842593499880== Content-Type: multipart/alternative; boundary="Apple-Mail=_FD8F5282-F79A-4192-81C0-30AB4B309F12" --Apple-Mail=_FD8F5282-F79A-4192-81C0-30AB4B309F12 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 3 May 2020, at 15:55, Pablo Rodriguez wrote: >=20 > On 5/3/20 2:56 PM, Gerben Wierda wrote: >> ConTeXtgarden had theanswer when I searched again: >>=20 >> \setupbodyfont[dejavu] >> \mainlanguage[russian] >=20 > Hi Gerben, >=20 > I=E2=80=99m afraid they may be different issues: setting a language = and getting > the glyphs required for that language. >=20 > See the following sample: >=20 > \setupbodyfont[dejavu] > \mainlanguage[russian] > \starttext > \hyphenatedword{% > =D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=B8=D1=87 > typography > \en typography} > \stoptext >=20 > Since you set the main language to Russian in the document, you would > have to mark all English texts properly. I doubt this may be what you > intend. >=20 > The way to get a fallback font would be (depending on which approach = you > use) \definefontfallback or \definefallbackfamily. >=20 > A sample of the second option would read: >=20 > \definefallbackfamily > [mainface] > [ss] > [FreeSans] > [preset=3Drange:cyrillic, > force=3Dyes] >=20 > In any case, > = http://www.pragma-ade.com/general/qrcs/setup-en.pdf#search=3D%22definefont= fallback%22 > explains the syntax of the first option (sorry, but I only use the > \definefontfamily approach). >=20 > Just in case it helps, Thank you. It could help if I would understand ConTeXt better. The link gives me a = grammar for a command, but doesn=E2=80=99t tell me what to put in. I tried many, many different permutations, I tried everything I could = find on ConTeXtgarden (but then, that also finds me stuff from 15 years = ago that isn=E2=80=99t valid anymore), but no luck so far. The last I tried was \starttypescript [sans] [optima] \setups[font:fallback:sans] \definefontsynonym [Sans] [file:Optima.ttc(Optima Regular)] = [features=3Ddefault] \definefontsynonym [SansBold] [file:Optima.ttc(Optima Bold)] = [features=3Ddefault] \definefontsynonym [SansItalic] [file:Optima.ttc(Optima Italic)] = [features=3Ddefault] \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault] \stoptypescript \definetypeface [optima] [ss] [sans] [optima] [default] \definetypeface [optima] [rm] [serif] [optima] [default] \definetypeface [optima] [tt] [mono] [modern] [default] \definetypeface [optima] [mm] [math] [pagella] [default] \definefallbackfamily [optima] [ss] [file:Helvetica.ttc] [preset=3Drange:cyrillic, force=3Dyes] \setupbodyfont [optima] The error is: fonts > typescripts > unknown library 'optima' open source > level 3, order 6, name = '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-i= mp-texgyre.mkiv' close source > level 3, order 6, name = '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-i= mp-texgyre.mkiv' selectfont > the requested fallback font 'file:Helvetica.ttc' for = typeface 'optima' style 'ss' was ignored because no files where found. Which is weird because Optima.ttc is in the same directory and it is = found. I have a lot o difficulty understanding any of the documentation (as far = as it is available for the subjects and commands I am lookng for). For instance: what is the difference between the =E2=80=9CSyntax = (autogenerated)=E2=80=9D and =E2=80=9CSyntax entries on ConTeXtgarden? = If they differ which one should I take? If you tell me = =E2=80=9Cpreset=3Drange:cyrillic and what I find says "range=3Dcyrillic", = which one do I use ( in this case, changing did not help). There are = just too many things that can be different for tial and error to be = effective. But anyway, even if I could understand it, I can=E2=80=99t find anything = useful (that is: something that works or makes me try something that = works) about font fallbacks. Spending hours of looking (losing a lot of = sleep) and then having to bother the list again is very frustrating. Why = isn=E2=80=99t this straightforward? I am sorry, everybody is very = helpful, but the frustration mounts again. G= --Apple-Mail=_FD8F5282-F79A-4192-81C0-30AB4B309F12 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On = 3 May 2020, at 15:55, Pablo Rodriguez <oinos@gmx.es> wrote:

On 5/3/20 2:56 PM, Gerben Wierda wrote:
ConTeXtgarden had = theanswer when I searched again:

\setupbodyfont[dejavu]
\mainlanguage[russian]

Hi Gerben,

I=E2=80=99m afraid they may be different issues: setting a = language and getting
the glyphs required for that = language.

See the following sample:

   \setupbodyfont[dejavu]
   \mainlanguage[russian]
=    \starttext
=    \hyphenatedword{%
=    =D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5=D0=B2=D0=B8=D1= =87
   typography
=    \en typography}
=    \stoptext

Since you set = the main language to Russian in the document, you would
have= to mark all English texts properly. I doubt this may be what you
intend.

The way to get a = fallback font would be (depending on which approach you
use)= \definefontfallback or \definefallbackfamily.

A sample of the second option would read:

 \definefallbackfamily
=    [mainface]
   [ss]
   [FreeSans]
=    [preset=3Drange:cyrillic,
=     force=3Dyes]

In any = case,
http://www.pragma-ade.com/general/qrcs/setup-en.pdf#search=3D%2= 2definefontfallback%22
explains the syntax of the = first option (sorry, but I only use the
\definefontfamily = approach).

Just in case it helps,

Thank = you.

It could help if I = would understand ConTeXt better. The link gives me a grammar for a = command, but doesn=E2=80=99t tell me what to put in.

I tried many, many different permutations, I tried = everything I could find on ConTeXtgarden (but then, that also finds me = stuff from 15 years ago that isn=E2=80=99t valid anymore), but no luck = so far.

The last I tried = was

\starttypescript= [sans] [optima]
  =  \setups[font:fallback:sans]
   \definefontsynonym [Sans]       =     [file:Optima.ttc(Optima Regular)]     = [features=3Ddefault]
  =  \definefontsynonym [SansBold]       = [file:Optima.ttc(Optima Bold)]       =  [features=3Ddefault]
  =  \definefontsynonym [SansItalic]     = [file:Optima.ttc(Optima Italic)]     =  [features=3Ddefault]
  =  \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault]
\stoptypescript

\definetypeface = [optima] [ss] [sans] [optima] [default]
\definetypeface [optima] [rm] [serif] [optima] = [default]
\definetypeface [optima] [tt] = [mono] [modern] [default]
\definetypeface = [optima] [mm] [math] [pagella] [default]

  = \definefallbackfamily
    = [optima]
    = [ss]
    = [file:Helvetica.ttc]
    = [preset=3Drange:cyrillic,
    = force=3Dyes]

\setupbodyfont = [optima]

The error = is:

fonts =           > typescripts > unknown library = 'optima'
open source     > level 3, = order 6, name = '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-i= mp-texgyre.mkiv'
close source    > level 3, = order 6, name = '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-i= mp-texgyre.mkiv'
selectfont      > the = requested fallback font 'file:Helvetica.ttc' for typeface 'optima' style = 'ss' was ignored because no files where found.


Which is weird because Optima.ttc is = in the same directory and it is found.

I have a lot o difficulty understanding any of the = documentation (as far as it is available for the subjects and commands I = am lookng for).

For instance: what = is the difference between the =E2=80=9CSyntax (autogenerated)=E2=80=9D = and =E2=80=9CSyntax entries on ConTeXtgarden? If they differ which one = should I take? If you tell me =E2=80=9Cpreset=3Drange:cyrillic and what = I find says "range=3Dcyrillic", which one do I use ( in this case, = changing did not help). There are just too many things that can be = different for tial and error to be effective.

But anyway, even if I could understand it, I = can=E2=80=99t find anything useful (that is: something that works or = makes me try something that works) about font fallbacks. Spending hours = of looking (losing a lot of sleep) and then having to bother the list = again is very frustrating. Why isn=E2=80=99t this straightforward? I am = sorry, everybody is very helpful, but the frustration mounts = again.

G
= --Apple-Mail=_FD8F5282-F79A-4192-81C0-30AB4B309F12-- --===============0092584842593499880== 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== --===============0092584842593499880==--