Bug 60427 - Missing ZWNJ support for German ligature handling
Summary: Missing ZWNJ support for German ligature handling
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: László Németh
URL:
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks: ZWNJ-ZWJ
  Show dependency treegraph
 
Reported: 2013-02-07 16:05 UTC by László Németh
Modified: 2022-11-10 12:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test file with plain fi replacement, and without it using ZWNJ, ZWJ and ZWS (9.81 KB, application/vnd.oasis.opendocument.text)
2013-02-07 16:05 UTC, László Németh
Details
Test file (16.67 KB, application/vnd.oasis.opendocument.text)
2013-02-08 07:41 UTC, László Németh
Details
Test document with Linux Libertine G Graphite font (9.81 KB, application/vnd.oasis.opendocument.text)
2013-02-08 07:47 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
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.