🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.news
5 messages
5 total messages Started by Don Hopkins Fri, 14 Aug 1992 21:13
ps2bits fix
#408
Author: Don Hopkins
Date: Fri, 14 Aug 1992 21:13
154 lines
4580 bytes
> From: lwv26@cas.org (Larry W. Virden, x2487)
>
> Recently several folks have mentioned the ps2bits script, which uses OW to
> create Sun raster files.  This script works for monospace fonts like Courier
> but has horizontal spacing problems for fonts like Times-Roman.  Would one
> of you kind people be willing to take a look at the small bit of NeWS code
> and see what it is in the script which is causing the problem?  I can forward
> along another copy of the most recent version of the script to anyone
> willing to take a look at it.

> From: hull@cs.Buffalo.EDU (Jon Hull)
>
> [...] they know what the bug is and it is not in the news server but
> in the ps2bits script itself.  He also said that they aren't
> supposed to say how to fix the bug because of some problem with the
> TypeScalar license.

I looked into the problem and found a fix.  Add the following lines to
ps2bits, right before the line that says "end definepackage
beginpackage".  By the way, this is for educational purposes only,
don't actually *use* it, because certain managers at Sun don't want
you to get the most out of OpenWindows, and you might hurt their
feelings.

	-Don

	    /filepathparse {
		[ exch (:) { search { 3 1 roll } { exit } ifelse } loop ]
	    } def
	    (${OPENWINHOME}/etc/NeWS/loadmaps.ps) (r) file cvx exec

Oh hell, here's the whole fixed ps2bits script, in case you don't have it.

#! /bin/sh
# @(#)ps2bits 1.5.1 90/08/22
# ps2bits - PostScript to Rasterfile converter.
#

USAGE="Usage: `basename ${0}` [-in s] [-out s] [-dpi x y] [-size w h] [-gray | -color | -truecolor]"
OUT="pspage"
IN="%stdin"
DPIX=300
DPIY=300
XSIZE=8.5
YSIZE=11
DEPTH=1

export OPENWINHOME LD_LIBRARY_PATH
OPENWINHOME="${OPENWINHOME-/usr/xnews}"
LD_LIBRARY_PATH=${OPENWINHOME}/lib

if [ ! -f $OPENWINHOME/etc/NeWS/redbook.ps ]; then
    echo "`basename $0`: xnews is not installed correctly in $OPENWINHOME" 1>&2
    echo "	(set \$OPENWINHOME to where it is installed...)" 1>&2
    exit 1
fi

while [ ${#} -gt 0 ]; do
    case "${1}" in
	-truecolor)	shift;
		DEPTH=24
	;;
	-color)	shift;
		# Currently this gives a StaticGray colormap - I'm still
		# looking for a mechanism to get ahold of a StaticColor 
		# or PsuedoColor colormap when running -nodev
		DEPTH=8
	;;
	-gray)	shift;
		DEPTH=8
	;;
	-out)	shift;
		OUT=${1} shift
	;;
	-in)	shift;
		IN=${1} shift
	;;
	-size)	shift;
		XSIZE=${1} shift;
		YSIZE=${1} shift
	;;
	-dpi)	shift;
		DPIX=${1} shift;
		DPIY=${1} shift
	;;
	*)	echo ${USAGE};
		exit 0
	;;
    esac
done

$OPENWINHOME/bin/xnews -nodev -init "
    /beginpackage where {
	pop
	currentshared
	true setshared

	/NeWSops 50000 dict dup begin

	    /PackageType	1 def
	    /PackageName	/NeWSops def
	    /MajorVersion	3 def
	    /MinorVersion	0 def

	    initNeWSoperators
	    systemdict /initNeWSoperators undef

	    /random { rand -16 bitshift 16#7fff div } def

	    /FatalError { % string => (doesn't return)
		console exch writestring
		console flushfile
		shutdownserver
	    } def


	    /currentpacking false def
	    /setpacking { pop } def
	    (${OPENWINHOME}/etc/NeWS/basics.ps)   (r) file cvx exec
	    (${OPENWINHOME}/etc/NeWS/redbook.ps)  (r) file cvx exec
	    (${OPENWINHOME}/etc/NeWS/misc.ps)     (r) file cvx exec
	    (${OPENWINHOME}/etc/NeWS/statdict.ps) (r) file cvx exec
	    /filepathparse {
		[ exch (:) { search { 3 1 roll } { exit } ifelse } loop ]
	    } def
	    (${OPENWINHOME}/etc/NeWS/loadmaps.ps) (r) file cvx exec

	end definepackage beginpackage
	setshared
    } if

    500 dict begin	% start userdict
	false setautobind
	/bind {} def

	/showpage { copypage erasepage initgraphics } def
	/_pageno 0 def
	/copypage {
	    /_pageno _pageno 1 add store
	    (${OUT}.)
	    _pageno 100 lt { (0) append } if
	    _pageno 10 lt { (0) append } if
	    _pageno 3 string cvs append
	    clippath writecanvas
	} def

	${DPIX} ${XSIZE} mul ${DPIY} ${YSIZE} mul ${DEPTH}
	[ ${DPIX} 72 div 0 0 ${DPIY} 72 div neg 0 7 index ]
	null buildimage setcanvas
	erasepage initgraphics

	(${IN}) (r) file cvx exec
    shutdownserver
"
Re: ps2bits fix
#410
Author: Rich Berlin
Date: Sat, 15 Aug 1992 01:11
41 lines
2366 bytes
>> [...] they know what the bug is and it is not in the news server but
>> in the ps2bits script itself.  He also said that they aren't
>> supposed to say how to fix the bug because of some problem with the
>> TypeScalar license.
	
> I looked into the problem and found a fix.  Add the following lines to
> ps2bits, right before the line that says "end definepackage
> beginpackage".  By the way, this is for educational purposes only,
> don't actually *use* it, because certain managers at Sun don't want
> you to get the most out of OpenWindows, and you might hurt their
> feelings.

Every few months somebody posts about how to use OpenWindows to
rasterize PostScript; and every few months I or someone else has to
play the heavy and ask them please not to print raster files produced
with this technique IF THEY CONTAIN RASTERIZATIONS OF THE 57 FOLIO
FONTS.

With the exception of the Courier fonts (which are public domain) all
of the 57 fonts distributed with OpenWindows are licensed FOR SCREEN
USE ONLY.  The font foundries from whom these fonts are licensed feel
that users should pay separate royalties if they want to print with
them, and in fact part of the revenue from every NeWSprint license
goes to pay these extra royalties.

So there are two things every user of ps2bits should know:

(a) Sun has a legal obligation to these font foundries to protect
    their intellectual property; and

(b) because of this obligation, the standard right-to-use license for
    OpenWindows SPECIFICALLY prohibits using xnews to rasterize files
    for hard copy.

-- Rich
--
===============================================================================
Richard.Berlin@Eng.Sun.COM   |   The significant problems we face cannot be
			     |   solved at the same level of thinking we were
			     |   at when we created them.  -- Albert Einstein
Re: ps2bits fix
#411
Author: Guy Harris
Date: Sat, 15 Aug 1992 17:57
16 lines
1352 bytes
>With the exception of the Courier fonts (which are public domain) all
>of the 57 fonts distributed with OpenWindows are licensed FOR SCREEN
>USE ONLY.

What about the other fonts distributed with OpenWindows that appear to
have come from X11R4 ("-adobe-helvetica-*", "-adobe-new century
schoolbook-*", "-adobe-symbol-*", "-adobe-times-*",
"-bitstream-charter-*")?  They appear to have copyright notices that
grant "Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee", as long as you don't
file the copyright notice off, put the copyright and permission notice
in the supporting documentation, and don't use the supplier's name in
advertising without permission.

Or are the versions that come with OW *not* derived from the X11R4
versions, and *not* freely-usable in that fashion?
Re: ps2bits fix
#413
Author: Edward D. Nowotny
Date: Mon, 17 Aug 1992 20:39
43 lines
2285 bytes
In article <l8omeuINN9as@exodus.Eng.Sun.COM> rberlin@birdland.Eng.Sun.COM (Rich Berlin) writes:
>So there are two things every user of ps2bits should know:
>
>(a) Sun has a legal obligation to these font foundries to protect
>    their intellectual property; and
>
>(b) because of this obligation, the standard right-to-use license for
>    OpenWindows SPECIFICALLY prohibits using xnews to rasterize files
>    for hard copy.
>

Well, I have OpenWindows 3.0, no interest in building and installing
GhostScript, and postscript files I generate without any references
to Sun's screen-only licensed fonts.  Pageview and psh are more than
happy to render my files without complaint.  However, ps2bit prints
out the following and quits:

Error: /typecheck
Command: 'length'
Ostack: /Encoding null null
Estack:
  at: '.array_exec_cont' {/typecheck *'standarderroraction'}
  at: 'length' 'length'
  at: '.array_exec_cont' {exch dup *length array copy newfont 3 1 roll put}
  at: '.array_exec_cont' {dup /Encoding eq array{10} array{6} *ifelse}
  at: '.array_exec_cont' {exch dup /FID ne array{6} array{2} *ifelse}
  at: '.forall_magicdict_cont' font(Courier,1) {exch dup /FID ne {dup /Encoding eq array{10} array{6} ifelse} {pop pop} ifelse} ptr0x003a475c
  at: '.array_exec_cont' {... maxlength dict def basefontdict array{7} *forall newfont /FontName newname put EncVec aload ...}
  at: '.psparse_token' file('histogram.ps',R) ptr0x00021438
  at: '.psparse_token' file(?,R) ptr0x00021438
  at: '.end_exec'
Dstack:
  dictionary[4/12]
  dictionary[43/240]
  dictionary[4/500]
  package(NeWSops)
  dictionary[283/2000]

So how do I get xnews (or psh) to rasterize my postscript files?  Or is my
application also a violation of my OpenWindows license?

Ned Nowotny
ned@tcsoft.uucp
Re: ps2bits fix
#417
Author: John Edge
Date: Wed, 19 Aug 1992 22:11
35 lines
2010 bytes
> Every few months somebody posts about how to use OpenWindows to
> rasterize PostScript; and every few months I or someone else has to
> play the heavy and ask them please not to print raster files produced
> with this technique IF THEY CONTAIN RASTERIZATIONS OF THE 57 FOLIO
> FONTS.
>
> So there are two things every user of ps2bits should know:
>
> (a) Sun has a legal obligation to these font foundries to protect
>     their intellectual property; and
>
> (b) because of this obligation, the standard right-to-use license for
>     OpenWindows SPECIFICALLY prohibits using xnews to rasterize files
>     for hard copy.

The first para says not to print raster files produced from PostScript
"IF THEY CONTAIN RASTERIZATIONS OF THE 57 FOLIO FONTS" but subpara (b)
claims to prohibit it entirely.  Which am I to believe?

We have a colour raster printer and wish to be able to print PostScript
files on it (mainly from FrameMaker).  We will not be printing anything
we cant already print on our PostScript printer but hopefully we will be
able to get it in colour.

Does ps2bits work for coloured PostScript files?

What were the fixes required for ps2bits to work? (Sorry, I missed that posting)

Thanks, John.

-----------------------------------------------
John Edge, Lieutenant    edge@fossa.navy.mil.nz
Royal New Zealand Navy   voice:  +64-4-4960-735
SWEO (Communications)    fax:    +64-4-4960-311
-----------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads