Everything I've seen about line spacing in Fontforge has been vague: it's application-dependent, try this, etc. I've done a few experiments and determined some facts.
To make a long story short: I concluded that I could determine line spacing by using the offsets in Font Info, OS/2, Metrics tab--as long as all the glyphs stay within the em. Start by setting all offsets and line gaps to zero. Set all three ascent offsets to the value I want. Windows obeys the "Win Ascent Offset," Mac OS X obeys the "HHead Ascent Offset," nobody obeys the "Typo Ascent Offset" (even if "Really use Typo metrics" is checked) but it doesn't hurt. Linux Mint obeys the "HHead Ascent Offset" with a little bit (application dependent) added.
I'm not interested in what determines line spacing in full featured word processors or desktop publishers where the user has full control over line spacing. I want to be able to prescribe my font's line spacing in applications where the user either has no control over line spacing or would rather not bother. That includes, specifically:
Mac OS: previewing fonts in Font Book, and default spacing in TextEdit.
Windows: previewing fonts in fontview.exe, and spacing in WordPad.
My font has an em of 1000, all ascent, zero descent, caps take the whole space from 0 to 1000. The "is offset" boxes in Font Info, OS/2, Metrics tab are all checked and so is the "really use typo metrics" box. Spacing turns out to be more OS-dependent than application-dependent.
When all offsets are zero, the bottom of each line touches the top of the next, in both Windows XP and Mac OS X El Capitan, in the applications listed above.
When I change the "line gap" to 100 in both "typo" and "HHead" something funny happens in Font Book: the specified line gap is added to both the top and the bottom of each line, so the leading in the font preview is 20 percent. In TextEdit the line gap is only added to the bottom so the leading is 10 percent. I decided not to use "line gap."
Then I tried setting the "ascent" offsets to 100 either one at a time or in various combinations and reached the conclusion I described above.
If anybody knows anything that either confirms or contradicts these conclusions please reply. I will add a reply if I get any further information. For instance, how is the spacing affected by glyphs that occupy more ascent or descent than the specified offsets?
Dave, if you mean https://glyphsapp.com/tutorials/vertical-metrics -- I hadn't seen that one, but I wouldn't call it a "good" tutorial. Too much history, too much about what you should do, too much about what ought to happen and not enough about what does happen. I want to collect and verify observations of what really determines line spacing.
There is a reference to automatic calculation. Does Fontforge automatically calculate any of these parameters? If I manually set a parameter, can I reenable automatic calculation? If I change a glyph, when does Fontforge recalculate?
The tutorial says Windows supposedly uses the OS/2 values. My Windows XP doesn't, so that comment is just taking up space and distracting the readers -- unless there are other versions of Windows that do use the OS/2 values.
Something else I observed, after my first post in this thread: if there are glyphs in the font that extend beyond the specified ascents and descents, the ascent and descent numbers are ignored and the text is actually spaced to accommodate the largest glyphs. The tutorial doesn't mention that.
I want to know what really determines line spacing.