groff
[Top][All Lists]
Advanced

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

Re: [Groff] grn independent from device


From: Daniel Senderowicz
Subject: Re: [Groff] grn independent from device
Date: Sun, 20 Feb 2000 13:48:10 -0800 (PST)

Werner,

        while adapting grn to the groff layout, I've detected that grn is
        dependent on the device's resolution to set the line thickness.
        
        Two questions:
        
          . Is it possible to make grn independent from the output device,
            similar to pic?
        
          . If not, why is `256' the lower limit to make the default line
            thickness values dependent on the resolution (this behaviour is
            not documented, BTW)?

The code that you see in main.c:

        /* Correct the brush thicknesses based on res */
        if (res >= 256) {
                defthick[0] = res / 256;
                defthick[1] = res / 256;
                defthick[2] = res / 16;
                defthick[3] = res / 256;
                defthick[4] = res / 256;
                defthick[5] = res / 64;
        }

is an attempt to make the line widths device-independent. It
means that if the resolution is less than 256 use the default
values for defthick that are:

int     defthick[STYLES] = {  1, 1, 5, 1, 1, 3  };

that as you can see are close to it would result from the
division of the lower resolution devices.

In other words I didn't want to penalize the higher resolution
devices in terms of a good rendition of different line widths.
One could use the lowest resolution display (devX75-12/DESC) as
a reference value so all the line widths are identical, but
again I don't see that as being practical. But if you have a
different idea let me know, and I figure something out.

Regards,

Dan



reply via email to

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