ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* blockligatures removing characters
@ 2022-05-07 15:49 Ben Moon via ntg-context
  2022-05-09  7:56 ` Denis Maier via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Moon via ntg-context @ 2022-05-07 15:49 UTC (permalink / raw)
  To: Context Mailing List; +Cc: Ben Moon


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

Hi List,

I'm using blockligatures to avoid the 'Th' ligature in some fonts but keep others. Recently I've found this removes the 'h' completely, i.e. 'Th' is changed to 'T', 'The' becomes 'Te' etc. 

Is there a way to restore the blockligatures functionality? I'm on ConTeXt version 2022.05.02 16:19.

Here is a MWE using Almendra (https://fonts.google.com/specimen/Almendra <https://fonts.google.com/specimen/Almendra?preview.text=Th%20Almost%20before%20we%20knew%20it,%20we%20had%20left%20the%20ground.%20&preview.text_type=custom>) from Google Fonts.

```
\starttypescriptcollection[myfont]

    \starttypescript[myfont]
        \definefontsynonym[Serif][Almendra-Regular][features=default]
    \stoptypescript
    
    \starttypescript[myfont]
        \definetypeface[\typescriptone][rm][serif][myfont][default][]
    \stoptypescript

\stoptypescriptcollection

\blockligatures[Th]

\definefontfeature[default][default][liga=yes]
\definefontfeature[default:nolig][default][liga=no]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
    The This These have the Th ligature and others (fi)

    \definedfont[Serif*default:nolig]
    The This These have no ligatures (not fi)

    \definedfont[Serif*default:blocklig]
    The This These are missing the `h' (fi)
\stoptext
```

Best,
Ben

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-07 15:49 blockligatures removing characters Ben Moon via ntg-context
@ 2022-05-09  7:56 ` Denis Maier via ntg-context
  2022-05-09 13:03   ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-09  7:56 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier


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

Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.

By the way, this even happens without special fonts:

\blockligatures[Th]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
        \definedfont[Serif*default:blocklig]
    The This These are missing the `h'
\stoptext



Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Ben Moon via ntg-context
Gesendet: Samstag, 7. Mai 2022 17:49
An: Context Mailing List <ntg-context@ntg.nl>
Cc: Ben Moon <ben@themoons.uk>
Betreff: [NTG-context] blockligatures removing characters

Hi List,

I'm using blockligatures to avoid the 'Th' ligature in some fonts but keep others. Recently I've found this removes the 'h' completely, i.e. 'Th' is changed to 'T', 'The' becomes 'Te' etc.

Is there a way to restore the blockligatures functionality? I'm on ConTeXt version 2022.05.02 16:19.

Here is a MWE using Almendra (https://fonts.google.com/specimen/Almendra<https://fonts.google.com/specimen/Almendra?preview.text=Th%20Almost%20before%20we%20knew%20it,%20we%20had%20left%20the%20ground.%20&preview.text_type=custom>) from Google Fonts.

```
\starttypescriptcollection[myfont]

    \starttypescript[myfont]
        \definefontsynonym[Serif][Almendra-Regular][features=default]
    \stoptypescript

    \starttypescript[myfont]
        \definetypeface[\typescriptone][rm][serif][myfont][default][]
    \stoptypescript

\stoptypescriptcollection

\blockligatures[Th]

\definefontfeature[default][default][liga=yes]
\definefontfeature[default:nolig][default][liga=no]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
    The This These have the Th ligature and others (fi)

    \definedfont[Serif*default:nolig]
    The This These have no ligatures (not fi)

    \definedfont[Serif*default:blocklig]
    The This These are missing the `h' (fi)
\stoptext
```

Best,
Ben

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-09  7:56 ` Denis Maier via ntg-context
@ 2022-05-09 13:03   ` Hans Hagen via ntg-context
  2022-05-09 13:20     ` Denis Maier via ntg-context
  2022-05-13 13:29     ` Ben Moon via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen via ntg-context @ 2022-05-09 13:03 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> 
> By the way, this even happens without special fonts:
> 
> \blockligatures[Th]
> 
> \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
> 
> \setupbodyfont[myfont]
> 
> \starttext
> 
> \definedfont[Serif*default:blocklig]
> 
>      The This These are missing the `h'
> 
> \stoptext
I'll fix it but it's not the way to do it in lmtx where we have

\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 patterns = {
                     fio  = "f|io",
                 },
                 words = [[ fioot fiots ]],
             },
             {
                 patterns = {
                     fio  = "t|h",
                 },
                 words = [[ this that ]],
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     fiets fiots fiats fioot this that
\stoptext

I just added (no upload) this

\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 substitutions = {
                     th = "t|h",
                     Th = "T|h",
                     st = "s|t",
                     St = "S|t",
                     fi = "f|i",
                 },
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     The This These fiets and thisthis thisfiets
\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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-09 13:03   ` Hans Hagen via ntg-context
@ 2022-05-09 13:20     ` Denis Maier via ntg-context
  2022-05-13 13:29     ` Ben Moon via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-09 13:20 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier

So, if IIUC those substitutions can be used to block certain ligatures throughout? 

You can load multiple goodies files as in the example below, correct?

Best,
Denis

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\startluacode
     local blockthlig = {
         name    = "blockthlig",
         options = {
             {
                 substitutions = {
                     th = "t|h",
                     Th = "T|h",
                 },
             },
         },
     }
     table.save("blockthlig.llg",blockthlig)
\stopluacode

\setuplanguage[en][goodies={lang-en.llg, blockthlig.llg }]

\setupbodyfont[ebgaramond]

\starttext
     The This These fiets and thisthis thisfiets 
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


> -----Ursprüngliche Nachricht-----
> Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Montag, 9. Mai 2022 15:03
> An: ntg-context@ntg.nl
> Cc: Hans Hagen <j.hagen@xs4all.nl>
> Betreff: Re: [NTG-context] blockligatures removing characters
> 
> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> >
> > By the way, this even happens without special fonts:
> >
> > \blockligatures[Th]
> >
> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=
> > yes]
> >
> > \setupbodyfont[myfont]
> >
> > \starttext
> >
> > \definedfont[Serif*default:blocklig]
> >
> >      The This These are missing the `h'
> >
> > \stoptext
> I'll fix it but it's not the way to do it in lmtx where we have
> 
> \startluacode
>      local demo = {
>          name    = "demo",
>          options = {
>              {
>                  patterns = {
>                      fio  = "f|io",
>                  },
>                  words = [[ fioot fiots ]],
>              },
>              {
>                  patterns = {
>                      fio  = "t|h",
>                  },
>                  words = [[ this that ]],
>              },
>          },
>      }
>      table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>      fiets fiots fiats fioot this that
> \stoptext
> 
> I just added (no upload) this
> 
> \startluacode
>      local demo = {
>          name    = "demo",
>          options = {
>              {
>                  substitutions = {
>                      th = "t|h",
>                      Th = "T|h",
>                      st = "s|t",
>                      St = "S|t",
>                      fi = "f|i",
>                  },
>              },
>          },
>      }
>      table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>      The This These fiets and thisthis thisfiets \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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-09 13:03   ` Hans Hagen via ntg-context
  2022-05-09 13:20     ` Denis Maier via ntg-context
@ 2022-05-13 13:29     ` Ben Moon via ntg-context
  2022-05-13 13:49       ` Ben Moon via ntg-context
  2022-05-13 13:53       ` Denis Maier via ntg-context
  1 sibling, 2 replies; 7+ messages in thread
From: Ben Moon via ntg-context @ 2022-05-13 13:29 UTC (permalink / raw)
  To: Context Mailing List; +Cc: Ben Moon


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

Thanks Hans,

I tried to modify your example for preventing the capital-Th ligature but this doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still appears as a ligature. This occurs with the original lowercase version too. Have I missed something?

```
\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 patterns = {
                     fio  = "f|io",
                 },
                 words = [[ fioot fiots ]],
             },
             {
                 patterns = {
                     fio  = "T|h",
                 },
                 words = [[ This That ]],
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     fiets fiots fiats fioot This That
\stoptext
```
Ben

On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> > 
> > By the way, this even happens without special fonts:
> > 
> > \blockligatures[Th]
> > 
> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
> > 
> > \setupbodyfont[myfont]
> > 
> > \starttext
> > 
> > \definedfont[Serif*default:blocklig]
> > 
> >      The This These are missing the `h'
> > 
> > \stoptext
> I'll fix it but it's not the way to do it in lmtx where we have
> 
> \startluacode
>      local demo = {
>          name    = "demo",
>          options = {
>              {
>                  patterns = {
>                      fio  = "f|io",
>                  },
>                  words = [[ fioot fiots ]],
>              },
>              {
>                  patterns = {
>                      fio  = "t|h",
>                  },
>                  words = [[ this that ]],
>              },
>          },
>      }
>      table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>      fiets fiots fiats fioot this that
> \stoptext
> 
> I just added (no upload) this
> 
> \startluacode
>      local demo = {
>          name    = "demo",
>          options = {
>              {
>                  substitutions = {
>                      th = "t|h",
>                      Th = "T|h",
>                      st = "s|t",
>                      St = "S|t",
>                      fi = "f|i",
>                  },
>              },
>          },
>      }
>      table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>      The This These fiets and thisthis thisfiets
> \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
> ___________________________________________________________________________________
> 

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-13 13:29     ` Ben Moon via ntg-context
@ 2022-05-13 13:49       ` Ben Moon via ntg-context
  2022-05-13 13:53       ` Denis Maier via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Ben Moon via ntg-context @ 2022-05-13 13:49 UTC (permalink / raw)
  To: Context Mailing List; +Cc: Ben Moon


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

I've just update and blockligatures=yes is working again; thanks very much Hans.
Ben


On Fri, 13 May 2022, at 14:29, Ben Moon via ntg-context wrote:
> Thanks Hans,
> 
> I tried to modify your example for preventing the capital-Th ligature but this doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still appears as a ligature. This occurs with the original lowercase version too. Have I missed something?
> 
> ```
> \startluacode
>      local demo = {
>          name    = "demo",
>          options = {
>              {
>                  patterns = {
>                      fio  = "f|io",
>                  },
>                  words = [[ fioot fiots ]],
>              },
>              {
>                  patterns = {
>                      fio  = "T|h",
>                  },
>                  words = [[ This That ]],
>              },
>          },
>      }
>      table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>      fiets fiots fiats fioot This That
> \stoptext
> ```
> Ben
> 
> On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
>> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
>> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
>> > 
>> > By the way, this even happens without special fonts:
>> > 
>> > \blockligatures[Th]
>> > 
>> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
>> > 
>> > \setupbodyfont[myfont]
>> > 
>> > \starttext
>> > 
>> > \definedfont[Serif*default:blocklig]
>> > 
>> >      The This These are missing the `h'
>> > 
>> > \stoptext
>> I'll fix it but it's not the way to do it in lmtx where we have
>> 
>> \startluacode
>>      local demo = {
>>          name    = "demo",
>>          options = {
>>              {
>>                  patterns = {
>>                      fio  = "f|io",
>>                  },
>>                  words = [[ fioot fiots ]],
>>              },
>>              {
>>                  patterns = {
>>                      fio  = "t|h",
>>                  },
>>                  words = [[ this that ]],
>>              },
>>          },
>>      }
>>      table.save("oeps-fixes.llg",demo)
>> \stopluacode
>> 
>> \setuplanguage[en][goodies={oeps-fixes.llg}]
>> 
>> \setupbodyfont[ebgaramond]
>> 
>> \starttext
>>      fiets fiots fiats fioot this that
>> \stoptext
>> 
>> I just added (no upload) this
>> 
>> \startluacode
>>      local demo = {
>>          name    = "demo",
>>          options = {
>>              {
>>                  substitutions = {
>>                      th = "t|h",
>>                      Th = "T|h",
>>                      st = "s|t",
>>                      St = "S|t",
>>                      fi = "f|i",
>>                  },
>>              },
>>          },
>>      }
>>      table.save("oeps-fixes.llg",demo)
>> \stopluacode
>> 
>> \setuplanguage[en][goodies={oeps-fixes.llg}]
>> 
>> \setupbodyfont[ebgaramond]
>> 
>> \starttext
>>      The This These fiets and thisthis thisfiets
>> \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
> ___________________________________________________________________________________
> 

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: blockligatures removing characters
  2022-05-13 13:29     ` Ben Moon via ntg-context
  2022-05-13 13:49       ` Ben Moon via ntg-context
@ 2022-05-13 13:53       ` Denis Maier via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Denis Maier via ntg-context @ 2022-05-13 13:53 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier


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

First of all, your pattern for Th is incorrect: fio  = "T|h", doesn't make much sense.

Anyway, even with this corrected I can confirm the behaviour.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 patterns = {
                     fio  = "f|io",
                 },
                 words = [[ fioot fiots ]],
             },
             {
                 patterns = {
                     Th  = "T|h",
                 },
                 words = [[ This That ]],
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\mainlanguage[en]

\setupbodyfont[libertine]

\starttext
     fiets fiots fiats fioot

                 This That Then

                 \noligature{Th}is
                \noligature{Th}at
                \noligature{Th}en
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Ben Moon via ntg-context
Gesendet: Freitag, 13. Mai 2022 15:30
An: Context Mailing List <ntg-context@ntg.nl>
Cc: Ben Moon <ben@themoons.uk>
Betreff: Re: [NTG-context] blockligatures removing characters

Thanks Hans,

I tried to modify your example for preventing the capital-Th ligature but this doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still appears as a ligature. This occurs with the original lowercase version too. Have I missed something?

```
\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 patterns = {
                     fio  = "f|io",
                 },
                 words = [[ fioot fiots ]],
             },
             {
                 patterns = {
                     fio  = "T|h",
                 },
                 words = [[ This That ]],
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     fiets fiots fiats fioot This That
\stoptext
```
Ben

On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
>
> By the way, this even happens without special fonts:
>
> \blockligatures[Th]
>
> \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
>
> \setupbodyfont[myfont]
>
> \starttext
>
> \definedfont[Serif*default:blocklig]
>
>      The This These are missing the `h'
>
> \stoptext
I'll fix it but it's not the way to do it in lmtx where we have

\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 patterns = {
                     fio  = "f|io",
                 },
                 words = [[ fioot fiots ]],
             },
             {
                 patterns = {
                     fio  = "t|h",
                 },
                 words = [[ this that ]],
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     fiets fiots fiats fioot this that
\stoptext

I just added (no upload) this

\startluacode
     local demo = {
         name    = "demo",
         options = {
             {
                 substitutions = {
                     th = "t|h",
                     Th = "T|h",
                     st = "s|t",
                     St = "S|t",
                     fi = "f|i",
                 },
             },
         },
     }
     table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
     The This These fiets and thisthis thisfiets
\stoptext



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



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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-13 13:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 15:49 blockligatures removing characters Ben Moon via ntg-context
2022-05-09  7:56 ` Denis Maier via ntg-context
2022-05-09 13:03   ` Hans Hagen via ntg-context
2022-05-09 13:20     ` Denis Maier via ntg-context
2022-05-13 13:29     ` Ben Moon via ntg-context
2022-05-13 13:49       ` Ben Moon via ntg-context
2022-05-13 13:53       ` Denis Maier via ntg-context

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