Skip to content

Keep manual hyphens after line breaks#2840

Closed
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/soft-hyphen-after-line-break
Closed

Keep manual hyphens after line breaks#2840
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/soft-hyphen-after-line-break

Conversation

@Sanjays2402

Copy link
Copy Markdown

At 11pt, Pango can return a fitting line ending in the invisible soft hyphen. The no-next-word fast path returned before manual hyphenation appended hyphenate-character; letting that case continue fixes the reported rendering.

The regression test reproduces the missing visible hyphen without the source change and passes with it. tests/test_text.py: 153 passed, 1 xfailed.

Fixes #2614.

When Pango split a fitting line at a soft hyphen, the no-next-word
fast path returned before WeasyPrint appended hyphenate-character.
Let soft-hyphen line endings reach manual hyphenation and cover the
reported 11pt layout with a regression test.

Fixes Kozea#2614
@liZe

liZe commented Jul 20, 2026

Copy link
Copy Markdown
Member

Hi.

At 11pt, Pango can return a fitting line ending in the invisible soft hyphen.

The problem is not the exact 11pt size, that was just a random value in the bug report to show the problem. The test doesn’t even set a font family, the fix is only there to make the test pass, I’m pretty sure you don’t really know what you’re doing.

Capture d’écran du 2026-07-20 11-35-52

LOL.

@liZe liZe closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Soft hyphenation doesn't render properly, but only at certain font sizes

2 participants