ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How do you deal with inappropriate ligatures?
@ 2020-10-12 14:55 Denis Maier
  2020-10-12 20:35 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Denis Maier @ 2020-10-12 14:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

with LuaLaTeX I used to use the selnolig package to disable 
inappropriate ligatures. With ConTeXt I have just inputted the list 
prepared by Hraban (based on a wordlist originating from selnolig), but 
then ran into a curious bug (?) with disappearing characters (see my 
posts from a couple of days ago). I'm now converting this list to the 
\blockligatures mechanism (instead of using \replaceword), which also 
has better kerning support due to Hans. When done, I'll of course share 
this on the Wiki if there's any need for this.

Now I'm wondering how others deal with inappropriate ligatures. Do you 
just ignore them? Do you block them on an ad-hoc basis, like whenever 
they occur? Do you use scripts to pre-process your files before 
typesetting? Do you just disable ligatures globally?

I tend to think there must be an automatic way to deal with the most 
awkward cases. The problem is that there just so many.

What do you think?

Best,
Denis
___________________________________________________________________________________
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] 5+ messages in thread

* Re: How do you deal with inappropriate ligatures?
  2020-10-12 14:55 How do you deal with inappropriate ligatures? Denis Maier
@ 2020-10-12 20:35 ` Hans Hagen
  2020-10-12 21:09   ` Denis Maier
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-10-12 20:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Denis Maier

On 10/12/2020 4:55 PM, Denis Maier wrote:
> Hi,
> 
> with LuaLaTeX I used to use the selnolig package to disable 
> inappropriate ligatures. With ConTeXt I have just inputted the list 
> prepared by Hraban (based on a wordlist originating from selnolig), but 
> then ran into a curious bug (?) with disappearing characters (see my 
> posts from a couple of days ago). I'm now converting this list to the 
> \blockligatures mechanism (instead of using \replaceword), which also 
> has better kerning support due to Hans. When done, I'll of course share 
> this on the Wiki if there's any need for this.
> 
> Now I'm wondering how others deal with inappropriate ligatures. Do you 
> just ignore them? Do you block them on an ad-hoc basis, like whenever 
> they occur? Do you use scripts to pre-process your files before 
> typesetting? Do you just disable ligatures globally?
> 
> I tend to think there must be an automatic way to deal with the most 
> awkward cases. The problem is that there just so many.
> 
> What do you think?
I played a bit with what we have and in a next upload you can do this:

\startexceptions[de]
au{f-}{f}{ff}(f\zwnj f)asse
\stopexceptions

\showglyphs

\starttext

auffasse

then is like:

au\discretionary{f-}{-f}{f\zwnj f}asse

\stoptext

Just an experiment. I don't know when there will be an update because 
first WS and I have to test and double check some new stuff as we don't 
want users to suffer too much from a couple of fundamental new features.

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
___________________________________________________________________________________

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

* Re: How do you deal with inappropriate ligatures?
  2020-10-12 20:35 ` Hans Hagen
@ 2020-10-12 21:09   ` Denis Maier
  2020-10-13 11:32     ` Hans Hagen
  2020-10-14 11:58     ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Denis Maier @ 2020-10-12 21:09 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

Am 12.10.2020 um 22:35 schrieb Hans Hagen:
> On 10/12/2020 4:55 PM, Denis Maier wrote:
>> Hi,
>>
>> with LuaLaTeX I used to use the selnolig package to disable 
>> inappropriate ligatures. With ConTeXt I have just inputted the list 
>> prepared by Hraban (based on a wordlist originating from selnolig), 
>> but then ran into a curious bug (?) with disappearing characters (see 
>> my posts from a couple of days ago). I'm now converting this list to 
>> the \blockligatures mechanism (instead of using \replaceword), which 
>> also has better kerning support due to Hans. When done, I'll of 
>> course share this on the Wiki if there's any need for this.
>>
>> Now I'm wondering how others deal with inappropriate ligatures. Do 
>> you just ignore them? Do you block them on an ad-hoc basis, like 
>> whenever they occur? Do you use scripts to pre-process your files 
>> before typesetting? Do you just disable ligatures globally?
>>
>> I tend to think there must be an automatic way to deal with the most 
>> awkward cases. The problem is that there just so many.
>>
>> What do you think?
> I played a bit with what we have and in a next upload you can do this:
>
> \startexceptions[de]
> au{f-}{f}{ff}(f\zwnj f)asse
> \stopexceptions
>
> \showglyphs
>
> \starttext
>
> auffasse
>
> then is like:
>
> au\discretionary{f-}{-f}{f\zwnj f}asse
>
> \stoptext
Oh, that looks interesting. So that would essentially be implemented 
like hyphenation exceptions? Any drawbacks? Performance hit with large 
exception lists? Kerning?

>
> Just an experiment. I don't know when there will be an update because 
> first WS and I have to test and double check some new stuff as we 
> don't want users to suffer too much from a couple of fundamental new 
> features.
Is there a patch so the brave can help with testing?

Best,
Denis
___________________________________________________________________________________
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] 5+ messages in thread

* Re: How do you deal with inappropriate ligatures?
  2020-10-12 21:09   ` Denis Maier
@ 2020-10-13 11:32     ` Hans Hagen
  2020-10-14 11:58     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2020-10-13 11:32 UTC (permalink / raw)
  To: Denis Maier, mailing list for ConTeXt users

On 10/12/2020 11:09 PM, Denis Maier wrote:
> Am 12.10.2020 um 22:35 schrieb Hans Hagen:
>> On 10/12/2020 4:55 PM, Denis Maier wrote:
>>> Hi,
>>>
>>> with LuaLaTeX I used to use the selnolig package to disable 
>>> inappropriate ligatures. With ConTeXt I have just inputted the list 
>>> prepared by Hraban (based on a wordlist originating from selnolig), 
>>> but then ran into a curious bug (?) with disappearing characters (see 
>>> my posts from a couple of days ago). I'm now converting this list to 
>>> the \blockligatures mechanism (instead of using \replaceword), which 
>>> also has better kerning support due to Hans. When done, I'll of 
>>> course share this on the Wiki if there's any need for this.
>>>
>>> Now I'm wondering how others deal with inappropriate ligatures. Do 
>>> you just ignore them? Do you block them on an ad-hoc basis, like 
>>> whenever they occur? Do you use scripts to pre-process your files 
>>> before typesetting? Do you just disable ligatures globally?
>>>
>>> I tend to think there must be an automatic way to deal with the most 
>>> awkward cases. The problem is that there just so many.
>>>
>>> What do you think?
>> I played a bit with what we have and in a next upload you can do this:
>>
>> \startexceptions[de]
>> au{f-}{f}{ff}(f\zwnj f)asse
>> \stopexceptions
>>
>> \showglyphs
>>
>> \starttext
>>
>> auffasse
>>
>> then is like:
>>
>> au\discretionary{f-}{-f}{f\zwnj f}asse
>>
>> \stoptext
> Oh, that looks interesting. So that would essentially be implemented 
> like hyphenation exceptions? Any drawbacks? Performance hit with large 
> exception lists? Kerning?

probably kerning between the (here) ff but you probably don't want that 
anyway there

performance wise parsing these specs is always delayed till there is a 
word match (and actually every word that fits lrmin criteria is checked 
in the exception wordlist so as soon as one has one or more exceptions 
there is always a bit overhead, but it's nothing compared to the impact 
of some bad styling options)  .. this is not where tex spends most of 
its time (and context spends more than half its time in lua so that is 
the slow down part, not that I hear users complain)

(if needed we can always have some more advanced mechanism, like wiping 
those joiners before kerning happens .. in principle all is doable which 
doesn't mean all has to be done)

>> Just an experiment. I don't know when there will be an update because 
>> first WS and I have to test and double check some new stuff as we 
>> don't want users to suffer too much from a couple of fundamental new 
>> features.
> Is there a patch so the brave can help with testing?
no patch, just wait for an update (luametatex + context lmtx)

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
___________________________________________________________________________________

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

* Re: How do you deal with inappropriate ligatures?
  2020-10-12 21:09   ` Denis Maier
  2020-10-13 11:32     ` Hans Hagen
@ 2020-10-14 11:58     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2020-10-14 11:58 UTC (permalink / raw)
  To: Denis Maier, mailing list for ConTeXt users

On 10/12/2020 11:09 PM, Denis Maier wrote:
> Am 12.10.2020 um 22:35 schrieb Hans Hagen:
>> On 10/12/2020 4:55 PM, Denis Maier wrote:
>>> Hi,
>>>
>>> with LuaLaTeX I used to use the selnolig package to disable 
>>> inappropriate ligatures. With ConTeXt I have just inputted the list 
>>> prepared by Hraban (based on a wordlist originating from selnolig), 
>>> but then ran into a curious bug (?) with disappearing characters (see 
>>> my posts from a couple of days ago). I'm now converting this list to 
>>> the \blockligatures mechanism (instead of using \replaceword), which 
>>> also has better kerning support due to Hans. When done, I'll of 
>>> course share this on the Wiki if there's any need for this.
>>>
>>> Now I'm wondering how others deal with inappropriate ligatures. Do 
>>> you just ignore them? Do there just so many.
>>>
>>> What do you think?
>> I played a bit with what we have and in a next upload you can do this:
>>
>> \startexceptions[de]
>> au{f-}{f}{ff}(f\zwnj f)asseyou block them on an ad-hoc basis, like 

>>> whenever they occur? Do you use scripts to pre-process your files 

>>> before typesetting? Do you just disable ligatures globally?

>>>

>>> I tend to think there must be an automatic way to deal with the most 

>>> awkward cases. The problem is that 
>> \stopexceptions
>>
>> \showglyphs
>>
>> \starttext
>>
>> auffasse
>>
>> then is like:
>>
>> au\discretionary{f-}{-f}{f\zwnj f}asse
>>
>> \stoptext
> Oh, that looks interesting. So that would essentially be implemented 
> like hyphenation exceptions? Any drawbacks? Performance hit with large 
> exception lists? Kerning?
in a next release a

\zwj   block ligature, permit kern
\zwnj  block ligature, also inhibit kern

for now, lmtx only

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
___________________________________________________________________________________

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

end of thread, other threads:[~2020-10-14 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 14:55 How do you deal with inappropriate ligatures? Denis Maier
2020-10-12 20:35 ` Hans Hagen
2020-10-12 21:09   ` Denis Maier
2020-10-13 11:32     ` Hans Hagen
2020-10-14 11:58     ` Hans Hagen

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