From ce658db2f39f8472c3525a18ed1cfead23781fbb Mon Sep 17 00:00:00 2001 From: bluebear94 Date: Tue, 3 Oct 2023 09:02:27 -0400 Subject: ShapedText::push_hyphen: Use self.base for default hyphen range (#2299) In the unlikely chance that we hyphenate after an empty line, we set the glyph range to self.base..self.base so that subtracting Fixes #2283. --- tests/ref/text/shaping.png | Bin 3902 -> 3992 bytes tests/typ/text/shaping.typ | 6 ++++++ 2 files changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/ref/text/shaping.png b/tests/ref/text/shaping.png index a77dda3a..a3ee750e 100644 Binary files a/tests/ref/text/shaping.png and b/tests/ref/text/shaping.png differ diff --git a/tests/typ/text/shaping.typ b/tests/typ/text/shaping.typ index 3a8d5411..c794a105 100644 --- a/tests/typ/text/shaping.typ +++ b/tests/typ/text/shaping.typ @@ -26,3 +26,9 @@ ABCअपार्टमेंट // doesn't exist in shaping output. #set text(dir: rtl, font: "Noto Serif Hebrew") \ ט + +--- +// Test that #2283 is fixed. +#set text(font: "test", lang: "de", hyphenate: true, fallback: false) +#set par(linebreaks: "simple") +- ensure -- cgit v1.2.3