On 10/14/2020 2:09 PM, Denis Maier wrote:
Hi,
has \zwnj (or the equivalent unicode character) bad consequences for hyphenation? Like, when you'd preprocess your files and add \zwnj in appropriate places, will that break hyphenation for these words?
So, this:

\mainlanguage[nl]

\startexceptions[nl]
wis-kun-d{e-}{o}{eo}(e-o)n-der-wijs
\stopexceptions

wiskundeonderwijs

\hsize 1mm

wiskundeonderwijs

results in

wiskunde-onderwijs

wis-
kun-
de-
on-
der-
wijs

with proper kerning and ligatures when applicable and

\startexceptions[nl]
wis-kun-d{e-}{o}{eo}(e\zwj o)n-der-wijs
\stopexceptions

will do the same but no compound dash. It's actually mostly a matter of communicating with the font handler (without hard coding solutions in the engine).

As a side effect (teaser) you can do this in the upcoming lmtx:

\definefontfeature[whatever][default][mode=base]
\definefont[myfont][Serif*whatever]

{\myfont               test effe every}\quad
{                      test effe every}\par
{\myfont \nokerning    test effe every}\quad
{        \nokerning    test effe every}\par
{\myfont \noligaturing test effe every}\quad
{        \noligaturing test effe every}\par
{\myfont               test effe e{\nokerning v}ery}\quad
{                      test effe e{\nokerning v}ery}\par

with \nokerning and \noligaturing being macros that set some options (the old \noligs and \nokerns have therefore been dropped) ... so one has local control over matters (base mode and node mode).

one can even control left/right kerning/ligaturing this way but that's something to be explained in some article or at some user meeting or so (after all i occasionally need something new to tell)

so, in the end all you have to do is come up with a list of exceptions

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
___________________________________________________________________________________

Reply via email to