groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] New `papersize' keyword


From: Ralph Corderoy
Subject: Re: [Groff] New `papersize' keyword
Date: Mon, 17 Jun 2002 10:38:44 +0100

Hi Werner,

> > >   o A new keyword `papersize' has been added to the DESC file
> > >     format.  Its argument is either
> > > 
> > > Please test and enjoy!
> > 
> > Looks good.  From the code it looks like any papersize entry in DESC
> > over-rides any paperheight or paperwidth entries, regardless of the
> > order they occur in.
> 
> No.  `papersize' sets both the vertical and horizontal dimension of
> the output medium, whereas `paperwidth' and `paperwidth' sets only one
> dimension.  Later entries override previous values.  So

I understand papersize sets both width and height, whereas the older two
commands only set one of those each.

Am I looking in the right place?  src/libs/libgroff/font.cc's
font::load_desc()?  It reads through the DESC file setting paperwidth,
paperlength, unscaled_paperlength, and unscaled_paperwidth as it comes
across commands.  But then at the end, in the normal flow of control
path, it does

    paperwidth = int(unscaled_paperwidth * res + 0.5);
    paperlength = int(unscaled_paperlength * res + 0.5);

Thinking about it a little more, unscaled_* would be un-initialised
unless a papersize command was present.

Where am I going wrong?

Cheers,


Ralph.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]