Bug 79673 - Mac OS X: Wrong Position of Nonprinting Characters
Summary: Mac OS X: Wrong Position of Nonprinting Characters
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.beta1
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: NoRepro:4.3.0.0.beta1:Ubuntu NoRepro:...
Keywords:
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2014-06-05 08:19 UTC by Italo Vignoli
Modified: 2014-07-15 19:55 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice Writer with left aligned text (1.08 MB, image/jpeg)
2014-06-05 08:19 UTC, Italo Vignoli
Details
screenshot (232.54 KB, image/png)
2014-06-12 15:19 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Italo Vignoli 2014-06-05 08:19:52 UTC
Created attachment 100450 [details]
LibreOffice Writer with left aligned text

Non printing characters in blue show in the wrong position, even in left aligned text, while cursor shows in the right position. Although this does not impact on the possibility of editing the text it creates a terrible visual appearance (and forces to hide nonprinting characters, which is a problem for professional editors).
Comment 1 Italo Vignoli 2014-06-05 09:50:50 UTC
End of lines do not show if text is centered. Both problems happen independently from the font used (tried almost a dozen of them, fixed width and proportional).
Comment 2 Michael Meeks 2014-06-05 10:02:56 UTC
Can you confirm if this is font and/or document specific ? I corrected the type of the image attachment. Making this a 4.3 MAB as well.
Comment 3 Marina Latini (SUSE) 2014-06-05 10:05:07 UTC
Steps to reproduce:
1) Open Writer;
2) Enable nonprinting characters;
3) Type some dummy words;


===================
On LibreOffice:
* Version: 4.3.0.0.beta1
* Build ID: b7cfa1eab1cb1e94f71d6df6612b73f231d0bf92
* OS: Windows XP 

Blue non printing characters show in the correct position. 
The end of line in centered text disappear.
===================

===================
On LibreOffice:
* Version: 4.3.0.0.beta1
* Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
* OS: Ubuntu 14.04 x86_64

Blue non printing characters show in the correct position. 
The end of line in centered text disappear.
===================
Comment 4 Italo Vignoli 2014-06-05 10:13:24 UTC
The bug is font and document independent.
Comment 5 Robinson Tryon (qubit) 2014-06-05 10:57:15 UTC
(In reply to comment #3)
> Steps to reproduce:
> 1) Open Writer;
> 2) Enable nonprinting characters;
> 3) Type some dummy words;

Italo mentioned that this is font-independent, but as per the provided screenshot, I used Liberation Serif 12 for consistency.

No repro for me here with
LO 4.3.0.0.beta1
Ubuntu 12.04.4


Joren -- can you confirm repro on the Mac, please?
Comment 6 Caolán McNamara 2014-06-12 09:31:58 UTC
maybe tor could have a look (and if its reprodicible maybe one of the three mac font fixes in gerrit might be relevent)
Comment 7 Jorendc 2014-06-12 15:19:08 UTC
Created attachment 100925 [details]
screenshot

(In reply to comment #5)
> Joren -- can you confirm repro on the Mac, please?

Reproducible, see attached screenshot. It is also zoom-independant. Italo did use 200% zoom, I tested on multiple zoom levels and the issue persists.

Tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.beta2
Build ID: a06aa316117a6ff0f05c697c82831c227812d810

Kind regards,
Joren
Comment 8 Italo Vignoli 2014-07-05 23:29:53 UTC
Situation has not improved with LibreOffice 4.3 RC1 and RC2. The bug is still easy to reproduce independently from the font and the zoom factor.
Comment 9 Michael Meeks 2014-07-07 08:53:47 UTC
Tor / Khaled - this is a Mac specific issue with font bits; any thoughts there much appreciated :-)
Comment 10 ⁨خالد حسني⁩ 2014-07-07 22:54:41 UTC
(In reply to comment #9)
> Tor / Khaled - this is a Mac specific issue with font bits; any thoughts
> there much appreciated :-)

I think that attempting to use CoreText in LibreOffice is ill feated, the API is very limiting for the way we do text layout. I think we should instead work on using HarfBuzz on Mac as well instead (it now has a CoreText “shaper” for AAT fonts on Mac so there shouldn’t be any loss of functionality, and we get better OpenType support for free), but I personally don’t have much time to work on it myself, so I’ll leave it to the people doing the actual work to decide.
Comment 11 Michael Meeks 2014-07-08 08:17:00 UTC
Caolan - what do you think of using Harfbuzz on Mac ? =)
Comment 12 Michael Meeks 2014-07-11 14:55:40 UTC
It is assumed that this is caused bu the non-printing characters improvements.

The ESC was eager to see the non-printing character rendering returned to its previous state (ie. a revert) - or (potentially) just a revert for Mac [ which is more ideal ] - while the problem is found/fixed there ...

Tomaz - can you look into that for Monday ?
Comment 13 Commit Notification 2014-07-14 22:08:14 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3a2010c711b0ca4d762681dd0967ad08bc1e23fc

fdo#79673 revert to old NPC for MacOSX only



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 14 Norbert Thiebaud 2014-07-14 22:36:05 UTC
I fixed that.. that is before Tomaz revert.

The core issue is that hdu's CoreText implementation completely ignore DXArray information.. and sw is trying to print two string on top of each other
expecting the layout to be aligned the same.. which it is not because we ignore
the DXArray of the initial string when drawing the overlay that contain the 'centered-dot'

I modified things so that the main DrawTextArray can be told to draw bullet
instead of doing that in two separate DrawTextArray.

Tested on Mac, works fine.

This was build on top of other patches to introduce sub-pixel DXArray (iow double based instead of sal_Int32) for the part where the DXArray is expressed
in DevicePixel...
These will be needed to add back full support fo DXArray with CoreText, since CoreText do sub-pixel layout on Retina
Comment 15 Norbert Thiebaud 2014-07-14 23:01:59 UTC
Note: I fixed the positioning of the space/dot
but I did not notice the other problem which is the missing
'End of line' for centered or right-justified...
Working on that now...
Comment 16 Italo Vignoli 2014-07-14 23:46:27 UTC
It looks like the "end of line" for centered and right-justified lines of text affects all platforms, and not only MacOS X. At least, I have seen the problem happening on Windows and Linux (see https://bugs.freedesktop.org/show_bug.cgi?id=79673#c3).
Comment 17 Tomaz Vajngerl 2014-07-15 06:08:58 UTC
Replacing spaces with dots is exactly what the revert does..
Comment 18 Norbert Thiebaud 2014-07-15 06:54:26 UTC
Note: there is actually 2 distinct bugs in this bug repport

the Mac specific problem of the alignment of the 'centered-dot' representing the spaces

and the platform independent problem of the missing paragraph sign in centered alignment. the later has nothing to do with CoreText.

PS: the paragraph sign is not displayed either in right-align justification
but that was also the case before...
Comment 19 Commit Notification 2014-07-15 09:43:12 UTC
Norbert Thiebaud committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=36ff78d83b6a012d2a2c8ef2c6d8f0db62ecffc9&h=libreoffice-4-3

fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass


It will be available in LibreOffice 4.3.1.

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 20 Douglas Mencken 2014-07-15 10:33:24 UTC
Present since early March 2014. I thought it is "feature", not bug :)

http://ftp.osuosl.org/pub/manulix/other/libreoffice/pictures/lo_4.3_master-03mar2014-writer_document-fullscreen.png
Comment 21 Commit Notification 2014-07-15 11:36:51 UTC
Norbert Thiebaud committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3123ac2fcf6bf0d4e11e536b3987b454e514f6aa&h=libreoffice-4-3

Revert "fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass"


It will be available in LibreOffice 4.3.1.

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 22 Commit Notification 2014-07-15 12:09:15 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f288be788adf8a098f40886f14e188031242008b&h=libreoffice-4-3

fdo#79673 revert to old NPC for MacOSX only


It will be available in LibreOffice 4.3.1.

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 23 Michael Meeks 2014-07-15 15:39:56 UTC
Closing this bug - we disabled the feature for Mac (effectively).

However the good news is that Norbert is working on fixing a rats-nest of issues in this area to re-add the feature for Mac again =)
Comment 24 Commit Notification 2014-07-15 15:40:12 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f7005e2a21d974f0b195e950a967a09b6a0d2520&h=libreoffice-4-3-0

fdo#79673 revert to old NPC for MacOSX only


It will be available already in LibreOffice 4.3.0.

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 25 Commit Notification 2014-07-15 19:55:14 UTC
Norbert Thiebaud committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c8de2b107964cd3d26dba8fcf80c6da77b1d97a

Revert "fdo#79673 revert to old NPC for MacOSX only"



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 26 Commit Notification 2014-07-15 19:55:28 UTC
Norbert Thiebaud committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a8fcfca98ee10666c58011ebe0a5f96e008d22d

fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass



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.