bad font substitution causes line spacing to be wrong

Bug #126784 reported by papal on 2007-07-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fontconfig (Baltix)
fontconfig (Ubuntu)
Unassigned (Ubuntu)

Bug Description

I am attempting to migrate users from Fedora to Ubuntu. I'm using OOo 2.2.0 on both systems. The difference is on Fedora, I'm using the official version downloaded from The problem I am having is that the line spacing on the Ubuntu version is larger than the official OpenOffice version. This is with the *exact* same font. This results in documents being longer on Ubuntu and the contents of what should be on a single page, spills on to subsequent pages. I am using Times and even copied the TTF files to each of the boxes with no change. To further illustrate it's a bug, I installed the official OpenOffice version on the Ubuntu box, and with this version, the problem disappears. This may be related to bug:

Although this is Linux <-> Linux. This is a real deal breaker for me as I really need the documents to be identical. I've tried replacing all the config files in /usr/lib/openoffice with the official ones, hoping it was just that, but it appears to be compiled in. I'd much rather use the Ubuntu version as I can use apt to keep up to date, which was rather the point of me switching to Ubuntu.

Juha Heinanen (jh-tutpro) wrote :

i noticed too when upgrading from fiesty to gutsy and thus from oo 2.2 to 2.3 that line spacing got increased and now i have to go through lots of trouble to modify texts in oowriter and ooimpress to make them look nice again. is this a real bug in oo 2.3 and if so, is there any hope that it will get fixed?

papal (papal-authority) wrote :

Well my problem was with Feisty. I've upgraded to Gutsy and they appear to have fixed the line spacing. It's going to suck for people who've created documents in Feisty though. What I don't get is why it's necessary to mess around with it so much, they just need to add their brown splash screen and a bit of branding.

Johannes (kakemphaton) wrote :

Same problem with Gutsy and OOo 2.3. Line spacing is WRONG, and all documents show a line spacing of about 1,4 instead of 1. The same document opened with OOo 2.3 under Windows XP shows correct line spacing.
This is a BIG problem because all the documents layouts get lost.
Saw it on PCs of my whole family (i.e. 4 times), always Gutsy.

Johannes (kakemphaton) on 2007-12-12
Changed in
status: New → Confirmed
Johannes (kakemphaton) wrote :

Some search in google, forums and bug reports showed that this bug has been existing for years now!
Installed OOo 2.4 snapshot and non-ubuntu 2.3.1 version, and in every version line spacing is far too big on Gutsy.
Don't have any other distro for the moment to test. On windows XP everything OK.

The importance of this bug seems to be BIG, as it destroys the .doc <=> .odt layout compatibility and the OOo Linux <=> Windows layout compatibility.
More, it is a good reason to stop migration from win to linux, or to change the linux distro.

I don't know if someone can make a bug report on the OOo bug tracking system, I don't have an account there.

Johannes (kakemphaton) wrote :

Yves kind of solves the problem in the following link:

The line spacing is too big only when the "msttcorefonts" package is not installed. Install the fonts, and the layout gets right.

For me it is still an Ubuntu Problem, since for the normal user it's impossible to know what's wrong. I spent month running XP in a virtual machine for OOo just because of this "bug" making OOo unusable on Linux.

So is it possible to make these fonts - or non buggy free equivalents - available by default, so it is possible to open documents without loosing layout by default?

Johannes (kakemphaton) wrote :
Johannes (kakemphaton) wrote :
Chris Cheney (ccheney) wrote :

It doesn't display correctly on Ubuntu hardy even with msttcorefonts installed since the first half of the document is in an invalid font 'Times'. There is no font called 'Times' when switched to 'Times New Roman' it displays correctly. At least if 'Times New Roman' is installed.

Chris Cheney (ccheney) wrote :

It appears this comment pertains to the problem at hand, when running like below it appears to cause Times to be properly substituted since the font does not exist (even with msttcorefonts installed). And I ran the fc-match on Times and got the following:

fc-match Times
n021003l.pfb: "Nimbus Roman No9 L" "Regular"


The fc-match results indicate that fontconfig instructed OOo to replace "Arial" with "DejaVu Sans Book".
If DejaVu is not the best match on this system then please report this problem to the distributor (e.g.
Ubuntu, RedHat, etc). There are potentially many many more mismatches in fontconfig's knowledge of
the relationships of different fonts.

Before OOo did the fontconfig based substitutions described above OOo used its own cross-platform
expertise. Since the distributors insisted that OOo follows fontconfigs substitution recommendations
they will probably be quite happy to fix all the mismatches themselves.

To check how OOo used to substitute fonts you can do the following steps:
- open a terminal
- change the directory to the OOo's program folder
- type "SAL_DISABLE_FC_SUBST=1 ./soffice.bin"
- check the document you reported

Changed in
importance: Undecided → Critical
Chris Cheney (ccheney) on 2008-03-13
Changed in
status: Confirmed → In Progress
Chris Cheney (ccheney) on 2008-03-30
Changed in
importance: Critical → High
Chris Cheney (ccheney) on 2008-04-02
Changed in
importance: High → Critical

This issue is still present in Hardy and OpenOffice 2.4.0. My Writer documents where created in Windows with OpenOffice 2.4.0 using Liberation fonts. I have the same fonts installed in Hardy and the line spacing still differs. I have noticed that the line spacing is smaller in Hardy as lines which are supposed to be on the next page get shifted up. This is very frustrating as I need to edit these documents on both platforms. I have also confirmed this issue on a Gentoo machine that I have so I don't believe it's an issue with Ubuntu itself.

Changed in
assignee: nobody → openoffice
assignee: openoffice → nobody
Alexander Jones (alex-weej) wrote :

There doesn't seem to be anything wrong with the line spacing. Rather, DejaVu Sans Book's line height (not spacing) is just slightly different to Arial's.

amak79: I suggest you learn how to use page-breaks if you need to ensure that some content starts on a new page.

papal (papal-authority) wrote :

One, I'm sure amak79 knows what a page break is, and two, if you'd read up on the problem, page breaks won't help. This is because the font spacing, being bigger, can force what used to be a one page document on to two pages. What would a page break do? We want less pages (i.e. like the original document), not more.

Alexander Jones (alex-weej) wrote :

One, quoth amak79: "I have noticed that the line spacing is smaller in Hardy as lines which are supposed to be on the next page get shifted up." Shifted UP. Should be using page breaks.

Two, font spacing is not different, the font HEIGHT is different. OOo isn't spacing lines any differently, it's just using a different font.

Three, be less aggressive.

papal (papal-authority) wrote :

We are talking about spacing, namely vertical spacing. Now please stop trolling my bug report unless you have something constructive to add. And no, telling people to reformat their documents is not constructive. The end. Thanks.

Alexander Jones (alex-weej) wrote :

Is anyone fixing your bug? In progress for four and a half months and assigned to nobody -- I think you need to drill down on the problem more and stop being an ass-hat. Thanks to you, too.

Eduard Grebe (eduardgrebe) wrote :

Since the problem seems to be caused by DejaVuSans's line height, is it not a possible solution to change the default font substitution behaviour? When msttcorefonts is not installed and a document is opened asking for Arial or whatever, can OOo not substitute with a font that does not have a different line height? This seems a simple problem, but it is annoying. (I reported a duplicate of this bug in August 2006!).

Chris Cheney (ccheney) on 2008-07-18
Changed in
importance: Critical → High
status: In Progress → Confirmed
Chris Cheney (ccheney) wrote :

According to the upstream OOo bug report this appears to actually be a bug in the fontconfig substitution selection, so isn't a bug in OOo at all.

Changed in
importance: High → Undecided
status: Confirmed → Invalid
Changed in fontconfig:
importance: Undecided → High
status: New → Confirmed
Changed in openoffice:
status: Unknown → Invalid

I can't reproduce this problem in Lucid and Maverick. fonctconfig now selects LiberationSans as substitution to Arial which seems to be a better alternative since the document render the same with or without arial installed.
Is it still an issue for you ?

Changed in fontconfig (Ubuntu):
status: Confirmed → Incomplete

Please don't think that I am rude or something.
But, do you really think that it is appropriate to ask whether the bug is still an issue after THREE years passed since the bug was reported? I am just trying to understand what is the reason to ask such a question?

Thank you.

The reason is that time doesn't fix bugs and a 3 years old issue may still be current.

Grant Ingram (g-l-ingram) wrote :

The problem looks fixed to me. I've even tried some ancient (five year old) open office presentations to see if they load up correctly and them seem to be just fine.

Thanks for following up. I'm closing this report due to your last comment regarding that even some ancient document looks good.
If it happens that this problem occurs again in a newer release then please file a new report.
Thanks for your help to make Ubuntu better.

Changed in fontconfig (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.