Summary: | request for auto hyphenation in epub (enable\disable auto hyphenation) | ||
---|---|---|---|
Product: | MuPDF | Reporter: | foobnix <ivan.ivanenko> |
Component: | epub | Assignee: | MuPDF bugs <mupdf-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | sample.png |
Here is example .js library for hyphenation https://github.com/mnater/Hyphenator with patters for all Languages here is java sample with the same patterns https://github.com/bluejamesbond/TextJustify-Android/blob/master/library/src/main/java/com/bluejamesbond/text/hyphen/DefaultHyphenator.java I think C lang should be very similar. MuPDF can make hyphenation only for the last word in the line, for better speed. It would be very good if you can make beautiful text formatting for all languages. The following commit adds automatic hyphenation support to the HTML/EPUB engine. For it to be used the document needs to set the language (lang="en" for example) and enable auto hyphenation via css (hyphens: auto). Test with this example document: <!doctype html> <html lang="en"> <body style="hyphens:auto"> <p style="width:10px"> Supercalifragilisticexpialidocious. commit 9fbcc07343d168d0943dc1cdd5eed7b2b98bea34 (HEAD -> hyphen, tor/hyphen, origin/master, origin/HEAD) Author: Tor Andersson <tor.andersson@artifex.com> Date: Mon Aug 18 23:52:25 2025 +0200 html: Add hyphenation support. Use hyphenation tables from TeX distribution.hy |
Created attachment 13512 [details] sample.png I would like to request to support word wraping for epub books. It's better to read books with good text formatting all lines with same length is better view It would be good to enable-disable this feature.