Bug 60427

Summary: Missing ZWNJ support for German ligature handling
Product: LibreOffice Reporter: László Németh <nemeth>
Component: WriterAssignee: László Németh <nemeth>
Status: RESOLVED FIXED    
Severity: enhancement CC: serval2412
Priority: medium    
Version: 4.1.0.0.alpha0+ Master   
Hardware: Other   
OS: All   
Whiteboard: target:4.1.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 151986    
Attachments: Test file with plain fi replacement, and without it using ZWNJ, ZWJ and ZWS
Test file
Test document with Linux Libertine G Graphite font

Description László Németh 2013-02-07 16:05:07 UTC
Created attachment 74360 [details]
Test file with plain fi replacement, and without it using ZWNJ, ZWJ and ZWS

German typography could use zero width non-joiner (ZWNJ) characters to fix the automatic ligature handling of OpenType or Graphite fonts, see http://en.wikipedia.org/wiki/Zero-width_non-joiner.

LibreOffice has limited support for this feature, also there are problems with text search and spell checking, too, see the attached test file and screenshot. (It uses Linux Libertine G with automatic ligature replacement.)

Workaround for ligature handling: 
– try zero-width space (U-200B) instead of ZWNJ or
– use the font specific ligature settings (eg. "Linux Libertine G:liga=0" special font name) for the full word (or word part to keep ligatures in the other word parts)

Workaround for spell checking:
Specify ZWNJ with IGNORE feature of Hunspell in the affix file (it works with UTF-8 encoded Hunspell dictionaries):

IGNORE <U-200C>

where <U-200C> is the UTF-8 encoded U-200C ZWNJ

Plans:
LibreOffice/Hunspell:
– remove ZWNJ automatically for 8-bit encoded dictionaries
– add IGNORE ZWNJ to UTF-8 encoded dictionaries (English, Hungarian)

Linux Libertine G, Biolinum G:
– add/fix ZWNJ letter to avoid bad kerning (see screenshot)
– use short f for f + ZWNJ
– maybe it is better to remove the default ligature replacement for German (it is possible to set in the Graphite font)
Comment 1 Not Assigned 2013-02-08 07:33:50 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=98029f1625663609d670f79eea61f7547bfc8123

fdo#60427, fdo#59337: spell words with ZWNJ/ZWJ, f-lig. (only 8-bit dic.)



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 László Németh 2013-02-08 07:41:26 UTC
Created attachment 74409 [details]
Test file

"Tests" words contain ZWNJ and ZWJ between T and e.
Comment 3 László Németh 2013-02-08 07:47:04 UTC
Created attachment 74410 [details]
Test document with Linux Libertine G Graphite font
Comment 4 Julien Nabet 2014-08-15 22:00:14 UTC
Laszlo: with http://cgit.freedesktop.org/libreoffice/core/commit/?id=98029f1625663609d670f79eea61f7547bfc8123, is it fixed or does it need more work?
Comment 5 László Németh 2014-08-24 13:56:01 UTC
(In reply to comment #4)
> Laszlo: with
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=98029f1625663609d670f79eea61f7547bfc8123, is it fixed or does it need
> more work?

Julien: The most annoying problem, spell checking with ZWNJ was fixed, so I close the issue (but I have to update the Linux Libertine G, too). Thanks for your comment.