Article View: net.text
Article #36bug in makedev.c (ditroff support)
From: Col. G. L. Sicherman
Date: Wed, 16 Oct 1985 15:21
Date: Wed, 16 Oct 1985 15:21
28 lines
1811 bytes
1811 bytes
["At last! My new gorilla-detector machine! They can't fool me now!"]
There's an odd and significant error in how makedev computes the wordspace
size for a font.
In troff, the word spacing is measured in thirty-sixths of an em (why?),
and the default is 12. The .ss directive alters this value.
In ditroff, the word spacing is also stored in the font tables, which
produces a conflict. Ditroff uses the table value, and interprets .ss
by adjusting the space proportionately to the initial .ss value of 12.
The makedev default is also 12 thirty-sixths (one-third) of an em. But
where ditroff always rounds its divisions, makedev truncates this one.
This discrepancy won't mess up your output, but it may make the
wordspaces a little narrower than they ought to be.
The fix, of course, is to replace makedev.c's truncated division by a
rounded division. Since the source is controlled, I won't post any of
it; you should have no trouble finding the offending statement.
The quick (?) fix is to specify "spacewidth" explicitly in all your
font tables.
--
Col. G. L. Sicherman
UU: ...{rocksvax|decvax}!sunybcs!colonel
CS: colonel@buffalo-cs
BI: csdsicher@sunyabva
Technical Details
Message-ID:
<2399@sunybcs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!rocksanne!sunybcs!colonelShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site sunybcs.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!rocksanne!sunybcs!colonel From: colonel@sunybcs.UUCP (Col. G. L. Sicherman) Newsgroups: net.text,net.bugs.usg Subject: bug in makedev.c (ditroff support) Message-ID: <2399@sunybcs.UUCP> Date: Wed, 16-Oct-85 11:21:07 EDT Article-I.D.: sunybcs.2399 Posted: Wed Oct 16 11:21:07 1985 Date-Received: Sat, 19-Oct-85 04:46:18 EDT Distribution: net Organization: Save the Dodoes Foundation Lines: 28