mnater/Hyphenopoly

Differences between browser hyphenation and Hyphenopoly

jotaf98 opened this issue · 2 comments

Testing the example linked in the readme in a local HTML file, with the paths set to a CDN as suggested in #84, and forcing the use of Hyphenopoly:

            require: {
                "la": "FORCEHYPHENOPOLY", //"honorificabilitudinitas",
                "de": "FORCEHYPHENOPOLY", //"Silbentrennungsalgorithmus",
                "en-us": "FORCEHYPHENOPOLY" //"Supercalifragilisticexpialidocious"
            },

Comparing the two on Firefox 75 (force use of Hyphenopoly and use the browser's hyphenation) seems to give exactly the same result (visually). Same result even when resizing the window and refreshing (to see hyphenation at different text widths).

Is this expected? Are the two using the exact same hyphenation algorithm? I thought that Hyphenopoly's algorithm was derived from TeX, and not the same as the browsers' (Firefox, Chrome).

AFAIK Firefox uses hunspell for hyphenation and hunspell uses the TeX-algorithm.
Chrome relies on the hyphenation engine provided by the OS (that's why Chrome supports hyphenation on Mac, but not on Windows).

Thanks for the answer, I guess that explains why they yield the same results (which is a good thing!).