Re: [NTG-context] tlig feature sometimes does not work

2021-03-13 Thread Mohammad Hossein Bateni
Added some notes to the wiki:
https://wiki.contextgarden.net/Featuresets#Open-type_features

On Sat, Mar 13, 2021 at 3:12 AM Hans Hagen  wrote:

> On 3/13/2021 2:01 AM, Mohammad Hossein Bateni wrote:
> > Umm... the fallbacks are correct.  My conclusion is that tlig does not
> > work when the character is not in the font itself.  Is that the case?
> > Is this a bug or a feature?
> >
> > \starttext
> >
> >
>  \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no]
> >   \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall]
> >   \definefontfeature[tf][arabic][tlig=yes]
> >   \definedfont[Test*tf]
> >   foo--bar
> >   [\char"2013]
> >   [\char"2014]
> > \stoptext
> ... or a misunderdstanding:
>
> \starttext
>
>
> \definefontfallback[myfallback][dejavuserif*default][0x02d,0x2013,0x2014][check=yes,force=yes]
>
>
> \definefontsynonym[mytestfont][file:Mikhak-Medium.ttf][fallbacks=myfallback]
>   \definedfont[mytestfont*arabic]
>   foo--ofo---oof [\char"002D] [\char"2013] [\char"2014]
> \stoptext
>
> for a ligature to be made all the glyphs involved have to come from the
> same font
>
> I think you should wikify this (also because the font once complete is a
> nice one to use in examples),
>
> 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] tlig feature sometimes does not work

2021-03-13 Thread Hans Hagen

On 3/13/2021 2:01 AM, Mohammad Hossein Bateni wrote:
Umm... the fallbacks are correct.  My conclusion is that tlig does not 
work when the character is not in the font itself.  Is that the case?  
Is this a bug or a feature?


\starttext
 
  \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no]

      \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall]
      \definefontfeature[tf][arabic][tlig=yes]
      \definedfont[Test*tf]
      foo--bar
      [\char"2013]
      [\char"2014]
\stoptext

... or a misunderdstanding:

\starttext

\definefontfallback[myfallback][dejavuserif*default][0x02d,0x2013,0x2014][check=yes,force=yes]

\definefontsynonym[mytestfont][file:Mikhak-Medium.ttf][fallbacks=myfallback]
 \definedfont[mytestfont*arabic]
 foo--ofo---oof [\char"002D] [\char"2013] [\char"2014]
\stoptext

for a ligature to be made all the glyphs involved have to come from the 
same font


I think you should wikify this (also because the font once complete is a 
nice one to use in examples),


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] tlig feature sometimes does not work

2021-03-13 Thread Hans Hagen

On 3/13/2021 1:13 AM, Mohammad Hossein Bateni wrote:

Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in?

because it's not defined as ligature

-
  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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
Umm... the fallbacks are correct.  My conclusion is that tlig does not work
when the character is not in the font itself.  Is that the case?  Is this a
bug or a feature?

\starttext

 \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no]
 \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall]
 \definefontfeature[tf][arabic][tlig=yes]
 \definedfont[Test*tf]
 foo--bar
 [\char"2013]
 [\char"2014]
\stoptext

On Fri, Mar 12, 2021 at 7:13 PM Mohammad Hossein Bateni 
wrote:

> Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in?
>
> On Fri, Mar 12, 2021 at 7:11 PM Mohammad Hossein Bateni 
> wrote:
>
>> That's bad.  It seems, I forgot to add the fallbacks properly.  I will
>> reach out to the designer to add those chars.
>>
>> On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:
>>
>>> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
>>> > Hi,
>>> >
>>> > Since most fonts do not have the standard tex ligatures built in, I
>>> tend
>>> > to add them when I load the fonts.  Once in a while, I run into fonts
>>> > where this does not work.
>>> >
>>> > See the attached tex/pdf files.  I basically load the font as follows:
>>> >
>>> > \definefontfeature[tf][arabic][tlig=yes]
>>> > \definedfont[dejavusansmono*tf]
>>> >
>>> > This works fine for DejaVuSansMono and for one Farsi font I use
>>> > (
>>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
>>> > <
>>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>>>
>>> > but not for this other Farsi font
>>> > (
>>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
>>> > <
>>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>>>
>>> > Perhaps this is because the last font is not standard, but
>>> > TrueType/OpenType standard is sometimes up for interpretation.
>>> >
>>> > I see two strange symptoms here:
>>> >
>>> > \showotfcomposition displays the tlig feature differently for the last
>>> > font.  It appears in the "extra" list, not in "basic".  Why is that?
>>> > What does this mean anyway?
>>>
>>> The font doesn't have endash and emdash so there is nothing to construct
>>> from the double -
>>>
>>> \starttext
>>>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>>>  [\char"2013]
>>>  [\char"2014]
>>> \stoptext
>>>
>>> Just ask the author to add these characters and you're fine.
>>>
>>> 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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in?

On Fri, Mar 12, 2021 at 7:11 PM Mohammad Hossein Bateni 
wrote:

> That's bad.  It seems, I forgot to add the fallbacks properly.  I will
> reach out to the designer to add those chars.
>
> On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:
>
>> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
>> > Hi,
>> >
>> > Since most fonts do not have the standard tex ligatures built in, I
>> tend
>> > to add them when I load the fonts.  Once in a while, I run into fonts
>> > where this does not work.
>> >
>> > See the attached tex/pdf files.  I basically load the font as follows:
>> >
>> > \definefontfeature[tf][arabic][tlig=yes]
>> > \definedfont[dejavusansmono*tf]
>> >
>> > This works fine for DejaVuSansMono and for one Farsi font I use
>> > (
>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
>> > <
>> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>>
>> > but not for this other Farsi font
>> > (
>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
>> > <
>> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>>
>> > Perhaps this is because the last font is not standard, but
>> > TrueType/OpenType standard is sometimes up for interpretation.
>> >
>> > I see two strange symptoms here:
>> >
>> > \showotfcomposition displays the tlig feature differently for the last
>> > font.  It appears in the "extra" list, not in "basic".  Why is that?
>> > What does this mean anyway?
>>
>> The font doesn't have endash and emdash so there is nothing to construct
>> from the double -
>>
>> \starttext
>>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>>  [\char"2013]
>>  [\char"2014]
>> \stoptext
>>
>> Just ask the author to add these characters and you're fine.
>>
>> 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] tlig feature sometimes does not work

2021-03-12 Thread Mohammad Hossein Bateni
That's bad.  It seems, I forgot to add the fallbacks properly.  I will
reach out to the designer to add those chars.

On Fri, Mar 12, 2021 at 12:32 PM Hans Hagen  wrote:

> On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:
> > Hi,
> >
> > Since most fonts do not have the standard tex ligatures built in, I tend
> > to add them when I load the fonts.  Once in a while, I run into fonts
> > where this does not work.
> >
> > See the attached tex/pdf files.  I basically load the font as follows:
> >
> > \definefontfeature[tf][arabic][tlig=yes]
> > \definedfont[dejavusansmono*tf]
> >
> > This works fine for DejaVuSansMono and for one Farsi font I use
> > (
> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf
> > <
> https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf>)
>
> > but not for this other Farsi font
> > (
> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf
> > <
> https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf>).
>
> > Perhaps this is because the last font is not standard, but
> > TrueType/OpenType standard is sometimes up for interpretation.
> >
> > I see two strange symptoms here:
> >
> > \showotfcomposition displays the tlig feature differently for the last
> > font.  It appears in the "extra" list, not in "basic".  Why is that?
> > What does this mean anyway?
>
> The font doesn't have endash and emdash so there is nothing to construct
> from the double -
>
> \starttext
>  \definedfont[file:Mikhak-Medium.ttf*default] foo--bar
>  [\char"2013]
>  [\char"2014]
> \stoptext
>
> Just ask the author to add these characters and you're fine.
>
> 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] tlig feature sometimes does not work

2021-03-12 Thread Hans Hagen

On 3/11/2021 2:05 AM, Mohammad Hossein Bateni wrote:

Hi,

Since most fonts do not have the standard tex ligatures built in, I tend 
to add them when I load the fonts.  Once in a while, I run into fonts 
where this does not work.


See the attached tex/pdf files.  I basically load the font as follows:

\definefontfeature[tf][arabic][tlig=yes]
\definedfont[dejavusansmono*tf]

This works fine for DejaVuSansMono and for one Farsi font I use 
(https://github.com/rastikerdar/vazir-font/blob/master/dist/Vazir-Regular.ttf 
) 
but not for this other Farsi font 
(https://github.com/aminabedi68/Mikhak/blob/master/Font/ttf/Mikhak-Medium.ttf 
).  
Perhaps this is because the last font is not standard, but 
TrueType/OpenType standard is sometimes up for interpretation.


I see two strange symptoms here:

\showotfcomposition displays the tlig feature differently for the last 
font.  It appears in the "extra" list, not in "basic".  Why is that?  
What does this mean anyway?


The font doesn't have endash and emdash so there is nothing to construct 
from the double -


\starttext
\definedfont[file:Mikhak-Medium.ttf*default] foo--bar
[\char"2013]
[\char"2014]
\stoptext

Just ask the author to add these characters and you're fine.

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
___