em-dash ligature is converted to en-dash in the generic fontloader
On 2/23/2019 1:50 PM, Ulrike Fischer wrote:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18):
\font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test
dashes-these % gives dash
dashes--these % gives en-dash
dashes---these % gives en-dash WRONG
dashes --- these % gives em-dash
em-dashes---these % gives em-dash
\bye
context is not affected, there the code works fine.
This issue can be fixed in the fontloader with the attached patch. Best regards, Marcel Krüger
On 2/23/2019 1:50 PM, Ulrike Fischer wrote:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18):
\font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test
dashes-these % gives dash
dashes--these % gives en-dash
dashes---these % gives en-dash WRONG
dashes --- these % gives em-dash
em-dashes---these % gives em-dash
\bye
context is not affected, there the code works fine.
This issue can be fixed in the fontloader with the attached patch. Hm, I don't see those lines here and it looks ok in context so ... no
On 2/28/2019 12:38 PM, Marcel Krüger wrote: patches applied (and definitely not in the tex live code freeze window) 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 -----------------------------------------------------------------
---- On Fri, 01 Mar 2019 11:17:56 +0100 Hans Hagen
On 2/28/2019 12:38 PM, Marcel Krüger wrote:
On 2/23/2019 1:50 PM, Ulrike Fischer wrote:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18):
\font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test
dashes-these % gives dash
dashes--these % gives en-dash
dashes---these % gives en-dash WRONG
dashes --- these % gives em-dash
em-dashes---these % gives em-dash
\bye
context is not affected, there the code works fine.
This issue can be fixed in the fontloader with the attached patch. Hm, I don't see those lines here and it looks ok in context so ... no
For reproduction in context, the code \starttext ff\discretionary{l}{}{l} \stoptext currently produces a single `fl` ligature instead of `ffl`. Interesting that you didn't see those lines, maybe we have different versions? The patched line is line 844 in the file `font-ots.lua` of ConTeXt beta, updated today. Best regards Marcel
patches applied (and definitely not in the tex live code freeze window)
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 -----------------------------------------------------------------
On 3/1/2019 12:29 PM, Marcel Krüger wrote:
---- On Fri, 01 Mar 2019 11:17:56 +0100 Hans Hagen
wrote ---- On 2/28/2019 12:38 PM, Marcel Krüger wrote:
On 2/23/2019 1:50 PM, Ulrike Fischer wrote:
As reported on the dev-luatex list --- is converted to an en-dash (instead of em-dash) if there are no spaces around the ---.
We could now reproduce the problem also with the generic fontloader: it appears only with mode=node. I'm using the files from 2019-02-14, but the problem appeared first in the files from 2018-11-18):
\font\test={file:texgyreheros-regular.otf:+tlig;mode=node;}\test
dashes-these % gives dash
dashes--these % gives en-dash
dashes---these % gives en-dash WRONG
dashes --- these % gives em-dash
em-dashes---these % gives em-dash
\bye
context is not affected, there the code works fine.
This issue can be fixed in the fontloader with the attached patch. Hm, I don't see those lines here and it looks ok in context so ... no
For reproduction in context, the code
\starttext ff\discretionary{l}{}{l} \stoptext
currently produces a single `fl` ligature instead of `ffl`.
Interesting that you didn't see those lines, maybe we have different versions? The patched line is line 844 in the file `font-ots.lua` of ConTeXt beta, updated today. your patch referred to other numbers
i'll look into it (also why it is as it is) thanks for the example 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 -----------------------------------------------------------------
Am Fri, 1 Mar 2019 11:17:56 +0100 schrieb Hans Hagen:
it looks ok in context
You need to set automatichyphenmode=0 to see the problem in context: the handling of the --- ligature is clearly broken in some cases: \starttext \automatichyphenmode=0 A---B A --- B \stoptext
Hm, I don't see those lines here
I see local tail = getprev(stop) in line 844 of font-ots.lua in a just updated context minimals. If I change this to local tail = stop as suggested by Marcel and rebuild the formats, the ligature behaves again.
(and definitely not in the tex live code freeze window)
TeXLive is frozen and pretest has begun, so I don't see a danger to apply patches now. -- Ulrike Fischer http://www.troubleshooting-tex.de/
On 3/1/2019 1:15 PM, Ulrike Fischer wrote:
TeXLive is frozen and pretest has begun, so I don't see a danger to apply patches now. binaries get frozen at 22/3 and context isn't checked in yet (comes after first binary generation)
anyway, i'll look at it (maybe this weekend) 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Marcel Krüger
-
Ulrike Fischer