RESOLVED FIXED 60855
hyphens:auto uses only rules for system language
https://bugs.webkit.org/show_bug.cgi?id=60855
Summary hyphens:auto uses only rules for system language
Mathias Nater
Reported 2011-05-15 08:55:42 PDT
Created attachment 93582 [details] Simple test case; resize window to see different hyphenation points If I'm using the CSS3-propery hyphens:auto; I get rather confusing results: On Safari on iOS all texts are hyphenated using the rules for the system language; regardless of the language of the hyphenated text. On Webkit (Nightly 6533.21.1, r86499) hyphenation is only performed when the system language of OS X is set to 'English'. I'd expect a) Safari on iOS not to hyphenate text in an other language (i.e. when there's a lang-attribute with an other language). b) Either Webkit on Mac OS X having other hyphenation patterns than just English or support for 'hyphenate-resource' to be able to load patterns.
Attachments
Simple test case; resize window to see different hyphenation points (909 bytes, text/html)
2011-05-15 08:55 PDT, Mathias Nater
no flags
Mathias Nater
Comment 1 2011-05-15 08:57:55 PDT
Comment on attachment 93582 [details] Simple test case; resize window to see different hyphenation points ><!DOCTYPE HTML> ><html lang="en"> > <head> > <title>Test1</title> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"> > <style type="text/css"> > body { > width:50%; > margin-left: 25%; > margin-right: 25%; > } > .hyphenate { > -webkit-hyphens:auto; > } > </style> > </script> > </head> > <body> > <h2>Paragraph with lang="de" is hyphenated with english patterns</h2> > <p class="hyphenate" lang="en"> > A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. > </p> > <p class="hyphenate" lang="de"> > Eine wunderbare Heiterkeit hat meine ganze Seele eingenommen, gleich den süÃen Frühlingsmorgen, die ich mit ganzem Herzen genieÃe. > </p> > </body> ></html>
Mathias Nater
Comment 2 2011-05-15 08:58:15 PDT
Comment on attachment 93582 [details] Simple test case; resize window to see different hyphenation points ><!DOCTYPE HTML> ><html lang="en"> > <head> > <title>Test1</title> > <meta http-equiv="content-type" content="text/html; charset=UTF-8"> > <style type="text/css"> > body { > width:50%; > margin-left: 25%; > margin-right: 25%; > } > .hyphenate { > -webkit-hyphens:auto; > } > </style> > </script> > </head> > <body> > <h2>Paragraph with lang="de" is hyphenated with english patterns</h2> > <p class="hyphenate" lang="en"> > A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. > </p> > <p class="hyphenate" lang="de"> > Eine wunderbare Heiterkeit hat meine ganze Seele eingenommen, gleich den süÃen Frühlingsmorgen, die ich mit ganzem Herzen genieÃe. > </p> > </body> ></html>
mitz
Comment 3 2011-05-15 21:17:05 PDT
You are right that TOT WebKit does not consider the 'lang' attribute when applying hyphenation, and does not support external hyphenation resources. In WebKit nightly builds, you can specify the '-webkit-locale' CSS property to control hyphenation.
mitz
Comment 4 2011-07-20 13:22:29 PDT
In OS X Lion, auto-hyphenation is supported for English (US and GB), German, French, Italian, Dutch and Russian.
Mathias Nater
Comment 5 2011-08-04 13:50:54 PDT
Nice, thanks!
Note You need to log in before you can comment on or make changes to this bug.