Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyphenation doesn't work on local installation #551

Open
anghenfil opened this issue Jan 10, 2025 · 7 comments
Open

Hyphenation doesn't work on local installation #551

anghenfil opened this issue Jan 10, 2025 · 7 comments

Comments

@anghenfil
Copy link

anghenfil commented Jan 10, 2025

Hey,

I can't get working hyphenation of a german html page with vivliostyle-cli. Weirdly, it does work on the Demo Viewer: https://vivliostyle.org/viewer/#src=https://gist.github.com/anghenfil/4a7635e45c900e636561d93756ac0b66 but not on my local (archlinux) system (neither with the viewer nor the pdf from vivliostyle build).

I already tried to use --executable-browser with the path to my local chromium installation (where it does work when I view the HTML with chromium directly), but once I use vivliostyle (either viewer or via build) the hyphenation stops working.

For the demo HTML see https://gist.github.com/anghenfil/4a7635e45c900e636561d93756ac0b66.

I also tried a fresh ubuntu docker container, but hyphenation didn't work either.

Any ideas?
Best anghenfil

@anghenfil anghenfil changed the title Hyphenation doesn' Hyphenation doesn't work on local installation Jan 10, 2025
@anghenfil
Copy link
Author

Maybe related to microsoft/playwright#34067?

@MurakamiShinyu
Copy link
Member

@anghenfil
Copy link
Author

anghenfil commented Jan 10, 2025 via email

@anghenfil
Copy link
Author

This is a known issue:

* [Hyphenation on Google Chrome on non-macOS platforms vivliostyle.js#569](https://github.com/vivliostyle/vivliostyle.js/issues/569)

Chromium got a new headless mode, it should be fixed:

https://issues.chromium.org/issues/40257759

"New headless mode behaves exactly like the headful Chrome, so hyphenation options are supposed to be the same. Since hypenation options are language dependant, please make sure that relevant languages are enabled in the profile. Note that new headless Chrome starts in incognoto mode, so you'll have to select one with --user-data-dir."

Maybe the issue is the missing chromium profile?

@MurakamiShinyu
Copy link
Member

Maybe related to microsoft/playwright#34067?

According to this issue's comments, Playwright v1.49 has hyphen-data for the headless_shell (equivalent to the old headless mode) and hyphenation works in the headless_shell but does not work in normal chrome.

Vivliostyle CLI uses the same Chromium (normal chrome) for both preview (headed mode) and build (headless mode) commands (See: #545 and #547). So hyphenation does not work on both commands (except on macOS where Chromium uses macOS's hyphenation).

@anghenfil
Copy link
Author

anghenfil commented Jan 11, 2025 via email

@MurakamiShinyu
Copy link
Member

Switching Playwright to Puppeteer might be a solution of this problem.

Puppeteer uses Chrome for Testing which includes hyphen-data. I've tested Puppeteer on Windows and confirmed that hyphenation is working.

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

No branches or pull requests

2 participants