Bug 42856 - Mistaken automatic ligaturing with some monospaced fonts (Monaco, Courier) on MacOS X
Summary: Mistaken automatic ligaturing with some monospaced fonts (Monaco, Courier) on...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
3.4.4 release
Hardware: PowerPC Mac OS X (All)
: medium normal
Assignee: Not Assigned
: 53110 (view as bug list)
Depends on:
Reported: 2011-11-12 10:08 UTC by dand1972
Modified: 2013-07-28 08:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

screenshot of font problem (104.72 KB, image/png)
2011-11-12 10:08 UTC, dand1972
Screenshot of sample for bug 42856, created with LibO on MacOS X 10.6.8 (311.36 KB, image/png)
2012-08-17 13:41 UTC, Roman Eisele

Note You need to log in before you can comment on or make changes to this bug.
Description dand1972 2011-11-12 10:08:25 UTC
Created attachment 53462 [details]
screenshot of font problem

I noticed in certain monospace fonts that the spacing between lower case "f" followed by lower case "i" is messed up.  This happens in Courier (but not Courier New), American Typewriter, and Monaco.

I also found the dot of the "i" disappears when following an "f" in Geneva and New York.  This isn't a comprehensive list because I didn't check every single font.  I've attached a png to illustrate examples.

I found this problem in both Writer and Spreadsheets.
Comment 1 Jean-Baptiste Faure 2011-11-12 13:41:54 UTC
Hmmm, it seems to be ligatures: http://en.wikipedia.org/wiki/Typographic_ligature

Please compare to DejaVu and Liberation fonts.

Best regards. JBF
Comment 2 dand1972 2011-11-12 19:09:16 UTC
DejaVu and Liberation fonts render correctly.  I understand now that the ligatures I saw in Geneva and New York are intentional, but in the monospace fonts listed in my first post it's still a problem because each character is supposed to take up the same amount of space.  All other monospace fonts I checked display correctly.

Thank you for your reply.
Comment 3 sasha.libreoffice 2012-03-07 02:24:43 UTC
@ dand1972@yahoo.com
Thanks for bugreport
Please, verify if in last version of LibreOffice still reproducible
And if reproducible, please, attach odt file that demonstrates this problem
Comment 4 Roman Eisele 2012-05-08 00:47:00 UTC
A first annotation:
American Typewriter is NOT a monospaced font ;-)! It looks like one, of course, and is designed to imitate a typewriter font, but it uses proportional spacing ...

Therefore, the use of ligatures with American Typewriter may be disputed, but definitely is not a bug, because with this font it is not necessary that every character (glyph) takes the same amount of (horizontal) space.
Comment 5 Florian Reisinger 2012-08-14 13:59:12 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:00:25 UTC Comment hidden (obsolete)
Comment 7 Florian Reisinger 2012-08-14 14:05:06 UTC Comment hidden (obsolete)
Comment 8 Florian Reisinger 2012-08-14 14:07:09 UTC Comment hidden (obsolete)
Comment 9 Roman Eisele 2012-08-17 13:39:47 UTC
Sorry -- I wanted to leave an additional comment about this issue earlier (cf. my preliminary comment #4), but lost track of this bug. So, reminded by the closing message, here are finally some remarks:

(In reply to comment #2)
> [...] but in the monospace
> fonts listed in my first post it's still a problem because each character is
> supposed to take up the same amount of space.

Well, after trying it myself again and examining your screenshot, I would say that it should not be a (big) problem even in the monospace fonts listed in comment #0 (Courier and Monaco, probably also Menlo?!), because the ligatures fi and fl should take exactly the space of a single character, so that the aligment would not be disturbed by the ligatures.


(In reply to comment #2)
> All other monospace fonts I checked display correctly.

You are definitely right that this is an important inconsistency, and therefore IMHO we should consider this issue as a bug. I see at least three explanations for the inconsistency:

(a)  LibreOffice disables the automatic use of ligatures for some monospace
     fonts (Courier New), but not for other ones, so the detection of
     monospace fonts (an algorithm? a whitelist?) is incomplete.
(b)  The automatic use of ligatures depends on the font (file) type,
     i.e. TTF, OTF, Mac-TrueType, dfont ... This is a possible reason,
     because Courier and Monaco are Mac TrueType/.dfont fonts (depending
     on your MacOS X version), but Courier New is a .ttf font.
(c)  A complicated interaction of (a) and (b).

Examinating a simple sample file I have created, I see indicia for both (a) and (b), so maybe (c) is the right answer.

But luckily we don’t need to investigate further into this issue, because my sample file also gives me the impression that this issue is fixed in between: LibreOffice on MacOS X 10.6.8 (Intel) handles all monospaced fonts I have tried consistently, i.e. disables the use of ligatures everywhere, including text in Courier and Monaco.

I will attach a screenshot of my sample file proofing this result.

So my impression is that this issue was fixed (maybe by the way with some other improvement) in between. Therefore I change the status of this bug report to RESOLVED/WORKSFORME -- which is IMHO much more satisfying than RESOLVED/INVALID ;-).
Comment 10 Roman Eisele 2012-08-17 13:41:41 UTC
Created attachment 65695 [details]
Screenshot of sample for bug 42856, created with LibO on MacOS X 10.6.8

This screenshot shows that the problem is fixed at least with LibO on MacOS X 10.6.8 (Intel).
Comment 11 Roman Eisele 2012-08-21 09:41:40 UTC
*** Bug 53110 has been marked as a duplicate of this bug. ***
Comment 12 Roman Eisele 2012-08-21 10:04:43 UTC
Sorry, I have to reopen this bug report.

1) The reporter of bug 53110, dcdevoto@earthlink.net, has reported that he can still reproduce this issue with LibreOffice 3.6.0. This implies that the issue is not fixed in LibO 3.6.x, as I had assumed, but is still present.

2) The fact that I can not reproduce the issue anymore with LibO 3.6.x on MacOS X 10.6.8 (Intel), but dcdevoto can still reproduce it with the same LibO version on MacOS X 10.4.11 (PPC), suggests to me two possible explanations:

a) This is NOTOURBUG, rather a problem either with the .dfont versions of Monaco and Courier (both 5.1d1e1) which Apple supplied with MacOS X 10.4.x, or with the text rendering engine (ATSUI?) of MacOS X 10.4 (and 10.5?) itself. So we could close this bug report as RESOLVED/NOTOURBUG

b) But I have learned to be careful with setting NOTOURBUG. It seems also possible (even if improbable), from the point of view of a simple-minded bug-wrangler like me, that the reason of this bug is a complicated interaction between LibreOffice and MacOS X 10.4/10.5. Therefore I just REOPEN this bug report for now and wait for additional evidence if this is really NOTOURBUG.

3) In his comments to bug 53110, dcdevoto has also given good reasoning for the importance of this bug; i.e. why the automatic use of ligatures should be always disabled for monospaced fonts including Courier and Monaco.

a) Here is another one: If you ever get some carefully space-aligned
pseudo-tables like

            | MacroSoft Office | OpenOffice.org  | LibreOffice
Supports    | Mac, Win         | Mac, Win, Linux | Mac, Win, Linux
Test result | **               | ***             | *****
...         |                  |                 |

(there are still people who produce manuscripts containing such crap!), the complete alignment will be messed up by the automatic addition of any ligatures, and this makes it difficult to read and convert such pseudo-tables to real tables.

b) And yet another one:
If you have to embed source code listings in your document, which are normally formatted with monospaced fonts and often aligned with spaces, the automatic addition of ligatures will also mess up the formatting.

Because of this and similar reasons I am now convinced that this bug has some importance and that it is reasonable to expect that LibreOffice should not any ligatures to monospaced fonts (by default).
Comment 13 Roman Eisele 2012-08-21 10:09:37 UTC
A more precise summary is necessary -- this one is still not perfect (so feel free to improve), but better ...
Comment 14 Urmas 2013-07-28 08:31:54 UTC
Closing a PowerPC-specific bug. Please reopen if it can be reproduced on Intel hardware too.