180 lines
5.2 KiB
PostScript
180 lines
5.2 KiB
PostScript
%!PS
|
|
|
|
% A Proposed Logo for Linux...
|
|
|
|
% ps-hack by
|
|
% Jeff Moore (jbm@sbi.com) 13 Aug 92
|
|
%
|
|
% based on logo design by
|
|
% James P. Callison (callison@uokmax.ecn.uoknor.edu)
|
|
|
|
% Well, I said I'd give it a shot, so here it is: an attempt to describe
|
|
% callison's logo in hand-coded PostScript. It gets a little excessive
|
|
% in parts, especially where I thrash around with the color gradient
|
|
% fill, and of course I couldn't resist tweaking a little bit to please
|
|
% *my* eye; but the net result's a PostScript function which takes four
|
|
% arguments: xposition, yposition, logo-height and release-descriptive
|
|
% text. By default, it's set up to just make the background triangle a
|
|
% solid color, since the gradient fill can render, um, oddly on the
|
|
% previewers I've tried; but just change `llDoGradient' from `false' to
|
|
% `true' to switch.
|
|
|
|
% Tweakables:
|
|
|
|
/llTriangleTopRGB { 0.96 0.95 1.0 } def % These are guesses because...
|
|
/llTriangleBottomRGB { 0.4 0.3 0.75 } def% ...I'm not sure about my test...
|
|
/llBarRGB { 0.8 0.0 0.5 } def % ...output device.
|
|
|
|
/llTextRGB { 0.0 0.0 0.0 } def % Think I have this right.
|
|
|
|
/llFontFamily /Times-Italic findfont def
|
|
|
|
/llDoGradient false def % Do funky shading of triangle?
|
|
/llTriangleSolidRGB { 0.8 0.7 1.0 } def % If not, use this.
|
|
/llBarLineCap 0 def
|
|
|
|
% More tweakable relationships. Silly hack to avoid calculating
|
|
% constants which depend on llHeight more than once per logo call.
|
|
/llFigureDependantConstants { % --
|
|
/llWidth llHeight 1.17 mul def
|
|
|
|
/llBarLineWidth llHeight 19 div def
|
|
/llBarYDelta llHeight -0.48 mul def
|
|
|
|
/llBigLPoints llHeight 0.63 mul def % ...height of char < "points"...
|
|
/llInuxPoints llBigLPoints 0.415 mul def
|
|
/llRelTextPoints llBigLPoints 0.165 mul def
|
|
} def
|
|
|
|
|
|
/llFont { % points --
|
|
llFontFamily exch scalefont setfont
|
|
} def
|
|
|
|
|
|
% some rgb-triple handlers (can this be necessary?)
|
|
|
|
/rgbadd { % r1 g1 b1 r0 g0 b0 -- rsum gsum bsum
|
|
6 -1 roll % -- g1 b1 r0 g0 b0 r1
|
|
4 -1 roll % -- g1 b1 g0 b0 r1 r0
|
|
add % -- g1 b1 g0 b0 rsum
|
|
5 -1 roll % -- b1 g0 b0 rsum g1
|
|
4 -1 roll add % -- b1 b0 rsum gsum
|
|
4 2 roll add % -- rsum gsum bsum
|
|
} def
|
|
|
|
/rgbsub { % r1 g1 b1 r0 g0 b0 -- rsum gsum bsum
|
|
6 -1 roll % -- g1 b1 r0 g0 b0 r1
|
|
4 -1 roll % -- g1 b1 g0 b0 r1 r0
|
|
sub % -- g1 b1 g0 b0 rsum
|
|
5 -1 roll % -- b1 g0 b0 rsum g1
|
|
4 -1 roll sub % -- b1 b0 rsum gsum
|
|
4 2 roll sub % -- rsum gsum bsum
|
|
} def
|
|
|
|
/rgbdiv { % r g b d -- r/d g/d b/d
|
|
4 -1 roll 1 index div % -- g b d r/d
|
|
4 -1 roll 2 index div % -- b d r/d g/d
|
|
4 2 roll div % -- r/d g/d b/d
|
|
} def
|
|
|
|
/rgbdup { % r g b -- r g b r g b
|
|
3 copy
|
|
} def
|
|
|
|
/rgb1index { % rgb1 rgb0 -- rgb1 rgb0 rgb1
|
|
6 3 roll 3 copy 9 3 roll
|
|
} def
|
|
|
|
/rgbpop { % r g b --
|
|
pop pop pop
|
|
} def
|
|
|
|
|
|
% subfunctions which render assume starting at UL of logo...
|
|
|
|
/llDrawTriangle { % --
|
|
llDoGradient {
|
|
% Never tried this color stuff before. This may be stupidly
|
|
% complicated and expensive for the job... We're trying to
|
|
% tromp "linearly" through RGB color-space between the
|
|
% supplied endpoints. If hue changes, this seems to cause
|
|
% color-banding with the previewers I've tried; and successive
|
|
% FP additions result in errors by end...
|
|
|
|
% (keep some variables in lieu of stack machismo:)
|
|
/lltYStep 0 1 idtransform exch pop def % device Y unit in user coords
|
|
/lltXStep lltYStep neg llWidth mul llHeight div 2 div def
|
|
/lltSliceWidth llWidth def
|
|
lltYStep neg setlinewidth 0 setlinecap
|
|
|
|
llTriangleTopRGB llTriangleBottomRGB rgbsub % rgbdelta
|
|
llHeight lltYStep div % rgbdelta -- rgbdelta numdivs
|
|
rgbdiv % rgbdelta numdivs -- rgbstep
|
|
|
|
llTriangleTopRGB % rgbstep -- rgbstep toprgb
|
|
0 lltYStep neg llHeight {
|
|
pop
|
|
gsave
|
|
rgbdup setrgbcolor % rgbstep thisrgb
|
|
/lltSliceWidth lltSliceWidth dup 0 rlineto stroke lltXStep dup add sub def
|
|
grestore
|
|
lltXStep lltYStep rmoveto
|
|
rgb1index rgbadd % rgbstep thisrgb -- rgbstep nextrgb
|
|
} for
|
|
rgbpop rgbpop
|
|
} {
|
|
% Just punt with a single color
|
|
llWidth 0 rlineto
|
|
llWidth -2 div llHeight neg rlineto
|
|
closepath
|
|
llTriangleSolidRGB setrgbcolor fill
|
|
} ifelse
|
|
} def
|
|
|
|
/llDrawBar { % --
|
|
llBarLineCap setlinecap
|
|
0 llBarYDelta rmoveto
|
|
llBarRGB setrgbcolor llBarLineWidth setlinewidth
|
|
llWidth 0 rlineto stroke
|
|
} def
|
|
|
|
/llDrawLogo { % llx lly height reltext --
|
|
|
|
/llReleaseText exch def % llx lly height reltext -- llx lly height
|
|
/llHeight exch def % llx lly height -- llx lly
|
|
moveto % llx lly --
|
|
|
|
llFigureDependantConstants
|
|
|
|
gsave llDrawTriangle grestore
|
|
gsave llDrawBar grestore
|
|
|
|
% big fat "L"
|
|
llWidth 0.13 mul llBarYDelta llBigLPoints 0.190 mul sub rmoveto
|
|
llBigLPoints llFont
|
|
llTextRGB setrgbcolor
|
|
(L) show
|
|
|
|
% scribble in release text
|
|
gsave
|
|
llRelTextPoints dup llFont
|
|
dup -0.09 mul exch 0.1 mul rmoveto % nestle against L; raise baseline a hair...
|
|
llReleaseText show
|
|
grestore
|
|
|
|
% "INUX" (sorry, I like it better when it doesn't dangle outside triangle...)
|
|
llBigLPoints -0.32 mul llBigLPoints 0.25 mul rmoveto
|
|
llInuxPoints llFont
|
|
(INUX) show
|
|
|
|
} def
|
|
|
|
|
|
% Do it!
|
|
100 700 190.9 (RELEASE 0.97) llDrawLogo % approx size, pos as supplied by callison
|
|
% 40 675 450 (RELEASE 0.97) llDrawLogo % big 'un
|
|
270 250 80 (RELEASE 1.0) llDrawLogo % A Goal
|
|
|
|
showpage
|