ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How do I add cyrillic to my typescript/document?
Date: Mon, 4 May 2020 00:36:11 +0200	[thread overview]
Message-ID: <D310CA8B-63BC-4AD6-8B71-0ABCFC996840@rna.nl> (raw)
In-Reply-To: <1f1f73d4-9ce9-fd20-04b6-7814d9112c97@gmx.es>


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

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’m 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{%
>    Николаевич
>    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=range:cyrillic,
>     force=yes]
> 
> In any case,
> http://www.pragma-ade.com/general/qrcs/setup-en.pdf#search=%22definefontfallback%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’t 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’t 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=default]
   \definefontsynonym [SansBold]       [file:Optima.ttc(Optima Bold)]        [features=default]
   \definefontsynonym [SansItalic]     [file:Optima.ttc(Optima Italic)]      [features=default]
   \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] [features=default]
\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=range:cyrillic,
    force=yes]

\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-imp-texgyre.mkiv'
close source    > level 3, order 6, name '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-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 “Syntax (autogenerated)” and “Syntax entries on ConTeXtgarden? If they differ which one should I take? If you tell me “preset=range:cyrillic and what I find says "range=cyrillic", 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’t 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’t this straightforward? I am sorry, everybody is very helpful, but the frustration mounts again.

G

[-- Attachment #1.2: Type: text/html, Size: 8844 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
___________________________________________________________________________________

  reply	other threads:[~2020-05-03 22:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 11:34 Gerben Wierda
2020-05-03 12:56 ` Gerben Wierda
2020-05-03 13:55   ` Pablo Rodriguez
2020-05-03 22:36     ` Gerben Wierda [this message]
2020-05-04  2:37       ` Vladimir Lomov
2020-05-04  6:14       ` Henning Hraban Ramm
2020-05-04 10:13       ` Pablo Rodriguez
2020-05-04 16:38         ` Gerben Wierda
2020-05-04 22:49           ` Pablo Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D310CA8B-63BC-4AD6-8B71-0ABCFC996840@rna.nl \
    --to=gerben.wierda@rna.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).