summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lang
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-05-06 23:06:01 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-05-06 23:06:01 +0000
commit50600434a598247b0b75a13b8f49a4e5c208e681 (patch)
tree1a20d883e77ca5da6f9407f9840a0ed8952dc074 /Build/source/texk/web2c/luatexdir/lang
parent699f7c9ba195ae2043727beae51554047e9f27b3 (diff)
luatexdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@37241 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lang')
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/texlang.w18
1 files changed, 14 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lang/texlang.w b/Build/source/texk/web2c/luatexdir/lang/texlang.w
index 723d29839de..2053220d2c4 100644
--- a/Build/source/texk/web2c/luatexdir/lang/texlang.w
+++ b/Build/source/texk/web2c/luatexdir/lang/texlang.w
@@ -727,10 +727,20 @@ static halfword find_next_wordstart(halfword r)
if (is_simple_character(r)) {
chr = character(r) ;
if (chr == ex_hyphen_char) {
- /* maybe add a test if prev and next are glyphs */
- t = compound_word_break(r, char_lang(r));
- subtype(t) = automatic_disc;
- start_ok = 1 ;
+ /* We only accept an explicit hyphen when there is a preceding glyph and */
+ /* we skip a sequence of explicit hyphens as that normally indicates a */
+ /* -- or --- ligature in which case we can in a worse case usage get bad */
+ /* node lists later on due to messed up ligature building as these dashes */
+ /* ligatures in base fonts. This is a side effect of the separating the */
+ /* hyphenation, ligaturing and kerning steps. A test is cmr with ------. */
+ t = vlink(r) ;
+ if ((start_ok > 0) && (t!=null) && (type(t) == glyph_node) && (character(t) != ex_hyphen_char)) {
+ t = compound_word_break(r, char_lang(r));
+ subtype(t) = automatic_disc;
+ start_ok = 1 ;
+ } else {
+ start_ok = 0;
+ }
} else if (start_ok && (l = get_lc_code(chr)) > 0) {
if (char_uchyph(r) || l == chr) {
return r;