Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
nulldevice & charpath: rounding and other oddities
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jdaw1  
View profile  
 More options Feb 14 2007, 10:16 pm
Newsgroups: comp.lang.postscript
From: "jdaw1" <jdawise...@gmail.com>
Date: 14 Feb 2007 19:16:05 -0800
Local: Wed, Feb 14 2007 10:16 pm
Subject: nulldevice & charpath: rounding and other oddities
In trying to pin down an error caused by nulldevice, I did the
following test:

%!

/HelveticaNeue-CondensedBold 24 selectfont

/stringtotest ( K.W.V. ) def

gsave
(plain) =
newpath 0 0 moveto
[ 0 0 0 0 0 0 ] defaultmatrix setmatrix
stringtotest true charpath flattenpath pathbbox = = = =
grestore

gsave
(nulldevice) =
nulldevice
newpath 0 0 moveto
[ 0 0 0 0 0 0 ] defaultmatrix setmatrix
stringtotest true charpath flattenpath pathbbox = = = =
grestore

() =
(Programmer's checks:) =
(countdictstack =       )     dup 17 countdictstack     (      ) cvs
putinterval =
(countexecstack =       )     dup 17 countexecstack     (      ) cvs
putinterval = % countexecstack array execstack {==} forall
(pstack start) = pstack (pstack end) =

which via Mac OS X Distiller 7.0, produced the following log:

plain
17.1
65.28
-0.0600281
6.96002
nulldevice
17.0
65.0
0.0
7.0

Programmer's checks:
countdictstack = 3
countexecstack = 11
pstack start
pstack end

Please, why the rounding? And are there other known bugs with charpath
after nulldevice?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
François Robert  
View profile  
 More options Feb 15 2007, 4:49 am
Newsgroups: comp.lang.postscript
From: "François Robert" <moc.sys...@trebor.siocnarf>
Date: 15 Feb 2007 09:49:26 GMT
Local: Thurs, Feb 15 2007 4:49 am
Subject: Re: nulldevice & charpath: rounding and other oddities
"jdaw1" <jdawise...@gmail.com> wrote in
news:1171509365.536880.49020@s48g2000cws.googlegroups.com:

> Please, why the rounding?

Firstly, the default CTM are not the same for the initial device
and for the nulldevice (for nulldevice, it is the identity by
definition).
Secondly, the path vertices are stored in device space 'pathbbox'
computes the bbox corners in device space before converting back to
user space, and your Distiller seems to round things up in device
space.
A possible explanation : If coordinates in device space incur some
rounding (maybe to the nearest device pixel would make sense ?),
the identity matrix in the null device allows to observe that right
away. In fact, an interesting experiment is to force the first
device CTM to the identity matrix and see the result.

Each interpreter is bound to produce somewhat different results
between those two devices and even the same interpreter could, when
changing the device resolution (/HWResolution array in the  
pagedevice dictionary). Vice versa, *if* device space is where
rounding occurs, and given the values you reported, your
/HWResolution array is probably [72 72], something that you can
check as well.

Now, how coordinates are stored in device space is implementation
dependent and using pixel integer coordinates is obviously not the
most accurate way of doing so. (In fact, neither the OS X 10.4
Preview "distiller" component, nor Ghostscript, nor the Windows
Distiller 7.0 have this rounding issue).

> And are there other known bugs with charpath after nulldevice?

_______________________________________________________
François Robert

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jdaw1  
View profile  
 More options Feb 15 2007, 11:34 pm
Newsgroups: comp.lang.postscript
From: "jdaw1" <jdawise...@gmail.com>
Date: 15 Feb 2007 20:34:41 -0800
Local: Thurs, Feb 15 2007 11:34 pm
Subject: Re: nulldevice & charpath: rounding and other oddities
After a nulldevice there is a bug in the bounding box of (K.) in the
typeface /HelveticaNeue-CondensedBold when distilled with Distiller
7.0 on Mac OS X, a bug that can be fixed by any of:
-- not invoking nulldevice;
-- removing the period (leaving (K));
-- distilling with Preview.

The problem is not fixed by changing the typeface.

The nulldevice command was there only for computation tidiness, so can
be deleted, but nonetheless this error is somewhat unsatisfactory.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
François Robert  
View profile  
 More options Feb 16 2007, 5:40 pm
Newsgroups: comp.lang.postscript
From: François Robert <moc.sys...@trebor.siocnarf>
Date: Fri, 16 Feb 2007 22:40:40 GMT
Local: Fri, Feb 16 2007 5:40 pm
Subject: Re: nulldevice & charpath: rounding and other oddities
In article <1171600481.718227.204...@v33g2000cwv.googlegroups.com>,

 "jdaw1" <jdawise...@gmail.com> wrote:
> After a nulldevice there is a bug in the bounding box of (K.)

Sorry, but I fail to see it in the code you posted ?

> in the typeface /HelveticaNeue-CondensedBold when
> distilled with Distiller 7.0 on Mac OS X, a bug that
> can be fixed by any of:
> -- not invoking nulldevice;
> -- removing the period (leaving (K));
> -- distilling with Preview.

> The problem is not fixed by changing the typeface.

You mean, *any* typeface (not merely other weights for the Mac's
'Helvetica Neue') would cause wrong bbox calculation (via 'charpath' +
'pathbbox') for the string (K.) but not for (K) ?
"Kerning pair" springs to my mind when mentionning that sort of
symptoms, but I don't see how it could affect a bbox calculation, since
'charpath' simulates a plain 'show' and not one of its more complex
variant ('kshow', 'ashow' etc...).
On my Mac, all HelveticaNeue-* are in a single font suitcase
(/Library/Fonts/HelveticaNeue.dfont). In Preview, the corresponding PS
font is a Type 42 (TrueType). I can only speculate here, but maybe
Distiller somehow takes into account the kerning tables (or some other
Apple Advanced Typography or OpenType table) found in those kind of
fonts (and it shouldn't) ?

> The nulldevice command was there only for computation
> tidiness, so can be deleted, but nonetheless this error
> is somewhat unsatisfactory.

________________________________________________________
François Robert

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jdaw1  
View profile  
 More options Feb 17 2007, 11:33 pm
Newsgroups: comp.lang.postscript
From: "jdaw1" <jdawise...@gmail.com>
Date: 17 Feb 2007 20:33:45 -0800
Local: Sat, Feb 17 2007 11:33 pm
Subject: Re: nulldevice & charpath: rounding and other oddities
Same problem with Distiller and /TimesNewRomanPS-BoldMT; problem goes
away using Preview.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »