Now revealed! Secrets of line spacing in OpenOffice.org Writer

The fact that OpenOffice.org Writer is more than a word processor is an open secret. Designed to write long documents, Writer is in many ways a document processor comparable to FrameMaker, suitable for designing books and dissertations while falling short of a complete desktop publishing solution. For this reason, it includes a number of tools for tweaking lines of text, including Tools > Language > Hyphenation and the tools for adjusting character width and letter space for individual characters. However, by far the least understood of these high-end tools is Writer's ability to adjust line-spacing.

Somewhere in the transitions from a private company to Sun Microsystem's property to a free software project, exact knowledge of the line-spacing tools was lost. The central mystery is: how does Writer control line-spacing by default? Until you know, working with its line-spacing tools requires guesswork.

What follows is the results of my experiments to recreate that knowledge.


The basics of line spacing

Line spacing is one of the main tools in typography. It is defined as the space between two baselines in a body of text -- that is, between the imaginary line at the bottom of capital letters and letters like "m" or "o." Usually, typographers want enough line spacing so that letters that have ascenders (strokes that extend above the height of "m" or "o" such as "b" or "d"), or descenders (strokes that fall below the bottom of "m" or "o" such as "g" or "y) do not interfere with legibility. At the same time, if the line spacing is too great, the body of text is hard to read.

Because line spacing is so important in typography, specialized terms have gathered around it. Like typefaces, line spacing is usually measured in points (one point is about 1/72nd of an inch). Since both typeface size and line spacing are usually thought of together, a standard notation has evolved to express them. For instance, text set in 12/14 uses a 12 point font with 14 points of line spacing.

Text in which the font size and line spacing are the same -- for example, 12/12 -- is "set solid" and relatively rare. More often, text is easier to read if the line spacing is greater than the font size. Technically, the amount of line spacing that is greater than the font size is called "leading," after the practice of inserting strips of lead between lines to increase spacing in manual typesetting. However, at times, all line spacing is referred to as leading, which can cause some confusion. For example, when the line spacing is less than the font size, the text is said to have "negative leading."

Word processors and desktop publishing program usually handle leading automatically, with simpler software offering only single, double, or one and a half spaces. For many uses, these defaults are adequate, just as the on-the-fly hyphenation of such programs is. However, if you are really interested in improving the look of your documents, you'll frequently want to set line spacing yourself.

According to Robert Bringhurst, in The Elements of Tyopgraphic Style, one of the main references for typographical standards and practice, you should consider increasing line spacing for :

  • longer lines of text (in other words, text in one-column pages needs more line spacing than when it is in two-column pages)
  • typefaces both larger and smaller than 10-12 points (larger ones need relatively more leading, while smaller ones are harder to read without relatively more leading)
  • darker typefaces (not just bold weights, but ones that appear darker than other fonts for any reason)
  • large-bodied typefaces (ones in which letters like "o" are relatively high compared to ones like "b")
  • typefaces with vertical axises (which means than elliptical or italic fonts, both of which are sloped,generally require less line spacing)
  • most sans serif typefaces (serifs are fonts that have a hook or foot at the end of ascenders and descenders, as in Time Roman)
  • any text that regularly uses superscript or subscript characters, capital letters, or different sizes of type

I have altered Bringhurst's terminology to make his rules easier for average readers to understand. But the point is, if you care about the finer points of document design, the default line spacing offered by many programs is often not optimal. In some circumstances, it can be downright ugly. A very common problem is the default line spacing for small font sizes, which tend to be too small in many programs for easy reading.


Choosing Writer's line spacing options

Writer's line spacing options are available from the Indents and Spacing tab of a paragraph style or the window that opens when you select Format > Spacing from the menu. The line spacing combo box on the tab offers seven choices: Single, 1.5 lines, Double, Proportional, At Least, Leading, Fixed.

The first three sound simple enough -- until you realize that you have no idea what measurement they represent. In some programs, automatic line spacing proceeds in a pattern. One common pattern is to add 2 points of leading to typeface sizes of 10-14 points, and 3 points to typefaces of 15-18 points. Another pattern is to make all line spacing 120% of the typeface size. Unfortunately, nothing in OpenOffice.org help indicates what pattern Writer uses. Not only do you not know exactly what you are doing when choosing these three settings, but you are equally ignorant of what you are choosing with Proportional, which sets line spacing as a proportion of Single, as well as with Leading, which adds extra points to Single.

The clue to Writer's pattern comes when you choose Fixed, and a default appears. However, this default only varies if you are using one of the pre-existing paragraph styles in Writer. With a pre-existing style, you will soon find that a 12 point typeface defaults to 14.2 points of line spacing, while a 20 point typeface defaults to 23 points. In other words, for pre-existing styles, Writer defaults to the first common pattern.

The trouble is, for paragraph styles you create yourself or for altered pre-defined styles, choosing Fixed always defaults to 14.2 points -- regardless of what style your custom one is based on or the actual size of the typeface. However, comparisons suggest that the same pattern is used here as well, but differences of one or two points are hard to see on screen, even when you change the vertical ruler's measurements to points. To get an accurate measurement, you need a print out and a ruler marked off in points, which is not exactly a common household item.

A more practical solution is to avoid standard line spacing choices as well as Proportional and Leading when you use custom styles. Since anyone interested in typography would probably choose this approach for all styles, it is not very onerous, and it is the only way to know precisely what you are doing.

You can set Fixed to use points up to one decimal point; otherwise, the line spacing entered is rounded up to the nearest tenth of a point. If you have a line with different font sizes in it, then you can use At Least to control line spacing around it, although an equally valid solution might be to adjust the line spacing around it manually using Fixed.


Conclusion

Based on these observations, I conclude that at least five of the choices Writer offers for line spacing are poor choices for pre-existing paragraph styles, and chancy for custom styles. In other words, the sense of choice is only illusory for typographers. Single, 1.5 lines, and Double exist largely for the non-typographer, Proportional and Leading are too imprecise for custom styles, and, when you might use At Least, you can make manual adjustments just as well with Fixed.

However, if anyone has reached a different conclusion or made different observations, I'd be interested in hearing from them. If I haven't found what is happening, maybe this is a mystery that we can crack together.

______________________

--
Bruce Byfield (nanday)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The big issue I see with

Anon's picture

The big issue I see with OpenOffice's line spacing is that single ceases being single below 10 point. For example, if you have 8 point text, it'll use single spacing for 10 point text. Even "Fixed" is useless as Fixed single spacing is "0.25". This is a hard coded minimum.

This may not seem a problem, but as many users would know, a common way for lazy people to create custom spacing in MS Word (and sadly you WILL be opening these types of files) is to create blank lines of different font size, thus using the proportional spacing as padding. In OpenOffice, these ALL show up as size 10 lines, throwing the formatting out of whack. Furthermore, should this extra whitespace ever bump a table half off the page upon import, it'll often become resized and the contents garbled.

OpenOffice's archaic line spacing is arguably the biggest impediment to its use in ANY business environment. As far as differences compared to MS Word, this ones up there with embedded table handling in magnitude.

Bugs still around in OO3 and onwards. :/

aşk şiirleri

Anonymous's picture

If you drop the ttf files into your "$HOME/.fonts" directory, it should just work. At least it does on a Debian system.

Great technical info

Anonymous's picture

OxygenOffice pro 2.4 uses Fixed in .01" increments so is not completely equivalent to .1pt, and although the above article suggests that 10pt fonts would be 12pt spacing, it doesn't give as much technical info on 1.5 line spacing. If you assume 1.5 = 18pt and 18pt = .25", you find that is close, but not entirely accurate. Even so, I was able to find a more suitable Fixed spacing for my purposes thanks entirely to this article!

OO line spacing problems between Linux and Windows?

Yves's picture

To whoever has a problem of line spacing between Linux and Windows...

Context You create a OO doc on Windows, open it on Linux (or the other way around)

Symptoms Line spacing is different - usually bigger on the 2nd platform

First idea the font is displayed in the Formatting toolbar... Hmmm maybe a bug in OO?!

While actually Most likely the font you are using on one system is not installed on the 2nd one. You can check that easily from the fonts drop-down list: while the font is displayed as-is, it is not present in the list... not installed.
It happened to me: Times New Roman was not installed on Ubuntu ; line spacing appeared very weirdly. After I installed 'msttcorefonts' the document (after reloading) was perfect!

Line Spacing wrong under Linux (Writer)

Johannes's picture

Merci Yves!!! You solved a Problem I had for month under Ubuntu 7.10 Gutsy Gibbon and Linux Mint 4.0!
The far too big line spacing problem can really be solved installing the msttcorefonts package:

sudo apt-get install msttcorefonts

No I don't have to run OOo within an XP Virtual Machine anymore :)

Line spacing bug

Johannes Eva's picture

Though it can be solved installing msttcorefonts, I reported the line spacing bug:
http://www.openoffice.org/issues/show_bug.cgi?id=85394
and
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/126784

I think ...

Gebrauchtwagen's picture

... the line spacing is amazingly difficult. So much fuss about a simple problem ;-)

We think this is an

Home Refurbish Course's picture

We think this is an inspiring article.

nice

desibaba's picture

The openoffice tutorial was nicely written and quite easy to understand..

bruce you are an angel!

Brendah's picture

you just saved me ugly spacing and lots of paper...

Almost one year to late :9I

Prepaid's picture

Almost one year to late :9

I used oo to write my dissertaion because of the very easy way to format the text (an not this ugly fight with word autoformat) and the pdf-creator and it works fine ^^

openoffice

Greece Hotels's picture

The PDF creator is priceless to me. I actually purchased a copy of Adobe Acrobat on ebay a while back, and never even installed it yet, as the PDF creator in OpenOffice does everything I need.

IMHO, line spacing is often

Fest3er's picture

IMHO, line spacing is often subjective. I typeset the DHRA rulebook (http://www.dhraonline.com/?GROUP=main&PAGE=rules) using OO on Linux; it is formatted at 8.5x11 and printed 2-up, booklet-style. Except in rare occasions, I use single spacing, because it looks best in print, although it can look rather ugly on-screen. I usually will zoom in 300%-600% to see 'how it looks'. As the Moody Blues sang, it's a question of balance.

That said, there is a problem with OO's line spacing: on Windows. When I open the Linux-formatted document in Windows, the document 'mysteriously' grows several pages. It took a while to find the problem. OO on Windows increases the line spacing. I have to set it down to about 95% to be the same as displayed and printed on Linux. Contrary to some suggestions, it isn't the font, since I use the exact same font files on both platforms, and the horizontal letter and word spacing is identical. And I use only Arial and Times New Roman. Don't ask me why this disparity exists; I'm merely an observer. :)

One thing OO doesn't do, and probably should be added as a feature, is vertical filling, ala Interleaf. If you DL the rulebook, you'll notice that a lot of pages have empty space at the bottom; I'd love to have a feature that would expand inter-folio space to fill the page.

Line spacing (leading) is one of the many things one needs to learn to properly typeset text. The much larger problem is the default pre- and post-folio spacing. A (sub)heading should be closer to the text it is heading than to the previous text; it's a visual cue for the reader. A heading that sits exactly between two paragraphs just looks ugly; move it down 4 points or so, and its meaning becomes much more obvious; the whole thought is grouped together better. I think it's called 'making effective use of white-space.'

When text is well-written and -composed, precise line spacing becomes less important, because the reader will want to read it, and will make allowances for minor typesetting flaws. Poorly-written thoughts can be made to look beautiful on-screen and in print, but will still be a chore to read.

OO's done me just fine, and far better than MS Word ever could. In a few more years, OO will be as good as Interleaf was 15 years ago; as it is, it's pretty close right now. It may even be better in some respects. With Interleaf, I almost always had to decrease the leading to achieve a 'coherent' look; the default had entirely too much leading. With OO, the only time I mess with leading and inter-character spacing is when I'm working on multi-column flyers and brochures, to achieve 'unique' art/advertising appearances. Otherwise, OO's default spacing on Linux is generally fine.

Windows and fonts

Janis's picture

=====
hat said, there is a problem with OO's line spacing: on Windows. When I open the Linux-formatted document in Windows, the document 'mysteriously' grows several pages. It took a while to find the problem. OO on Windows increases the line spacing. I have to set it down to about
=====
I noticed this behaviour even in MS Word about 10 years ago and the reason was simple and hidden in Windows printing system - printer drivers. I noticed it when i had to print one important document with some specific layout on another computer having different printer. I had to re-do the layout of document once more.
On the contrary, Linux printing system is not driver-dependent, at least - in so exagerrated manner as Win does.

Anyone can test this behaviour by using some inkjet and laser printer drivers on the same computer under Win - long text layout will be different for each of printers.

Janis

LyX is your solution!

abdel's picture

Hi there,

If you really care about line spacing and proper section placements, LyX is your solution. LyX (www.lyx.org) has all the power of LateX but comes with a pretty face.

Thank you LyX informations.

Torres's picture

Thank you LyX informations. But my comments don't appear :( What can I do for this ?

LyX

linux user's picture

LyX is cool but I takes days just to learn it. OO.o is a lot easier to start.

Compatibility and "leading spaces"

xopherh's picture

The issue with Windows might be due to different settings in the "Compatibility" secion. Go to Tools-->Options. Under "Openoffice.org" select "Compatibility." Then make sure you un-check "Do not add leading (extra space) between lines of text." Then make sure it is set the same in both Windows and Linux.

From the Help:

Do not add leading (extra space) between lines of text
Specifies that additional leading (extra space) between lines of text is not added, even if the font in use contains the additional leading attribute.
In text documents created by OpenOffice.org 2.1, the additional leading is used by default. In documents created by OpenOffice.org prior to version 2.1, the additional leading is not used.

Truely identical

Stephan Gromer's picture

Are you sure that your fonts are truely identical on both systems?
The Times New Roman and Arial fonts provided with at least with Windows XP is NOT identical with the mscorefonts package commonly used on Linux and a potential cause of such trouble.

You need help???

Rabbitz's picture

You need help???

Re: IMHO, line spacing is often

Anonymous's picture

When you're using Arial and Times New Roman (both Windows proprietary fonts) on your Linux system is it really physically the same font as the one you're using on Windows ? Maybe the font is represented by OpenOffice.org's feature for automatic font replacement. Take a look at your fontlist and search for those fonts (xlsfonts|grep "Times New Roman" or xlsfonts|grep "Arial") to make sure they really exist.
The configuration file /share/registry/data/org/openoffice/VCL.xcu contains the application wide font replacement list. If something is changed within the dialog /tools/options/fonts then changes are written into the corresponding user layer configuration file in the .openoffice2 directory in your home dir.

font

linux writer's picture

OO.org works much better with windows true type font installed on my fedora core 6, font spacing lines a lot better.

Windows TTF?

mobilfunk's picture

How did you get Windows TrueType Fonts on your Fedora engine? I tried it on my Ubuntu, but i gave up...

Installing fonts...

Tachyon's picture

Simple, browse with Konqueror to the directory where you DL'd the font.
Right click on the font's icon and choose 'Install', choose system wide in the popup and enter the root password (or otherwise install for your user only).
Done. Font installed.

Oh wait, Fedora, heh you're on your own. Above is for Suse.

If you drop the ttf files

Anonymous's picture

If you drop the ttf files into your "$HOME/.fonts" directory, it should just work. At least it does on a Debian system.

Doesn't know about Fedora,

Anonymous's picture

Doesn't know about Fedora, but to install MS True Type fonts on Debian (it should also work with Ubuntu then, given its Debian foundation), just install the msttcorefonts package:
aptitude install msttcorefonts

It'll download the fonts and install them automatically.

fontconfig

Marius Gedminas's picture

But surely OpenOffice.org uses fontconfg, like all modern applications. In that case xlsfonts is irrelevant and the thing to check is fc-match Arial.

I use Openoffice only for

Artem's picture

I use Openoffice only for creating PDF files. It's others options are useless for me.

Anonymous's picture

http://www.openoffice.org/issues/show_bug.cgi?id=60945
Check this.
This bug has 2-3 years history.
I desperatly waiting OOo 2.2 to finaly fix it!

Vadim V. Balashoff

none sense

yzah's picture

it cant help

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState