Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 47083 CSS3: Implement Hyphenation
Starred by 167 users Project Member Reported by dglazkov@chromium.org, Jun 21 2010 Back to list

Comments by non-members will not trigger notification emails to users who starred this issue.
Status: Duplicate
Merged: issue 605840
Owner: kojii@chromium.org
Closed: Apr 26
Cc: jochen@chromium.org, szager@chromium.org, bsittler@chromium.org, le...@chromium.org, mikelawther@chromium.org, estade@chromium.org, dglazkov@chromium.org, e...@chromium.org
Components:
OS: All
Pri: 2
Type: Feature

Blocked on: View detail
issue 63283
issue 60895
issue 63284

Restricted
  • Only users with EditIssue permission may comment.


Sign in to add a comment
The following layout test is failing on all platforms

  fast/text/hyphenate-character.html = IMAGE+TEXT
  fast/text/hyphens.html = IMAGE+TEXT

Probable cause:

CSS3 Hyphenation implemented in Mac/Safari port:

http://trac.webkit.org/changeset/61548

We don't support it yet. Giving to the CSS3 folks for triage.

 
Comment 1 by yuzo@chromium.org, Jun 24 2010
Status: Assigned
Hm, thinking about this, why is hyphenation even platform dependent? Just to avoid duplicating some bits from the OS, or perhaps to do different (less precise) hyphenation on mobile platforms?

IOW, wouldn't a generic, cross-platform library be better for this rather than having different hyphenation results on the various platforms?
Also marked hyphenate-locale.html as failing since it depends on this functionality as well.
Comment 4 by hbono@chromium.org, Aug 12 2010
This is just for your information.
It may be a good idea to integrate hyphen (*1), a hyphenation library used by OpenOffice, to WebKit/Chrome? (As far as I tested, it is pretty easy to use it on Windows.)

(*1) http://sourceforge.net/projects/hunspell/files/Hyphen/

Regards,
Comment 5 by js...@chromium.org, Oct 23 2010
Labels: I18N
The hyphenation library used by OpenOffice is a port of the TeX hyphenation algorithm (the port happens to have been written by a Google engineer in his pre-Google days) and I think it'd work well. 

BTW, what do we want to do with language-dependent hyphenation dictionaries? There are two issues:  

1. Language detection. We do have a language detector (CLD). So, we can use that to determine which hyphenation dictionary to use for a given document. An alternative is to rely on 'lang/xml:lang' and 'Content-Language'(the latter can have multiple values), but neither of them is widely used and when specified, the value is not so reliable. 

2. Perhaps, we can start with English only, but either we need to have a mechanism by which we send down a language-dependent hyphenation dictionary on demand or decide which hyphenation dictionaries to include in our build (out of the box). 

Comment 6 by tony@chromium.org, Oct 25 2010
@rolandsteiner: In Safari's implementation, the hyphenation data files are provided by the OS.  The code to use it is specific to platform MAC, which suggests that the data files won't be included in Safari win.  I suspect the data files are big.

Using the hunspell hyphen library sounds good for chromium.  We could lazy download the data files like we do with the spellchecking dictionaries.

Starting with English only sounds fine to start.  It looks like the safari mac implementation is English only right now:
http://trac.webkit.org/browser/trunk/WebCore/platform/text/mac/HyphenationMac.mm?rev=61548#L39

The question is, what is better - : to re-use their implementation on Mac (using the OS APIs there) and have a separate implementation on the other platforms, or use the same common code & dictionaries for all platforms?
Comment 8 by tony@chromium.org, Oct 26 2010
Use the same common code & dictionaries for all platforms.
Blockedon: 60895
Issue 60895 added for inclusion of 'hyphen' library.
Comment 10 by js...@chromium.org, Oct 27 2010
JFYI, Android implemented canHyphenate and lastHyphenLocation (English only for now) with the hyphenation library used by OO (being added in bug 60895). See WebKit/WebCore/platform/text/android/HyphenationAndroid.cpp 

For Chromium, I guess we need additional plumbing to load a dictionary (calling out to the browser process from a render process).

Just for the reference: CSS3 text hyphenation spec: http://www.w3.org/TR/css3-gcpm/#hyphenation

Comment 11 by js...@chromium.org, Oct 27 2010
Regarding Mac using the OS facility, add a few Mac folks. 
(Not that I want to make things more complicated but that I just want to know for sure):

IIRC, Mac Chrome does not use Hunspell but use the OS spellchecking API. I wonder what Mac folks would say about the hyphenation. I like the platform parity and the simplicity of our implementation doing the same across platforms, but .... 
Comment 12 by tony@chromium.org, Oct 27 2010
jshin is right, we should ask mac folks.  I had forgotten that we don't use hunspell on OSX.
Another question is: what is a good loading strategy for the hyphenation dictionaries. At the moment we only have en-US, but this is likely going to change.

I guess we should load the library for the local language at startup (in a separate thread?) and load other languages on demand (?). The individual libraries are not huge (111KB for en-US in plain text), but it'll add up, so we probably shouldn't load all of them at startup.

OTOH, unlike spellchecking, hyphenation AFAICT needs to either block rendering until the hyphenation library is loaded, or cause a relayout if the library finished loading and the page wasn't rendered with hyphenation. The latter is probably better from a "speed" persepctive, but may be jerky/jumpy, esp. if the user scrolled in the mean time.
Option 3: hyphenate only if the library is loaded, but don't bother if it hasn't finished doing so yet. The downside here is that you'd have slightly different "versions" of the page depending when you look at it.

Adding to the above: what should the format for the hyphenation libraries be? plain text that can be user-edited, or some pre-compiled form (not editable, but probably smaller)?
Comment 15 by tony@chromium.org, Nov 2 2010
I discussed a bit with some office mates.  The consensus seems to be to lazy load and stall layout while we load.  Once loaded, keep it around in memory so the next time hyphenation data is needed, we don't have to stall load.

This seems similar to what webkit does for css files: http://webkit.org/blog/66/the-fouc-problem/

We might want to limit the number of dictionaries we keep loaded, but that's a problem for when we add more languages.
Even though it is just a random thought, can we re-use the code that downloads spellchecker dictionaries for this purpose?

Regards,
That's my thought, too for on-demand downloading. How does the spellchecker handle in-memory loading? 

BTW, is re-layout that bad (layout first while waiting for the download)? Don't we do something similar with web fonts / dynamic fonts? 


(in reply to comment #17)

> How does the spellchecker handle in-memory loading?

Even though it is implemented by estade, I would like to write the steps of how Chrome downloads a spellchecker dictionary and use it below.

1. [WEBKIT] Add WebKitClient::spellcheck() so we can implement the spellchecking code in render_view.cc.
2. [RENDERER] Send an IPC message to a browser process to get the file descriptor.
3. [BROWSER] The UI thread posts a FILE task that checks whether a dictionary is in the local disk.
4. [BROWSER] Post a UI task that sends a download request (only if a dictionary is not in the local disk).
5. [BROWSER] Post a FILE task that saves the downloaded dictionary to a file (when finish downloading the dictionary).
6. [BROWSER] Post a UI task that sends a copy of the file descriptor to a renderer process.
7. [RENDERER] Map the memory of the file and pass it to hunspell.

I think the good next step is adding a hyphenation interface (such as WebKitClient::hyphenate()) to WebKitClient so we can implement the actual hyphenation code (including downloading a hyphenation dictionary) in render_view.cc?

Regards,
That's a very useful summary of the loading process, thanks a lot!

I planned on adding a hyphenation interface as the next step (was a bit held up by WebKit gardening), but we also probably have to change the way hyphenation is currently called by the renderer, since it's insufficient for international hyphenation (i.e., it adds hyphens only, but doesn't allow for modification of the input string).

E.g., in old German orthography: Schiffahrt -> Schiff-fahrt (note the extra 'f'). Similar cases exist in Hungarian, etc.

Blockedon: 63283 63284
Status: Started
Quick update: I'm working on converting the hyphenation code to UTF-16 and custom-tailoring it for Chromium. Will be on hiatus for a while due to my work on the RTE test suite and upcoming vacation.
Comment 23 by tkent@chromium.org, Jan 18 2011
Issue 69807 has been merged into this issue.
JFYI: I've just come across an alternate implementation of TeX hyphenation algorithm ( http://swolter.sdf1.org/software/libhyphenate.html ).

 I have little idea whether that's better or worse (the page claims that it's better than libhnj).  Perhaps, it's not a good idea to divert resource to evaluate this at the moment given that libhnj has been field-tested in OO for a long while and some adaptations have already been done (in bug 63284).  


Labels: -I18N bulkmove Feature-I18N
The following layout test is failing on all platforms

  fast/text/hyphenate-character.html = IMAGE+TEXT
  fast/text/hyphens.html = IMAGE+TEXT

Probable cause:

CSS3 Hyphenation implemented in Mac/Safari port:

http://trac.webkit.org/changeset/61548

We don't support it yet. Giving to the CSS3 folks for triage.
I'm one of the maintainers of hyphenation patterns repository for TeX:
    http://tug.org/tex-hyphen/
    SVN repository: http://tug.org/svn/texhyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt/).

Mozilla took those patterns as the basis:
    http://mxr.mozilla.org/mozilla-central/source/intl/locales/

Some patterns need relicencing, but that is being worked on.

We will probably start providing hunspell-ready patterns that could be used in any program using that library, like OpenOffice (apart from the licence), Firefox, ...

If you want, you can use those patterns and if any changes are needed in original repository, we will gladly help you.
Comment 27 by ver...@gmail.com, Sep 22 2011
I'd really like that the format of such dictionary remains user-editable, even if it's downloaded in a compressed (gzip?) form: there should be a simple plain-text layout for this dictionary, alowing also the users to add custom entries to this default dictionary.

One way for doing that is to maintain in the browser's cache the downloaded file, use also a stored reference to the user-edited file (checked first for exceptions).
And then implement a cache storing the locally recompiled file with very fast index (working with a simple finite-state machine and using some hashing technics for fast lookups, plus efficient data locality and compression to limit the memory footprint), containing the equivalent data (from the downloaded source and the user-edited file).

Comment 28 by ver...@gmail.com, Sep 22 2011
Note: the effect of hyphenation is language dependant! This is not always inserting an hyphen before the line-break, as some languages (notably Germanic/Nordic languages) also sometime require orthographic adaptations (for example when breaking in the middle of a "ck" pair occuring between two syllables).

A dictionary may not always need to contain those adaptations, because a language may already have generic rules for how they operate. Those rules should be implemented so that they don't necessarily have to be stored in the hyphenation dictionary.

Catalan will break syllables after a middle dot (either the diacritic attached and precomposed with a L/l letter, or the legacy punctuation sign following it): if there's such middle dot, you must not insert an additional hyphen.

Some other languages require a complex algorithm for almost all words: if implemented correctly, Lao could be "hyphenated" correctly in 98% of cases, requiring only a small dictionary of exceptions. Note that Lao will NOT use any visible hyphen (it breaks on almost all syllables, but does not use any space to separate words, so a woorking hyphenator is really needed to break lines properly and avoid systematic overflows).

Owner: ----
Status: Available
Won't be able to work on this in the foreseeable future. :(
Link from comment 10 is not valid any more, the new link to the spec is http://www.w3.org/TR/css3-text/#hyphenation
"In TeX's original hyphenation patterns for US English, the exception list contains fourteen words."
via http://en.wikipedia.org/wiki/Hyphenation_algorithm

Tug.org's TeX pattern repository seems to me like the best option for this.

IE, Firefox, Safari, and iOS all have CSS3's hyphenation property supported (via http://caniuse.com/css-hyphens). For the sake of web typography, it seems important that this should be implemented by Chrome soon!
Greetings,

I would like to add a link to WebKit Bug <http://webkit.org/b/48610> so we can track its progress.

Regards,

Hironori Bono

Sorry to be languageist but can we at least have it in English for now?
Comment 35 by js...@chromium.org, Jun 22 2012
Roland does not have time for this. We need to find somebody to work on this. For now,  it's probably a good idea to start with matching Safari for English (i.e. putting aside issues like 'text changing' on hyphenation as in German).
Project Member Comment 36 by bugdroid1@chromium.org, Jun 22 2012
Labels: -Webkit-ID-48610 WebKit-ID-48610-NEW
https://bugs.webkit.org/show_bug.cgi?id=48610
Project Member Comment 37 by bugdroid1@chromium.org, Jul 17 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=146964

------------------------------------------------------------------------
r146964 | hbono@chromium.org | Tue Jul 17 01:56:59 PDT 2012

Changed paths:
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator.cc?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/hyphen.h?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/hyph_en_US.dic?r1=146964&r2=146963&pathrev=146964
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator_unittest.cc?r1=146964&r2=146963&pathrev=146964
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator.h?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=146964&r2=146963&pathrev=146964
 A http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/hyphen.gyp?r1=146964&r2=146963&pathrev=146964
 A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator?r1=146964&r2=146963&pathrev=146964
 A http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/google.patch?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/hyphen.c?r1=146964&r2=146963&pathrev=146964
 M http://src.chromium.org/viewvc/chrome/trunk/src/third_party/hyphen/README.chromium?r1=146964&r2=146963&pathrev=146964

Adds a hy-phen-ator.
This change adds a project file for the hyphen library and a Hyphenator class, which encapsulates the library. (This class is not integrated into Chrome, though.) 

BUG= 47083 
TEST=HyphenatorTest.HyphenateWords

Review URL: https://chromiumcodereview.appspot.com/9545017
------------------------------------------------------------------------
Comment 38 by js...@chromium.org, Jul 17 2012
Owner: hbono@chromium.org
Status: Started
Thank you, hbono, for working on this.  Updating the status to reflect the 'reality' :-)


Project Member Comment 39 by bugdroid1@chromium.org, Aug 2 2012
Labels: WebKit-Rev-124434
http://trac.webkit.org/changeset/124434
Project Member Comment 40 by bugdroid1@chromium.org, Sep 3 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=154663

------------------------------------------------------------------------
r154663 | hbono@chromium.org | 2012-09-03T06:39:01.458833Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator.cc?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/test/mock_render_thread.cc?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/content_message_generator.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/test/mock_render_thread.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=154663&r2=154662&pathrev=154663
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/hyphenator?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/test/mock_render_process_host.cc?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_process_host_impl.cc?r1=154663&r2=154662&pathrev=154663
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/hyphenator/hyphenator_message_filter_unittest.cc?r1=154663&r2=154662&pathrev=154663
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/hyphenator/hyphenator_message_filter.cc?r1=154663&r2=154662&pathrev=154663
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/hyphenator/hyphenator_message_filter.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_browser.gypi?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/ipc/ipc_message_utils.h?r1=154663&r2=154662&pathrev=154663
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/common/hyphenator_messages.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.h?r1=154663&r2=154662&pathrev=154663
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/hyphenator/hyphenator_unittest.cc?r1=154663&r2=154662&pathrev=154663

In-te-grate hy-phen-ator to con-tent.
This change integrates the Hyphenator class to content so Chrome can use it. This change basically consists of two parts:
* Adds a couple of IPC messages so a renderer asks a browser to open hyphenation dictionaries;
* Adds a HyphenatorMessageFilter class, which opens hyphenation dictionaries in a browser process;
* Changes the Hyphenator class to send IPC messages to open hyphenation dictionaries. 

BUG= 47083 
TEST=HyphenatorTest.SetDictionary,HyphenatorMessageFilterTest.OpenDictionary

Review URL: https://chromiumcodereview.appspot.com/10854245
------------------------------------------------------------------------
Project Member Comment 41 by bugdroid1@chromium.org, Oct 4 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=160044

------------------------------------------------------------------------
r160044 | hbono@chromium.org | 2012-10-04T01:53:01.590967Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/test_webkit_platform_support.cc?r1=160044&r2=160043&pathrev=160044
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/webkit_support.gypi?r1=160044&r2=160043&pathrev=160044
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/test_webkit_platform_support.h?r1=160044&r2=160043&pathrev=160044
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/DEPS?r1=160044&r2=160043&pathrev=160044

Implement hyphenation for DumpRenderTree.
This change implements the platform functions added by my WebKit change r124434 <http://trac.webkit.org/changeset/124434> for DumpRenderTree. It is a simplified version of my r146964 <http://crrev.com/146964>.

BUG= 47083 
TEST=hyphen*.html

Review URL: https://chromiumcodereview.appspot.com/11014014
------------------------------------------------------------------------
Project Member Comment 42 by bugdroid1@chromium.org, Oct 4 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=160087

------------------------------------------------------------------------
r160087 | hbono@chromium.org | 2012-10-04T06:07:06.114118Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/test_webkit_platform_support.cc?r1=160087&r2=160086&pathrev=160087
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/webkit_support.gypi?r1=160087&r2=160086&pathrev=160087
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/support/test_webkit_platform_support.h?r1=160087&r2=160086&pathrev=160087
   M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/DEPS?r1=160087&r2=160086&pathrev=160087

Revert 160044 - Implement hyphenation for DumpRenderTree.
This change implements the platform functions added by my WebKit change r124434 <http://trac.webkit.org/changeset/124434> for DumpRenderTree. It is a simplified version of my r146964 <http://crrev.com/146964>.

BUG= 47083 
TEST=hyphen*.html

Review URL: https://chromiumcodereview.appspot.com/11014014

TBR=hbono@chromium.org
Review URL: https://codereview.chromium.org/11038027
------------------------------------------------------------------------
Project Member Comment 44 by bugdroid1@chromium.org, Oct 9 2012
Labels: -WebKit-ID-48610-NEW WebKit-ID-48610-RESOLVED
https://bugs.webkit.org/show_bug.cgi?id=48610
Project Member Comment 45 by bugdroid1@chromium.org, Oct 9 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=160790

------------------------------------------------------------------------
r160790 | hbono@chromium.org | 2012-10-09T04:41:16.939708Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip_internal.cc?r1=160790&r2=160789&pathrev=160790
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip_internal.h?r1=160790&r2=160789&pathrev=160790
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip_reader_unittest.cc?r1=160790&r2=160789&pathrev=160790
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip_reader.cc?r1=160790&r2=160789&pathrev=160790
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip_reader.h?r1=160790&r2=160789&pathrev=160790

Add ZipReader::OpenFromString().
This change adds a function OpenFromString to the ZipReader class so we can extract files from a zip archive stored in memory without using temporary files. 

BUG= 47083 
TEST=ZipReaderTest.OpenFromString.

Review URL: https://chromiumcodereview.appspot.com/10908067
------------------------------------------------------------------------
Project Member Comment 46 by bugdroid1@chromium.org, Oct 15 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=161845

------------------------------------------------------------------------
r161845 | hbono@chromium.org | 2012-10-15T10:12:14.266799Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/browser/content_browser_client.cc?r1=161845&r2=161844&pathrev=161845
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chrome_content_browser_client.cc?r1=161845&r2=161844&pathrev=161845
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/hyphenator/hyphenator_message_filter.cc?r1=161845&r2=161844&pathrev=161845
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/browser/content_browser_client.h?r1=161845&r2=161844&pathrev=161845
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chrome_content_browser_client.h?r1=161845&r2=161844&pathrev=161845

Change the directory containing hyphenation dictionaries.
Even though content shell and DumpRenderTree can use sample dictionaries in 'third_party/hyphen', Chrome cannot use them and it needs to use dictionaries downloaded to 'chrome::DIR_APP_DICTIONARIES'. This change adds the ContentBrowserClient::GetHyphenDictionaryDirectory function so Chrome can change the directory to 'chrome::DIR_APP_DICTIONARIES' and read hyphenation dictionaries from the directory.

BUG= 47083 
TEST=none

Review URL: https://chromiumcodereview.appspot.com/11036054
------------------------------------------------------------------------
The layout tests associated with this bug have been rebaselined, and look pretty good (to my non-expert eyes).  Can we close this, or is there further work to do?
There are a lot of follow-up's to do, but this bug may be closed. I'll leave it for hbono to answer. 

A partial list of follow-ups:
  - Make hyphenation work for languages other than English
  - Pick a hyphenation dictionary based on 'lang/xml:lang' specified in an HTML node
  - Add support for 'German-style' hyphenation where the spelling of a word change when hyphenated. 

Most, if not all, of the above requires some webkit changes as well as chromium-side changes. 

Project Member Comment 49 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -WebKit-Core -Feature-I18N Cr-Content Cr-UI-I18N Cr-Content-Core
Project Member Comment 50 by bugdroid1@chromium.org, Mar 20 2013
Labels: -Cr-UI-I18N Cr-UI-Internationalization
Project Member Comment 51 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Comment 52 by Deleted ...@, Apr 18 2013
When is support for this feature going to be added?
Comment 53 by joth@chromium.org, May 10 2013
Should this be added to http://www.chromestatus.com/features ?
Owner: kenjibaheux@chromium.org
Status: Untriaged
This probably needs a new owner.
Given the number of stars and interest, let me try to triage this once more. 
Cc: mikelawther@chromium.org dglazkov@chromium.org
Owner: ----
Status: Available
Does not look like we can continue to work on this...
CC-ing a bunch of folks...
Comment 56 by vli@chromium.org, Nov 19 2013
Labels: Hotlist-DevRel
Any progress in http://dev.w3.org/csswg/css-text-4/#hyphenation implementation?
Comment 58 by le...@chromium.org, Sep 11 2014
I don't believe anyone is working on it at the moment.
Comment 59 by javi...@gmail.com, Jan 27 2015
For god sake, even IE and Safari have multilanguage support for it... It's 2015, future is right here, any plans for it? Implementing the nice font antialiasing and leaving ugly enormous justification gaps is just like selling the wheels to buy gas...
And it's not just a problem for justification. Without hyphenation, you get much worse line-length variation in ragged text, too.
Comment 61 by le...@chromium.org, Jan 27 2015
Cc: jchaffraix@chromium.org le...@chromium.org dsinclair@chromium.org bsittler@chromium.org
Comment 62 by le...@chromium.org, Jan 27 2015
Cc: e...@chromium.org szager@chromium.org
To poke a little more on this issue - Blink is the last holdout on this feature. All the other major browsers support it: http://caniuse.com/#feat=css-hyphens

This bubbles up every once in a while (twice last year that I noticed) where everyone acknowledges the lack and importance, but the priority has always been eclipsed by other near-term projects. Here's hoping someone can free up some time to finish hyphens support.
Comment 64 by le...@chromium.org, Jan 27 2015
To sum things up:

There's an implementation in WebKit that would give someone interested in working on this a pretty good start on what's needed for Blink.

We had a hyphenation library, but we removed it since this bug wasn't getting traction: http://blink.lc/chromium/commit/?id=1c6c6c3eef1ae5d60966faf4452524085aec0592

We'd need to wire things up through Content to make them play nicely together.

I'm happy to provide reviews for the blink changes.
Comment 65 by tony@chromium.org, Jan 27 2015
The reason it was originally removed is because we didn't have anyone willing to run and manage the server that provides the dictionaries.

As a first step, I try to figure out where the spelling dictionaries are hosted and try to get the hyphenation dictionaries hosted in the same place.
I'm willing to volunteer for preparation of hyphenation dictionaries if someone can tell me the exact requirements. (I don't know where to get up-to-date spelling dictionaries for all languages though.)

What are the requirements for the server?
Comment 67 by e...@chromium.org, Jan 27 2015
We are currently looking into doing this work in conjunction with the Android team. Please reach out to me directly (eae@) if you are interested in working on this.

Comment 68 by js...@chromium.org, Jan 30 2015
Labels: -Cr-Blink Cr-Blink-Layout
In bug 107111, the blink code and layout tests were removed, but 'content' hook-up ( http://crrev.com/154663 ) removal was not recorded there, but it's gone anyway. 
Cc: kojii@chromium.org
Does you guys have any idea when you will provide us with hyphens in webkit browsers? This  feature would be quite important for all the responsive websites, which contain long words in a title or paragraph.
Comment 71 by tony@chromium.org, Feb 17 2015
I'm not working on this feature, so I don't have an answer to your question, but you can work around the lack of support by putting soft hyphens in words you want broken up.  Here's an example:
http://jsfiddle.net/zdp0gamh/
Comment 72 by tkent@chromium.org, May 21 2015
Labels: Cr-Blink-LayoutTests
Issue 492421 has been merged into this issue.
Comment 74 by tkent@chromium.org, Jul 15 2015
Labels: -Cr-Content-Core
Comment 75 by le...@chromium.org, Aug 12 2015
Owner: jochen@chromium.org
Status: Assigned
Assigning to Jochen to route.
Comment 76 by tony@chromium.org, Aug 12 2015
Cc: -tony@chromium.org
Cc: jochen@chromium.org
Owner: e...@chromium.org
Emil, you mentioned that this would be in the scope of your team?
Comment 78 by e...@chromium.org, Aug 12 2015
Labels: -LayoutTests -Mstone-X -bulkmove -WebKit-Rev-124434 -WebKit-ID-48610-RESOLVED -Cr-Blink-LayoutTests Cr-Blink-Fonts
Owner: szager@chromium.org
Correct. 
All browser engines have a working implementation for this except for Blink: http://caniuse.com/#feat=css-hyphens
Comment 80 by javi...@gmail.com, Sep 29 2015
#79 ...well, at least "all" except the one in hand :)
This is still not working in Chrome. All other browser support this. Is Chrome going to implement this CSS3 feature?
Comment 82 by szager@google.com, Oct 4 2015
We are in the planning stages for implementing this; the actual work should start in earnest early next year.
Comment 83 by ger...@mathiuet.ch, Nov 10 2015
I would like to help to get this feature earlier than «early next year». :)
Is there something blocking the implementation?
Comment 84 by javi...@gmail.com, Nov 10 2015
New Year's Eve, surely :)
Comment 85 by ger...@mathiuet.ch, Jan 19 2016
*nag*
We are currently blocked on an upstream dependency: the hyphenation library we are planning to use in chromium, which needs to be cleaned up before we can open-source it.

Unfortunately, I have no progress to report yet; I'm planning to sit down with the library developer soon, and will post back here with an update when I have it.
This is a really important feature for implementing better typography, and there is no real alternative. Is there any way to help with the cleanup?
+1 Hey chromium team, its really important!
as mentioned in #87, is there any public information about that or a platform we can help with that cleanup? Would really provide resources for that...
And I second that. 
Cc: -kojii@chromium.org -jchaffraix@chromium.org -dsinclair@chromium.org
Owner: kojii@chromium.org
Labels: -Type-Bug Type-Feature
Summary: CSS3: Implement Hyphenation (was: CSS3: Implement Hyphenation for Chromium port)
We hear you and are working to implement support for hyphenation. Issue 63283 tracks the library work. We'll update this bug with information and progress reports as the work continues.

This is an immensely important feature that is needed for something as simple as nicely displaying text, which is the main purpose of the web. Firefox had this half a decade ago. Thank you to everyone working on that library, but please try to get more people in on it so this can be added ASAP! Firefox has even left the vendor prefixing stage, so I hope it can be released soon, preferably skipping the prefixing if the spec is now nailed down.
Really looking forward for this feature. It is a must for Responsive Typography e.g. big titles without having to have 6 or so breakpoints only to get capture each device size. With wearables nowadays this is even more the case with those tiny screens. Thanks for working on this!
Mergedinto: 605840
Status: Duplicate
Allow me to merge this bug to 605840. It's a bug to track launching a new property.
A very useful feature, please do!
This property is very necessary

I heard even IE implemented support of hyphenation. So it's really important feature. I hope the chromium team will not delay with that:)
Please match at lest Firefox's support for this feature.
We have started implementing it and that work is tracked in bug 605840.
Please follow along there.




If so, than add #605840 in "Blocked on" list.
Labels: Restrict-AddIssueComment-EditIssue
Sign in to add a comment