ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: How do I add cyrillic to my typescript/document?
Date: Mon, 4 May 2020 12:13:47 +0200	[thread overview]
Message-ID: <cb12557c-d00e-dae3-fa35-ee727e321c53@gmx.es> (raw)
In-Reply-To: <D310CA8B-63BC-4AD6-8B71-0ABCFC996840@rna.nl>

On 5/4/20 12:36 AM, Gerben Wierda wrote:
> [...]
> 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.

Sorry for not explaining it better, Gerben.

Let me know if the following sample works for you:

  \setuplanguage[en][patterns={en, ru}]

  \definefallbackfamily
    [abc]
    [ss]
    [Helvetica]
    [preset=range:cyrillic,
     %~ tf=style:light,
     %~ it=style:lightoblique,
     %~ bf=style:regular,
     %~ bi=style:oblique,
     force=yes,
     rscale=0.9]

  \definefontfamily [abc] [ss] [Optima]

  \setupbodyfont[abc]

  \starttext
  \startTEXpage[offset=1em]
  \doloopoverlist{\tf, \it, \bf, \bi}{
  \recursestring\hyphenatedword{Николаевич typography}\par}
  \stopTEXpage
  \stoptext

It should hyphenate both English and Russian in all four fonts (regular,
italic, bold and bold italic).

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

Aren’t Optima.ttc and Helvetica.ttc installed as typefaces on your macOS?

This is relevant, since ConTeXt may have problems finding them when not
installed on the system (especially with the system I use).

If the sample above doesn’t work, please provide the output of "locate
Helvetica.ttc".

> 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.

If the sample above works, I think font management for your documents
may be easier to handle (or at least, the font code will be simpler).

Don’t loose sleep when code is not working, ask here instead. I must
admit that not having access to a macOS computer (I needed the help of a
friend to test) makes everything a bit harder. But it isn’t impossible.

BTW, I use "preset=range:cyrillic" instead of "range=cyrillic", since it
includes cyrillic, cyrillicextendeda, cyrillicextendedb and
cyrillicsupplement.

I hope the sample above helps now,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2020-05-04 10:13 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
2020-05-04  2:37       ` Vladimir Lomov
2020-05-04  6:14       ` Henning Hraban Ramm
2020-05-04 10:13       ` Pablo Rodriguez [this message]
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=cb12557c-d00e-dae3-fa35-ee727e321c53@gmx.es \
    --to=oinos@gmx.es \
    --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).