Apache OpenOffice (AOO) Bugzilla – Issue 85394
Line spacing in Writer is too big under Linux - Wrong line spacing
Last modified: 2008-02-15 15:14:53 UTC
Under Linux Mint 4.0 and Ubuntu Gutsy Gibbon 7.10, the default line spacing for normal documents is far too big. Bug reported and confirmed on Launchpad: https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/126784 Apparently it doesn't concern Fedora. I observed this bug on OOo 2.2, 2.3, and 2.4 snapshot 680_m2. On Windows, No problem, the line spacing is ok. The same document opened under Linux shows a far too big line spacing (about 140%), so the whole document looses its Layout. It is very problematic since OOo becomes really unusable. I have to use the bugfree windows version on a Virtual Machine since there is no fix! This bug shows up on all 4 machines in my Family, all PCs under Ubuntu or Mint. The bug also existed on Ubuntu Feisty 7.04 This bug is also mentionned here: http://www.linuxjournal.com/node/1000178 And there is a solution, too - namely install the "msttcorefonts" package. Why does the line spacing grows when msttcorefonts is not installed? I hated OOo for that bug many years, without finding any clue for how to solve the problem - until today.
@johanneseva: Please try also to choose another printer driver/queue. This may have an influence on the document layout. @hdu: have you an idea why this may NOT happen with "msttcorefonts"?
Without any bugdoc, screenshot or PDF export I have to speculate: If a document requires e.g. "Arial" and this font is not available on this system then a different font gets selected. If this surrogate font is not absolutely identical to the original font (which is the usual case) and has different line metrics, then the resulting layout will have different line metrics. @johanneseva: Could you attach a very short document which has the problem and the the two resulting PDFs? One without corefonts installed and one with corefonts installed.
Sorry to respond that late - next time it will be faster! Anyway, here are 2 pdfs, one with msttcorefonts installed, one without. And the corresponding .odt file, which remains the same in both case! The difference in Layout is *huge* - and makes OOo seriously unusable if you have many documents to import and don't know that you have to install msttcorefonts to solve the problem. I don't know if this is relevant: In both case (msttcorefonts installed or not) OOo shows Times or Arial as font name. However before installing the msttcorefonts package for the first time (fresh Ubuntu or Mint install), the police shown by OOo was "arial" instead of "Arial". (maybe a hint showing that OOo does not find the real Arial font.) If I can help next time, I'll try to answer faster - sorry for my English once more...
Created attachment 51193 [details] Issue 85394 OOo 2.3 Line spacing bug test document
Created attachment 51194 [details] Correct line spacing with msttcorefonts installed
Created attachment 51195 [details] Wrong line spacing without msttcorefonts installed
The latest attached file shows that the non-available Arial got replaced by Nimbus SansL. Is there another font on that system that would have been a better substitute (with better similarity, especially better matching metrics)?
You're absolutely right, the Arial and Times fonts were replaced through their Nimbus equivalent, Nimbus Roman No9 L and Nimbus Sans L which have definitely very different metrics. Especially line spacing is far bigger, but the metric is overall very different. So I tried some fonts. PERFECT MATCH: Liberation Sans (and Liberation Serif for "Times") The metrics are really the same! And Red Hat's Liberation Fonts are GPL! APPROXIMATE MATCH: MgOpen Moderna & FreeSans (both have the same metric, smaller line spacing than Arial does) VERY APPROXIMATE MATCH: BitStream Vera Sans or DejaVu Sans (both have the same metric, bigger line spacing than Arial does) VERY POOR MATCH: Nimbus sans L (far bigger line spacing than Arial does) As these are all font familys, it would be great to replace the matching for Arial, Times and Mono/Courier. I would of course recommand to replace all the matching by the Liberation font family, as they are more than GPLed. (GPL + Font exception to make them even "more" free!) Are they stoppers for this idea? I hope this great problem for OOo & Linux can be solved! PS. See this small article on this topic: http://www.press.redhat.com/2007/05/09/liberation-fonts/ PPS. I'm not a Red Hat fanatic or anything, I just tried these fonts today and they seem to be a really great equivalent to MS fonts, AND a "free" solution to this problem!
Some more links for this topic: http://fischer.org.za/bl0g/2007/05/23/font-vs-font/ http://robitaille.wordpress.com/2007/05/12/liberation-fonts/ There are many more forums discussing this issue, and many of them speak about line spacing problems... A version of the Liberation Fonts with font hinting should be released oficially soon. Unofficially: https://bugzilla.redhat.com/show_bug.cgi?id=427791 Shall the issue status be changed to confirmed?
OOo 2.4 will have a much better integration of the Liberation fonts (#151427#), so I'm changing the status to WORKSFORME, please verify in OOo 2.4 Also see issue 85106 about interesting opinions regarding the free-ness of these fonts.
Closed, should work with OO 2.4. Try out with currently available OO 2.4 dev build OOH68m6.
Created attachment 51481 [details] OOo 2.4 without msttcorefonts
Created attachment 51482 [details] OOo 2.4 without msttcorefonts
I attached a pdf showing the result with ooo-dev OOH680_m6. It's better, however, the result is still 2 pages big instead of one. Though liberation fonts are installed, there are not used. Maybe because of changes in the embedded fonts, the pdf is bigger now: 287 KB instead of 107 KB with OOo 2.3 !!! OOo 2.3 exports pdf which embedds Times-Roman Times-Bold NimbusSansL-Regu ooo-dev OOH680_m6 exports pdf which embedds NimbusRomNo9L-Regu NimbusRomNo9L-Medi DejaVuSans No trace of Liberation fonts. As replacement of msttcorefonts, FreeSans would fit better than DejaVuSans as replacement to Arial. NimbusRom still seems to be the replacement for Times New Roman. Could it be changed in favor of FreeSerif, or if it's not possible DejaVu Serif? I would be pleased to test more changes - thank you very much for the already improved version!
Ah, then probably the new fontconfig integration recommends the substitutions you noticed. Type "fc-match Arial" to see what the system's libfontconfig suggests. To test, if disabling libfontconfig assisted substitutions and using OOo's original application specific substitutions helps, please set the environment variable SAL_DISABLE_FC_SUBST before running soffice (see issue 85483 for details).
fc-match Arial with ttcorefonts: Arial-Regular.ttf: "Arial" "Normal" fc-match Arial without ttcorefonts: DejaVu-Sans.ttf: "DejaVu Sans" "Book" Honestly, I don't really understand all the "environment variable SAL_DISABLE_FC_SUBST" thing, even if I read issue 85483. Seems to be above my level... Anyway, the problem is not to resolve the bug for me - I don't care installing msttcorefonts or using OOo's original application specific substitutions with liberation fonts. The problem is for users without msttcorefonts installed (Ubuntu users by default for example) who will get their layout messed up without even knowing why!
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