mnater / Hyphenopoly

Hyphenation for node and Polyfill for client-side hyphenation.
http://mnater.github.io/Hyphenopoly/
MIT License
696 stars 44 forks source link

hyphenopoly vs client hyphenation #174

Closed nicolastaffin closed 2 years ago

nicolastaffin commented 2 years ago

Hi, i wonder is there is a way to PREVENT the client default hyphenation and prioritize hyphenopoly. i'm very unhappy with french mac os monterey chrome hyphenation, and wonder if you implemented something to take over it.

something like, for instance:

.hyphenate { -hyphenopoly-hyphens: auto; / would trigger only hyphenopoly / }

VS

.hyphenate { hyphens: auto; / would trigger the system hyphenation / }

thanks

mnater commented 2 years ago

Hi

To always trigger hyphenopoly you can use the special keyword "FORCEHYPHENOPOLY" instead of a long word in the require field of your configs:

Hyphenopoly.config({
    require: {
        "fr": "FORCEHYPHENOPOLY"
    }
});

https://mnater.github.io/Hyphenopoly/Global-Hyphenopoly-Object.html#require-mandatory

Also make sure to disable CSS client hyphenation.

Is this what you are looking for?

Kind regards, Mathias

nicolastaffin commented 2 years ago

Thanks.