![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
On 4 May 2020, at 12:13, Pablo Rodriguez
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).
The above works (including using macOS Helvetica as the font for cyrillic). Thank you. I have no idea why (earlier I got the typescript suggestion for my fonts management, but this uses another approach). Is it the case that the ‘family’ and ’typescript’ approaches don’t really mix? The above is a lot simpler than that what I had and it works fine. Any reason to leave these commented? And does uncommenting is plan TeX-uncommenting, so only the % goes away? Makes me wonder what ‘~’ means.
%~ tf=style:light, %~ it=style:lightoblique, %~ bf=style:regular, %~ bi=style:oblique,
What I try to do is to have english as the default (and fallback) language and Optima as the default font, but there may be snippets in other languages which should be typeset in a font that can handle cyrillic. Helvetica is an option. So is dejavu. I still am totally in the dark how this works and what made the earlier setup find Optima but not find Helvetica. And I’m curious why this adaptation doesn’t work: \definefallbackfamily [abc] [ss] [dejavu] [preset=range:cyrillic, %~ tf=style:light, %~ it=style:lightoblique, %~ bf=style:regular, %~ bi=style:oblique, force=yes, rscale=0.9] Anyway, I can go on, not wiser but helped further. Thanks again. G
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 ___________________________________________________________________________________