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

Future of this project #163

Open
mnater opened this issue Jan 6, 2021 · 15 comments
Open

Future of this project #163

mnater opened this issue Jan 6, 2021 · 15 comments
Assignees

Comments

@mnater
Copy link
Owner

mnater commented Jan 6, 2021

It looks like Chrome for Windows/Linux will support CSS-hyphens:auto starting with version M88. Edge will follow.
That means the use case of Hyphenopoly as a polyfill for hyphenation will fade away pretty soon.

Of course, the question now is how to proceed with Hyphenopoly.

First ideas:

  • Put more emphasis on the development of the node module.
  • Also put more emphasis on the wasm-cores (for direct use of the wasm-modules in other projects).
  • ...
@mnater
Copy link
Owner Author

mnater commented Jan 24, 2021

Update (2021-01-24)

Chrome m88 now supports hyphenation for a wide range of languages

MS Edge v88 doesn't.

@mnater
Copy link
Owner Author

mnater commented Apr 29, 2021

Although claimed otherwise by caniuse (is updated), Edge 90 still does not support hyphens:auto.

@mnater mnater self-assigned this Apr 29, 2021
@mnater
Copy link
Owner Author

mnater commented Jun 6, 2021

Still no sign of hyphens:auto support in Edge 91 on Windows...

@mnater
Copy link
Owner Author

mnater commented Nov 17, 2021

Still not in Edge 95...🤷‍♂️

@mnater
Copy link
Owner Author

mnater commented Nov 28, 2021

and not in Edge 96
It's finally available in Edge 96 (just testet on Browser, caniuse seems aoutdated)

@borriglione
Copy link

@mnater

We still face the problem that hyphenation does not work on Chromium/Puppeteer in headless mode [1]. That's why we are using this package now and are very thankful that it's existing :)

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1261480

@mnater
Copy link
Owner Author

mnater commented Jan 20, 2022

Good to know.
And thanks for the cheer!

@sagarkt
Copy link

sagarkt commented Apr 15, 2022

@borriglione glad to know that you are able to use it with Puppeteer. I am too trying to generate pdfs with Puppeteer in headless mode. I am running it on AWS Lambda. I am unable to configure it properly. Can you give a shot config how you achieved it? That will be a lot of helpful. Thanks in advance!

@borriglione
Copy link

@sagarkt

It's very off-topic but:

    const browser = await puppeteer.launch({
      args: ['--font-render-hinting=none', '--disable-gpu'],
      headless: true,
    })
    const page = await browser.newPage()
    const res = await page.goto(ctx.query.url, { waitUntil: 'networkidle0' })
    ctx.status = res.status()
    await page.evaluateHandle('document.fonts.ready')
    await page.focus('body')
    ctx.body = await page.pdf({
        printBackground: true,
        deviceScaleFactor: config.pdfDeviceScaleFactor,
        landscape: false,
        width: ctx.query.width,
        height: ctx.query.height,
        timeout: 1000 * 60 * 2,
    })

@ReLater
Copy link
Contributor

ReLater commented Sep 10, 2022

As far as I see Opera 90.0.4480.84 (current) on Windows 10 doesn't suppot hyphens yet. It's always loading de.wasm file in my test scenario while it doesn't use hyphens rules in CSS when I deactivate my Hyphenopoly plugin.

@Arkkimaagi
Copy link

Until this chart is all green, (and probably beyond that for special things like headless) I see a great need for this project.

This project is a saviour for Finnish layout woes. Truly appreciated. Thanks!

@achmizs
Copy link

achmizs commented Sep 25, 2023

The hyphenation that Hyphenopoly does is also better than browser-native hyphenation. I am not aware of any reason to expect existing browser hyphenation to improve anytime soon (the proverbial checkbox having been checked off), so the use case for Hyphenopoly remains, for designers who take typography seriously. Here are a couple of examples from gwern.net, comparing Hyphenopoly to native hyphenation in Chromium on a Mac:

Native: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.18.01%20PM.png
Hyphenopoly: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.18.39%20PM.png

Native: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.19.31%20PM.png
Hyphenopoly: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.19.58%20PM.png

Native: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.22.21%20PM.png
Hyphenopoly: https://share.obormot.net/screenshots/Arcturus_Screen%20Shot%202023-09-25%20at%202.22.49%20PM.png

(Safari is marginally better, but still not as good as Hyphenopoly. Firefox is worse.)

@achmizs
Copy link

achmizs commented Sep 25, 2023

Note that the alternative to Hyphenopoly, for those wanting high-quality hyphenation, is not native browser hyphenation but rather server-side hyphenation, which would leave the rendered page in the same final state as Hyphenopoly does—with soft-hyphen characters inserted at appropriate places in hyphenation-eligible words—but would not have any client-side performance consequences. However, such solutions are more complex to set up and maintain than a client-side approach like Hyphenopoly, and are rarely available in the first place; I know of almost no websites that do this, and the few such setups that I’ve seen, have been bespoke, and fragile as a consequence.

@jreed-cartago
Copy link

Hi, if I may I'd like to add my comment to this discussion.

My company, Cartago Software GmbH, builds a web based editor that allows our customers to generate templates for their documents and then during the production process these documents are processed using FOP to generate PDF or HTML or whatever they need. That said we have, in the past, relied on the original project from @mnater Hyphenator to provide the WYSIWYG when it comes to hyphenation. Then when the big reports that browsers would provide native hyphenation support we disabled our editor's use of Hyphenator. That was apparently a bad idea. The hyphenation algorithms inside the various browsers are not supporting the same hyphenation standards as we see in FOP and some of our customers have noticed this.

While investigating our previous use of the Hyphenator project I noticed that it was no longer supported and that the new project is this one Hyphenopoly, and I'm working out how to use it instead of the Hyphenator since I believe (at least I hope) that it will bring our editor functionality inline with the FOP output.

So don't think that there aren't use cases for high quality hyphenation in the browser. So I hope that you don't archive this project too soon.

@mnater
Copy link
Owner Author

mnater commented Dec 8, 2023

No, I plan to maintain the project for a long time to come. The move from Hyphenator to Hyphenopoly was a decision that I would make differently today. But I'm constantly learning.

This issue is also primarily about where the focus lies. In fact, in recent years I have seen a shift in applications away from polyfill and towards use as a node module.

As I maintain the project in my spare time, it’s important to be able to use the little time I have in a targeted way.

I am happy about every project that uses Hyphenopoly. Please contact me at any time with problems or suggestions for improvement.

Best regards,
Mathias

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

7 participants