Re: [NTG-context] "*.jpg is bugged", previously working

2021-09-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.09.2021 um 23:50 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi again,
>> was something changed WRT JPEG images?
>> Since a few versions some images that used to work are denied with the error 
>> message "... is bugged".
>> Maybe there *is* something wrong with them, but I don’t see a problem.
>> "file" gives:
>> JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
>> height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
>> width=2368], baseline, precision 8, 607x420, components 3
>> JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, 
>> segment length 16, Exif Standard: [TIFF image data, big-endian, 
>> direntries=9, manufacturer=FLIR Systems AB, model=FLIR ONE Pro, 
>> orientation=upper-left, xresolution=152, yresolution=160, resolutionunit=2, 
>> software=Common_dll v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, 
>> precision 8, 640x480, components 3
>> The latter is one of Harald’s infrared pictures.
>> I can send them off-list, if you like.
> 
> \starttext
>\externalfigure[20200910T115319.JPG][height=4cm]
>\externalfigure[old-paper-1140627-638x420.jpg][height=4cm]
> \stoptext
> 
> both show up ok
> 
> (fwiw: the jpg code didn't really change since the first release of lmtx)

It’s a problem with grph-downsample.lua (or maybe GM), I must research 
further...

\loadluafile[grph-downsample]

\setupexternalfigures[
  conversion=lowres.jpg,
resolution=72,
]

\starttext
  \externalfigure[20200910T115319][height=4cm]
  \externalfigure[old-paper-1140627-638x420][height=4cm]
\stoptext


Hraban



grph-downsample.lua
Description: Binary data
___
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
___


Re: [NTG-context] "*.jpg is bugged", previously working

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:

Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error message 
"... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.


\starttext
\externalfigure[20200910T115319.JPG][height=4cm]
\externalfigure[old-paper-1140627-638x420.jpg][height=4cm]
\stoptext

both show up ok

(fwiw: the jpg code didn't really change since the first release of lmtx)

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] "*.jpg is bugged", previously working

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 7:22 PM, Henning Hraban Ramm via ntg-context wrote:

Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error message 
"... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.

well, we cannot dump that image from wet memory so ...

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] "*.jpg is bugged", previously working

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Hi again,

was something changed WRT JPEG images?

Since a few versions some images that used to work are denied with the error 
message "... is bugged".

Maybe there *is* something wrong with them, but I don’t see a problem.

"file" gives:

JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, 
height=3408, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, 
width=2368], baseline, precision 8, 607x420, components 3

JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment 
length 16, Exif Standard: [TIFF image data, big-endian, direntries=9, 
manufacturer=FLIR Systems AB, model=FLIR ONE Pro, orientation=upper-left, 
xresolution=152, yresolution=160, resolutionunit=2, software=Common_dll 
v1.0.0b1, datetime=2021:08:03 15:28:27], baseline, precision 8, 640x480, 
components 3

The latter is one of Harald’s infrared pictures.

I can send them off-list, if you like.

Hraban
___
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
___


Re: [NTG-context] line numbering restarts every page

2021-09-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.09.2021 um 18:52 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/1/2021 6:01 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi again,
>> if a "typing" environment with line numbering goes over a page break, the 
>> line numbers start at 1 again on the new page.
>> It doesn’t happen with \start/stoplinenumbering.
>> MWE:
>> \setuptyping[
>>   numbering=file,
>> ]
> 
> \setuptyping[numbering=line]

Ah, thank you! (Wolfgang too!)

I can’t remember why I chose "file", and looking at the source also doesn’t 
enlighten me.

\setuptyping[numbering=file] sets \setuplinenumbering[method=file], but the 
"file" method doesn’t seem to be defined (at least it’s missing in the syntax 
interface).

Can you explain?


Hraban
___
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
___


Re: [NTG-context] line numbering restarts every page

2021-09-01 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 01.09.2021 um 18:01:

Hi again,

if a "typing" environment with line numbering goes over a page break, the line 
numbers start at 1 again on the new page.
It doesn’t happen with \start/stoplinenumbering.

MWE:

\setuptyping[
   numbering=file,
]


\setuptyping[numbering=line]

Wolfgang

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


Re: [NTG-context] line numbering restarts every page

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 6:01 PM, Henning Hraban Ramm via ntg-context wrote:

Hi again,

if a "typing" environment with line numbering goes over a page break, the line 
numbers start at 1 again on the new page.
It doesn’t happen with \start/stoplinenumbering.

MWE:

\setuptyping[
   numbering=file,
]


\setuptyping[numbering=line]



\setuppaper[A5]
\setupbodyfont[18pt]

\starttext

\startbuffer
Li Europan lingues es membres del sam familie.
Lor separat existentie es un myth.
Por scientie, musica, sport etc, litot Europa usa li sam vocabular.
Li lingues differe solmen in li grammatica,
li pronunciation e li plu commun vocabules.
Omnicos directe al desirabilite de un nov lingua franca:
On refusa continuar payar custosi traductores.
At solmen va esser necessi far uniform grammatica,
pronunciation e plu sommun paroles.
Ma quande lingues coalesce, li grammatica del resultant
lingue es plu simplic e regulari quam ti del coalescent lingues.
Li nov lingua franca va esser plu simplic
e regulari quam li existent Europan lingues.
\stopbuffer

\dorecurse{10}{
   \samplefile{knuth}

   \typebuffer
}


\stoptext


Hraban
___
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
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] line numbering restarts every page

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Hi again,

if a "typing" environment with line numbering goes over a page break, the line 
numbers start at 1 again on the new page.
It doesn’t happen with \start/stoplinenumbering.

MWE: 

\setuptyping[
  numbering=file,
]
\setuppaper[A5]
\setupbodyfont[18pt]

\starttext

\startbuffer
Li Europan lingues es membres del sam familie.
Lor separat existentie es un myth.
Por scientie, musica, sport etc, litot Europa usa li sam vocabular.
Li lingues differe solmen in li grammatica,
li pronunciation e li plu commun vocabules.
Omnicos directe al desirabilite de un nov lingua franca:
On refusa continuar payar custosi traductores.
At solmen va esser necessi far uniform grammatica,
pronunciation e plu sommun paroles.
Ma quande lingues coalesce, li grammatica del resultant
lingue es plu simplic e regulari quam ti del coalescent lingues.
Li nov lingua franca va esser plu simplic
e regulari quam li existent Europan lingues.
\stopbuffer

\dorecurse{10}{
  \samplefile{knuth}

  \typebuffer
}


\stoptext


Hraban
___
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
___


Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.09.2021 um 14:45 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to 
>> ConTeXt and would like to avoid the doubling of MP code like:
>> \startMP
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMP
>> \startMPcode
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMPcode
>> I’m quite sure there’s a possibility with buffers, but how?
>> \startbuffer
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopbuffer
>> \typebuffer
>> ... and then how do I get the MP graphic?
> \processMPbuffer

“of course”

Thank you!

Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv

Hraban
___
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
___


Re: [NTG-context] Incorrect rendering in Devanagari forms in some fonts

2021-09-01 Thread kauśika cittūr via ntg-context
On Wednesday, September 1, 2021 1:43:56 PM IST kauśika cittūr wrote:
> Dear All,
> 
> I have encountered a strange problem using certain Devanagari fonts for the
> Sanskrit languagein ConTeXt, wherein the rakaar ligatures are not rendered
> properly in some glyphs/conjuncts. The problem is not too easy to describe
> so please pardon this long email.
> 
> The fonts I am using are as follows:
>   • Shobhika – https://github.com/Sandhi-IITBombay/Shobhika
>   • Murty Sanskrit – https://murtylibrary.com/mcli-fonts.php
> 
> I had previously posted about this issue on TeX SE and Ulrike Fischer was
> kind enough to suggest that the problem might have something to do with the
> font rendering (since I have no issues in XeLaTeX (using Harfbuzz)):
> 
> https://tex.stackexchange.com/questions/612634/devanagari-forms-in-context-u
> sing-shobhika-font
> 
> My ConTeXt (LMTX) version is: 2021.08.30 19:56
> 
> I am using the following typescript for Murty:
> 
> \starttypescript [serif] [murty]
>   \definefontsynonym
> [Serif]
> [name:murtysanskritregular]
> [features=devanagari-two]
> \stoptypescript
> 
> \starttypescript [murty]
>   \definetypeface [murty] [rm] [serif] [murty] [default]
> \stoptypescript
> 
> and the following for Shobhika:
> 
> \starttypescript [serif] [shobhika]
>   \definefontsynonym
> [Serif]
> [name:shobhikaregular]
> [features=devanagari-two]
>   \definefontsynonym
> [SerifBold]
> [name:shobhikabold]
> [features=devanagari-two]
> \stoptypescript
> 
> \starttypescript [shobhika]
>   \definetypeface [shobhika] [rm] [serif] [shobhika]
> \stoptypescript
> 
> Below is the test file I am using to demonstrate the problem:
> 
> \setupbodyfont[shobhika]
> \starttext
> \startcolumns
> ट्रा ट्रि ट्री ट्रु द्रू ट्रे ट्रै ट्रो ट्रौ
> 
> ठ्रा ठ्रि ठ्री ठ्रु ठ्रू ठ्रे ठ्रै ठ्रो ठ्रौ
> 
> ड्रा ड्रि ड्री ड्रु ड्रू ड्रे ड्रै ड्रो ड्रौ
> 
> ढ्रा ढ्रि ढ्री ढ्रु ढ्रू ढ्रे ढ्रै ढ्रो ढ्रौ
> 
> छ्रा छ्रि छ्री छ्रु छ्रू छ्रे छ्रै छ्रो छ्रौ
> 
> \column
> क्र ख्र ग्र घ्र ण्र
> 
> च्र छ्र ज्र झ्र ञ्र
> 
> च्रे छ्रे ज्रे झ्रे ञ्रे
> 
> त्रे थ्रे द्रे ध्रे न्रे
> 
> प्र फ्र ब्र भ्र म्र
> 
> य्र ल्र व्र स्र श्र ष्र ह्र
> \stopcolumns
> \stoptext
> 
> When I use the 'devanagari-two' feature set, which sets the script tag to
> 'dev2', the rakaar forms (provided by the features 'rkrf=yes' and
> 'blwf=yes') do not render properly for some glyphs, namely the glyphs in
> the right column, enclosed in a red rectangle in the file
> 'devanagari-two-forms-shobhika.png' attached in the Drive folder here.
> 
> When I switch to using the 'devanagari-one'
> feature set (in the foregoing typescript definitions), which sets the script
> tag to 'deva', the rakaar forms in the left column are rendered incorrectly
> in
> the file 'devanagari-one-forms-shobhika.png' attached in the Drive folder
> here.
> 
> Analogous problems occur with the Murty font. Further, in the Murty font,
> one other conjunct, namely
> त् +‌ त
> does not render properly. I have highlighted this in the file
> 'murty-conjuct.png'.
> 
> The sample images demonstrating the issues are available in the following
> public Google Drive folder:
> 
> https://drive.google.com/drive/folders/1aOmPKqBzB5usVvT9g-Bxk87exyiQn7ax
> 
> I must mention once again that I have no such problems using either of these
> fonts in XeLaTeX.
> 
> What I am noticing is that this problem only occurs with consonant forms
> that have a 'circular base', i.e., have no danda (the vertical line) next
> to the character. For what it is worth, I have noticed also that I am able
> to 'circumvent' this issue if I write
> 
> छ्र‌ +‌ ​ZWS + Devanagari vowel sign
> 
> where ZWS is the zero-width space U+200B. Unfortunately, this quickly
> becomes very untenable in large documents. Since I was new to ConTeXt I did
> not venture
> to ask earlier on since I had not read much of the documentaion. Now, after
> having read quite a bit, I have mustered up the courage to ask here. As a
> stop-gap solution, I defined another font alternative with
> \definefontalternative[rk]
> and used that with a font synonym using 'devanagari-two' where necessary.
> 
> I have completely migrated (away from (Xe)LaTeX )to ConTeXt for all my
> university work which is in English with lots of mathematics. I am by no
> means an expert but I have learned very much about ConTeXt by reading the
> excellent wiki, documentation and mailing list. I have no issues using
> ConTeXt on an everyday basis for my English-language based work. It is only
> when I tried to use it for my work in Indian-languages that I ran into this
> issue.
> 
> I request your kind help in this matter. I really want to be able to use
> ConTeXt for these Indic works. I will be grateful for any help and/or
> guidance.
> 
> Many thanks,
> kauśika

Dear List,

I request your kind help in this matter. I have consulted almost all resources 
on ConTeXt in this regard, despite which I am unable to resolve it. I 

Re: [NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.09.2021 um 14:06 schrieb Hans Hagen via ntg-context 
> :
> 
> On 9/1/2021 12:48 PM, Henning Hraban Ramm via ntg-context wrote:
>> Hi, since Jacob started the pony mode, here’s one I’d like to ride:
>> MetaPost pens are constant, i.e. they never change over the length of a path.
>> Commercial vector graphics apps have “vector brushes”, e.g. Adobe Fresco:
>> https://helpx.adobe.com/fresco/using/vector-brushes.html
>> The page nicely shows the necessary variables.
>> In Inkscape you can combine “brush images” like
>> https://publicdomainvectors.org/en/free-clipart/Paintbrushes-for-Inkscape/86586.html
>> with pen shapes:
>> https://logosbynick.com/custom-brushes-in-inkscape/
>> This stretches the whole shape over the path – not perfect but good enough 
>> (and the same what e.g. “my” Affinity Designer does).
>> (https://affinity.serif.com/designer/)
>> Is this possible with MetaFun, i.e. use a closed path and distort/stretch it 
>> along an open path?
>> If, how?
> you can try to 'reverse engineer the result' and see what is done by looking 
> at the output

The Inkscape SVG just calls a path-effect "bend_path", see attachment.
If I save a “normal” SVG, the result is “flattened” into a path that looks the 
same but isn’t changeable any more.

> anyway, i guess it some mix of existing basics, as in
> 
> \starttext
> 
> \startMPcode
>path p ; p :=
>( unitcircle xscaled (5cm randomized 5mm) yscaled (4cm 
> randomized 3mm)) --
>(reverse (unitcircle xscaled (5cm randomized 3mm) yscaled (4cm 
> randomized 5mm))) -- cycle;
>draw (p)
> % withpattern image (fill fullcircle scaled 2mm withcolor 
> "darkyellow" ;)
> % withpattern image (draw figure "mill.png" ;)
>withpattern image (draw figure "hacker.jpg" ;)
>withpatternscale (1/40,1/80)
>;
> 
> \stopMPcode
> 
> \stoptext
> 
> so, fills, eofills, patterns and such

I tried to convert my “brush” into MP, but pstoedit fails on either SVG. It 
worked via an exported EPS though, see attachment.

I could then use the brush as a path, also with "withpattern", but that doesn’t 
stretch/distort the “pattern” along the path. And I don’t understand how the 
other fill options would do that.

Yes, I must learn more about MetaPost...

Hraban




brush.mp
Description: Binary data
___
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
___


Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote:

Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to 
ConTeXt and would like to avoid the doubling of MP code like:

\startMP
 path p;
 p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
 draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMP

\startMPcode
 path p;
 p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
 draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMPcode

I’m quite sure there’s a possibility with buffers, but how?

\startbuffer
 path p;
 p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
 draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer

\typebuffer

... and then how do I get the MP graphic?

\processMPbuffer


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] No formula in the pdf (Ursula Hermann)

2021-09-01 Thread Ursula Hermann via ntg-context
Dear Thierry!

The reason was, that i forgot \stoptext at the end

Uschi


Von: ntg-context  im Auftrag von Thierry Horsin via 
ntg-context 
Gesendet: Mittwoch, 1. September 2021 14:01
An: ntg-context@ntg.nl
Cc: Thierry Horsin
Betreff: Re: [NTG-context] No formula in the pdf (Ursula Hermann)

Hi Ursula,
I tried your formula.
The reason might be because you have two \starttext...
Thierry
___
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
___
___
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
___


Re: [NTG-context] Passing colors to Metafun and TeX's bitmapimage macros

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 1:08 PM, Jairo A. del Rio via ntg-context wrote:

Hi, list!
I want to know if there's a handy way to pass predefined colors, either 
RGB or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage. 
Say, something like:


\startMPpage

% svg's gold definition

draw bitmapimage(2, 2, "ffd700 ffd700 ffd700 00") scaled 3cm;

\stopMPpage

using "gold" instead of its definition so that I can set bitmap image 
colors by name rather than numbers. In a similar vein, I wonder if 
something analogous is possible for ConTeXt's \bitmapimage macro. Thank 
you in advance.
it's mostly about 'what interface to use' and 'how is that documented 
and remembered at all'


\startluacode
function MP.replacecolors(str,c)
-- could be a helper, these two combined (never needed it):
local m, a = attributes.colors.namedcolorattributes(c)
local d = attributes.colors.values[a]
local r = string.format("%02x%02x%02x",
math.round(d[3]*255),
math.round(d[4]*255),
math.round(d[5]*255)
)
mp.quoted((string.gsub(str,"44",r)))
end
\stopluacode

\definecolor[kindofgold][h=ffd700]

\startMPpage

draw bitmapimage(2, 2, "ffd700 ffd700 ffd700 00") scaled 3cm;

vardef mybitmapimage(expr n, m, s, c) =
bitmapimage(2, 2, MP.replacecolors(s, c))
enddef ;

draw mybitmapimage(2, 2, "44 44 44 00", "kindofgold") 
scaled 3cm shifted (0,-3cm);


\stopMPpage




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] MetaPost Examples

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to 
ConTeXt and would like to avoid the doubling of MP code like:

\startMP
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMP

\startMPcode
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopMPcode

I’m quite sure there’s a possibility with buffers, but how?

\startbuffer
path p;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer

\typebuffer

... and then how do I get the MP graphic?


Hraban

*) https://github.com/jemmybutton/fiziko
___
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
___


Re: [NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 12:48 PM, Henning Hraban Ramm via ntg-context wrote:

Hi, since Jacob started the pony mode, here’s one I’d like to ride:

MetaPost pens are constant, i.e. they never change over the length of a path.

Commercial vector graphics apps have “vector brushes”, e.g. Adobe Fresco:
https://helpx.adobe.com/fresco/using/vector-brushes.html
The page nicely shows the necessary variables.

In Inkscape you can combine “brush images” like
https://publicdomainvectors.org/en/free-clipart/Paintbrushes-for-Inkscape/86586.html
with pen shapes:
https://logosbynick.com/custom-brushes-in-inkscape/

This stretches the whole shape over the path – not perfect but good enough (and 
the same what e.g. “my” Affinity Designer does).
(https://affinity.serif.com/designer/)

Is this possible with MetaFun, i.e. use a closed path and distort/stretch it 
along an open path?
If, how?
you can try to 'reverse engineer the result' and see what is done by 
looking at the output


anyway, i guess it some mix of existing basics, as in

\starttext

\startMPcode
path p ; p := fullcircle scaled 4cm ;
for i=1 upto 10 :
nodraw p xscaled (1 randomized .1) yscaled (1 randomized .1) ;
endfor ;
dodraw p xscaled (1 randomized .1) yscaled (1 randomized .1)
withtransparency (1,.5) ;
\stopMPcode

\startMPcode
path p ; p := fullcircle scaled 4cm ;
for i=1 upto 10 :
draw p xscaled (1 randomized .1) yscaled (1 randomized .1)
withtransparency (1,.5) ;
endfor ;
draw p xscaled (1 randomized .1) yscaled (1 randomized .1)
withtransparency (1,.5) ;
\stopMPcode

\startMPcode
path p ; p :=
( unitcircle xscaled (5cm randomized 5mm) yscaled (4cm 
randomized 3mm)) --
(reverse (unitcircle xscaled (5cm randomized 3mm) yscaled (4cm 
randomized 5mm))) -- cycle;

draw (p)
% withpattern image (fill fullcircle scaled 2mm withcolor 
"darkyellow" ;)

% withpattern image (draw figure "mill.png" ;)
withpattern image (draw figure "hacker.jpg" ;)
withpatternscale (1/40,1/80)
;

\stopMPcode

\stoptext

so, fills, eofills, patterns and such

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] No formula in the pdf (Ursula Hermann)

2021-09-01 Thread Thierry Horsin via ntg-context
Hi Ursula,
I tried your formula.
The reason might be because you have two \starttext...
Thierry
___
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
___


Re: [NTG-context] No formula in the pdf

2021-09-01 Thread Ursula Hermann via ntg-context
Dear Hans,

thank you.


Uschi



Von: ntg-context  im Auftrag von Hans Hagen via 
ntg-context 
Gesendet: Mittwoch, 1. September 2021 13:07
An: Ursula Hermann via ntg-context
Cc: Hans Hagen
Betreff: Re: [NTG-context] No formula in the pdf

On 9/1/2021 12:30 PM, Ursula Hermann via ntg-context wrote:
> Dear List
>
>
> I have the following example.
>
> \setuppapersize[A4]
> \mainlanguage[de]
> \starttext
> Wir können sogar die gesamte Matrix A über ihre Einträge mit Hilfe der
> Indizes definieren, indem wir schreiben
> \startformula
>A_{ij}=5i
> \stopformula
> \starttext
^^ \stoptext


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 
www.pragma-pod.nl
-
___
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
___
___
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
___


[NTG-context] Passing colors to Metafun and TeX's bitmapimage macros

2021-09-01 Thread Jairo A. del Rio via ntg-context
Hi, list!
I want to know if there's a handy way to pass predefined colors, either RGB
or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage. Say,
something like:

\startMPpage

% svg's gold definition

draw bitmapimage(2, 2, "ffd700 ffd700 ffd700 00") scaled 3cm;

\stopMPpage

using "gold" instead of its definition so that I can set bitmap image
colors by name rather than numbers. In a similar vein, I wonder if
something analogous is possible for ConTeXt's \bitmapimage macro. Thank you
in advance.

Cordially,

Jairo
___
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
___


Re: [NTG-context] No formula in the pdf

2021-09-01 Thread Hans Hagen via ntg-context

On 9/1/2021 12:30 PM, Ursula Hermann via ntg-context wrote:

Dear List


I have the following example.

\setuppapersize[A4]
\mainlanguage[de]
\starttext
Wir können sogar die gesamte Matrix A über ihre Einträge mit Hilfe der 
Indizes definieren, indem wir schreiben

\startformula
   A_{ij}=5i
\stopformula
\starttext

^^ \stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


[NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Hi, since Jacob started the pony mode, here’s one I’d like to ride:

MetaPost pens are constant, i.e. they never change over the length of a path.

Commercial vector graphics apps have “vector brushes”, e.g. Adobe Fresco:
https://helpx.adobe.com/fresco/using/vector-brushes.html
The page nicely shows the necessary variables.

In Inkscape you can combine “brush images” like
https://publicdomainvectors.org/en/free-clipart/Paintbrushes-for-Inkscape/86586.html
with pen shapes:
https://logosbynick.com/custom-brushes-in-inkscape/

This stretches the whole shape over the path – not perfect but good enough (and 
the same what e.g. “my” Affinity Designer does).
(https://affinity.serif.com/designer/)

Is this possible with MetaFun, i.e. use a closed path and distort/stretch it 
along an open path?
If, how?


Hraban
___
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
___


[NTG-context] No formula in the pdf

2021-09-01 Thread Ursula Hermann via ntg-context
Dear List


I have the following example.

\setuppapersize[A4]
\mainlanguage[de]
\starttext
Wir können sogar die gesamte Matrix A über ihre Einträge mit Hilfe der Indizes 
definieren, indem wir schreiben
\startformula
  A_{ij}=5i
\stopformula
\starttext


Why is there no formula in the pdf?

And is that right with A{ij}


After compiling i get the following

Command Line:   context.exe --synctex=-1 "Example1.tex"
Startup Folder: C:\Users\Administrator\Documents\My Documents
resolvers   | formats | executing runner 'run luatex format': 
C:/texlive/2020/bin/win32/luatex --jobname="Example1" 
--fmt=C:/texlive/2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.fmt
 
--lua=C:/texlive/2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui
 cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./Example1.tex" 
--c:input="./Example1.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:synctex="-1" 
--c:texmfbinpath="C:/texlive/2020/bin/win32"
This is LuaTeX, Version 1.12.0 (TeX Live 2020/W32TeX)
 system commands enabled.
open source > level 1, order 1, name 
'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2021.1.18  
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'Example1', input './Example1', result 
'Example1'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
system  > synctex functionality is enabled, expect 5-10 pct runtime 
overhead!
open source > level 2, order 3, name 'C:/Users/Administrator/Documents/My 
Documents/Example1.tex'
modules > 'amsl' is not found
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file 
'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name 'C:/Users/Administrator/Documents/My 
Documents/Example1.tex'
close source> level 1, order 3, name 
'C:/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: 
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/texlive/2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9
mkiv lua stats  > resource resolver: loadtime 0.165 seconds, 1 scans with 
scantime 0.003 seconds, 0 shared scans, 12 found files, scanned paths: 
C:/Users/Administrator/.texlive2020/texmf-config
mkiv lua stats  > stored bytecode data: 450 modules (0.395 sec), 93 tables 
(0.013 sec), 543 chunks (0.408 sec)
mkiv lua stats  > traced context: maxstack: 1398, freed: 0, unreachable: 1398
mkiv lua stats  > cleaned up reserved nodes: 56 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 11 attribute, 4 attribute_list, 1 glue, 51 
glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 instances 
(re)created, 39 calls
mkiv lua stats  > synctex tracing: 2 referenced files, 4 files ignored, 5 
objects flushed, logfile: Example1.synctex
mkiv lua stats  > driver time: 0.134 seconds
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.002 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 136, file: 144, direct: 2, late: 6, 
function 507, total: 795
mkiv lua stats  > randomizer: resumed with value 0.087860107421875
mkiv lua stats  > positions: 2 collected, 2 regular, 0 special
mkiv lua stats  > loaded tex modules: 1 requested, all missing (*-amsl)
mkiv lua stats  > result saved in file: Example1.pdf, compresslevel 3, 
objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.111, afm 1.513, tfm 1.000, 7 instances, 3 
shared in backend, 3 common vectors, 0 common hashes, load time 0.208 seconds
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: bin
mkiv lua stats  > used engine: luatex version: 1.12, functionality level: 7306, 
banner: this is luatex, version 1.12.0 (tex live 2020/w32tex)
mkiv lua stats  > control sequences: 45874 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 125 MB, ctx: 
124 MB, max: unknown MB, hash chars: min(32,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.813 seconds, 1 processed pages, 1 

[NTG-context] colors and contours in luametafun

2021-09-01 Thread Jacob Kauffmann via ntg-context
Dear list,

I am a huge fan of the new metafun interface.
Hans asked for luametafun requests, so here are a few.

 - color by value in lmt_surface
We want to show a surface plot of a function where the color indicates the 
function value (instead, or in addition to a light source).
The easiest would be to have variable cf for the brightness factor (as it is), 
and in addition variables such as zt, minz, maxz, akin to the color formatter 
for lmt_contour.
This becomes handy when colors are to be aligned with function values (e.g. 
negative = blue, zero = white, positive = red, see MWE attached).

 - controlling line levels in lmt_contour
It would be convenient if certain levels could be set by the user. E.g. to make 
sure the zero level contour line is included.
The user interface could potentially take a list, levels = { -1, -.5, 0, .5, 1 
}, of contour level lines. See MWE attached.
From my understanding marching squares can do that. A possible reference 
implementation could be QuadContourGenerator [1] in matplotlib, a bit of 
description can be found in [2].

 - colormaps
Contour plots often use rather complex colormaps, such as jet, rainbow or 
veridis. They are optimized for perceptual resolution, color blindness, 
screen/print or certain use cases.
The functionality is already there, but from a user's perspective, it would be 
much easier if some of these were provided by the interface.
The interface could be color = "colormap('jet')(l/n)". Indeed, these are useful 
in other use cases as well, such as bar charts, surface plots or shades.
One rudimentary example is in the attached file.

 - number of levels in lmt_contour (potential bug)
The number of levels is different from the user's input. Depending on the 
output range it can be lower or higher (see MWE attached).

Cheers,
Jacob Kauffmann

[1] 
https://github.com/matplotlib/matplotlib/blob/96ff1146ad053c5c7481efd9de039c879a595968/src/_contour.cpp
[2] 
https://github.com/matplotlib/matplotlib/blob/96ff1146ad053c5c7481efd9de039c879a595968/src/_contour.h



colors_and_contours_in_luametafun.tex
Description: Binary data


colors_and_contours_in_luametafun.pdf
Description: Adobe PDF document
___
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
___


[NTG-context] Incorrect rendering in Devanagari forms in some fonts

2021-09-01 Thread kauśika cittūr via ntg-context
Dear All,

I have encountered a strange problem using certain Devanagari fonts for the 
Sanskrit languagein ConTeXt, wherein the rakaar ligatures are not rendered 
properly in some glyphs/conjuncts. The problem is not too easy to describe so 
please pardon this long email.

The fonts I am using are as follows: 
  • Shobhika – https://github.com/Sandhi-IITBombay/Shobhika
  • Murty Sanskrit – https://murtylibrary.com/mcli-fonts.php

I had previously posted about this issue on TeX SE and Ulrike Fischer was 
kind enough to suggest that the problem might have something to do with the 
font rendering (since I have no issues in XeLaTeX (using Harfbuzz)): 

https://tex.stackexchange.com/questions/612634/devanagari-forms-in-context-using-shobhika-font

My ConTeXt (LMTX) version is: 2021.08.30 19:56

I am using the following typescript for Murty:

\starttypescript [serif] [murty]
  \definefontsynonym 
[Serif] 
[name:murtysanskritregular] 
[features=devanagari-two]
\stoptypescript

\starttypescript [murty]
  \definetypeface [murty] [rm] [serif] [murty] [default]
\stoptypescript 

and the following for Shobhika:

\starttypescript [serif] [shobhika]
  \definefontsynonym 
[Serif] 
[name:shobhikaregular] 
[features=devanagari-two]
  \definefontsynonym 
[SerifBold] 
[name:shobhikabold]
[features=devanagari-two]
\stoptypescript

\starttypescript [shobhika]
  \definetypeface [shobhika] [rm] [serif] [shobhika]
\stoptypescript

Below is the test file I am using to demonstrate the problem:

\setupbodyfont[shobhika]
\starttext
\startcolumns
ट्रा ट्रि ट्री ट्रु द्रू ट्रे ट्रै ट्रो ट्रौ

ठ्रा ठ्रि ठ्री ठ्रु ठ्रू ठ्रे ठ्रै ठ्रो ठ्रौ

ड्रा ड्रि ड्री ड्रु ड्रू ड्रे ड्रै ड्रो ड्रौ

ढ्रा ढ्रि ढ्री ढ्रु ढ्रू ढ्रे ढ्रै ढ्रो ढ्रौ

छ्रा छ्रि छ्री छ्रु छ्रू छ्रे छ्रै छ्रो छ्रौ

\column
क्र ख्र ग्र घ्र ण्र 

च्र छ्र ज्र झ्र ञ्र

च्रे छ्रे ज्रे झ्रे ञ्रे

त्रे थ्रे द्रे ध्रे न्रे 

प्र फ्र ब्र भ्र म्र

य्र ल्र व्र स्र श्र ष्र ह्र 
\stopcolumns
\stoptext

When I use the 'devanagari-two' feature set, which sets the script tag to 
'dev2', the rakaar forms (provided by the features 'rkrf=yes' and 'blwf=yes') 
do not render properly for some glyphs, namely the glyphs in the right column, 
enclosed in a red rectangle in the file 'devanagari-two-forms-shobhika.png' 
attached in the Drive folder here.

When I switch to using the 'devanagari-one' 
feature set (in the foregoing typescript definitions), which sets the script 
tag to 'deva', the rakaar forms in the left column are rendered incorrectly  
in 
the file 'devanagari-one-forms-shobhika.png' attached in the Drive folder here.

Analogous problems occur with the Murty font. Further, in the Murty font, one 
other conjunct, namely
त् +‌ त 
does not render properly. I have highlighted this in the file 
'murty-conjuct.png'.

The sample images demonstrating the issues are available in the following 
public Google Drive folder: 

https://drive.google.com/drive/folders/1aOmPKqBzB5usVvT9g-Bxk87exyiQn7ax

I must mention once again that I have no such problems using either of these 
fonts in XeLaTeX. 

What I am noticing is that this problem only occurs with consonant forms that 
have a 'circular base', i.e., have no danda (the vertical line) next to the 
character. For what it is worth, I have noticed also that I am able to 
'circumvent' this issue if I write 

छ्र‌ +‌ ​ZWS + Devanagari vowel sign

where ZWS is the zero-width space U+200B. Unfortunately, this quickly becomes 
very untenable in large documents. Since I was new to ConTeXt I did not 
venture 
to ask earlier on since I had not read much of the documentaion. Now, after 
having read quite a bit, I have mustered up the courage to ask here. As a 
stop-gap solution, I defined another font alternative with
\definefontalternative[rk]
and used that with a font synonym using 'devanagari-two' where necessary. 

I have completely migrated (away from (Xe)LaTeX )to ConTeXt for all my 
university work which is in English with lots of mathematics. I am by no means 
an expert but I have learned very much about ConTeXt by reading the excellent 
wiki, documentation and mailing list. I have no issues using ConTeXt on an 
everyday basis for my English-language based work. It is only when I tried to 
use it for my work in Indian-languages that I ran into this issue.

I request your kind help in this matter. I really want to be able to use 
ConTeXt for these Indic works. I will be grateful for any help and/or 
guidance.

Many thanks,
kauśika
___
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