drstrip@intvax.UUCP (David R. Strip) (02/26/91)
My earlier request for logos to use with a cassette labeling program did yield the dolby symbol, but not a CD one. So I went to work at it. Here is the metafont source for both. The cassette macros should be appearing at the same time in a different posting. DOLBY.MF %This dolby symbol was originally written by amgreene@mit.edu. %I have hacked on it a bit, eliminating a few unnecessary lines %and providing a variety of sizes of the logo. % David Strip, drstrip@cs.sandia.gov % %Here's a dolby symbol, courtesy <amgreene@mit.edu> (he doesn't read %Netnews, but asked me to post this when I forwarded your article to %him...) mode_setup; font_size 10pt#; screenchars;showit; em#:=11pt#; cap#:=7pt#; % Here we go... % fontdimen 2: 0.8em#, 1.5, 1; % spaces dimens (len,stretch,shrink) def dolby = q := .1w; fill (0,0)--(w,0)--(w,h)--(0,h)--cycle; unfill (q,q){right}..(.5(w-2q),.5h){up}..(q,h-q){left}--cycle; unfill (w-q,q){left}..(.5(w+2q),.5h){up}..(w-q,h-q){right}--cycle; enddef; % beginchar("D",em#,cap#,0pt#); "Dolby Logo"; dolby; endchar; em#:=1.2em#; cap#:=1.2cap#; beginchar("E",em#,cap#,0pt#); dolby; endchar; em#:=1.2em#; cap#:=1.2cap#; beginchar("F",em#,cap#,0pt#); dolby; endchar; em#:=1.2em#; cap#:=1.2cap#; beginchar("G",em#,cap#,0pt#); dolby; endchar; em#:=1.2em#; cap#:=1.2cap#; beginchar("H",em#,cap#,0pt#); dolby; endchar; % end. % -------------------------------------- And here's the cd logo. -------------------------------------- %Here is some mf code for generating the CD logo that appears on %various locations on CDs. (Where else?) It's hardly an example of %metafont code to emulate, but it does work, at least for me. % comments, improvements, etc to drstrip@cs.sandia.gov %When you have run this through metafont, the logo will appear as a %single character in the font. It will appear several times at %different sizes if you run the file as it is. mode_setup; %cd logo %our basic unit of measure s#:=pt#/2; define_pixels(s); %This is the word disc in big outline letters def disc = pickup pencircle scaled 1.25s; a:=27.5s; %roughly speaking these are a baseline, baseline+x_ht, and b:=47.5s; %baseline+cap_ht c:=55s; %The big outlined d (written in a gross way) z1=(23.5s, a); z2= (23.5s, c); z3= (18s, c); z4= (18s, b); z5 = (12s, b); z6 = ( 8.5s, 44s); z7 = (8.5s, 31s); z8 = (12s, a); z9=( 18s, 32s); z10=(18s, 42.5s); z11=(16s, 44.5s); z12=(14s, 42.5s); z13=(14s, 32s); z54=(16s, 30.5s); draw z1--z2--z3--z4--z5{left}..z6{down}--z7{down}..z8{right}--z1; draw z9--z10..z11..z12--z13..z54..z9; %The big i z14=(32.5s, a); z15=(32.5s, b); z16=(27s, b); z17=(27s,a); draw z14--z15--z16--z17--cycle; %The big s (Here we show a little of metafont's power to balance things % automagically) y27=y28=a; y26=y25=y27+5s; y24=y26+1.25s; y22=y23=y25+2.5s; y31=y32=y22+5s; y33=y31+1.25s; y34=y35=y31+2.5s; y18=y19=y34+5s; y20=y19-3.5s; y21=y22+3.5s; y30=y31-3.5s; y29=y28+3.5s; x20=x21=x26=x27=36.5s; x19=x22=x20+3.5s; x33=x20+5s; x34=x32=x33+1.25s; x23=x25=x24-1.25s; x24=x29-5s; x28=x31=x18-3.5s; x18=x35=x29=x30=49.5s; draw z18--z19{left}..z20{down}--z21{down}..z22{right}--z23{right}..z24{down}.. z25{left}--z26--z27--z28{right}..z29{up}--z30{up}..z31{left}--z32{left}.. z33{up}..z34{right}--z35--cycle; %penlabels(18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35); %The big c (back to crude mode) z36=(66.5s, 40s); z37=(66.5s, 44s); z38=(63s, b); z39=( 56s, b); z40=(52.5s, 44s); z41=(52.5s, 31s); z42=(56s, a); z43=(63s,a); z44=(66.5s, 31s); z45=( 66.5s, 36s); z46=(61s, 36s); z47=( 61s, 32s); z48=( 59.5s, 30.5s); z49=(58s, 32s); z50=(58s, 43s); z51=( 59.5s, 44.5s); z52=(61s, 43s); z53=( 61s, 40s); draw z36--z37{up}..z38{left}--z39{left}..z40{down}--z41{down}..z42{right}-- z43{right}..z44{up}--z45{up}--z46--z47{down}..z48{left}..z49{up}-- z50{up}..z51{right}..z52{down}--z53--cycle; %penlabels(36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53); enddef; %This routine writes all the words around the outline letters. def compact = path c_path, a_path, a_cross_path, t_path, tt_path, d_path; pickup pencircle scaled 1.5s; a:=50.75s; b:=55.25s; z60=(30s, b-1s); z61=(28.5s, b); z62=(27s, b-1s); z63=(27s, a+s); z64=(28.5s, a); z65=(30s, a+s); c_path = z60{up}..z61{left}..z62{down}..z63{down}..z64{right}..z65{up}; draw c_path; %Here we show a tad of cleverness, reusing the c_path to make the o %This theme appears anywhere a letter is repeated, in whole or part. draw c_path..cycle shifted (6s,0); z72=(39s, a); z73=(39s, b); z74=(40s, b); z75=(41.5s, a); z76=(43s, b); z77=(44s, b); z78=(44s,a); draw z72--z73--z74--z75--z76--z77--z78; z79=(47s, a); z80=(47s,b); z81=(49s, b); z82=(50s, b-s); z83=(50s, b-2s); z84=(49s, b-3s); z85=(47s, b-3s); draw z79--z80--z81{right}..z82{down}..z83{down}..z84{left}--z85; z86=(52s, a); z87=(53.5s, b); z88=(54.5s, b); z89=(56s, a); z90=(52.5s, 51.5s); z91=(55.5s, 51.5s); a_path = z86--z87--z88--z89; a_cross_path = z90--z91; draw a_path; draw a_cross_path; draw c_path shifted (31s, 0); z98=(64.5s, a); z99=(64.5s,b); z100=(63s,b); z101=(66s,b); t_path = z98--z99; tt_path = z100--z101; draw t_path; draw tt_path; a:= 19.75s; b:=24.25s; z102=(8.5s, a); z103=(8.5s,b); z104=(11.25s, b); z105=(12.25s, b-s); z106=(12.25s,a+s); z107=(11.25s, a); d_path = z102--z103--z104{right}..z105{down}..z106{down}..z107{left}--cycle; draw d_path; draw (14.75s, a)--(14.75s, b); draw c_path shifted (-9.75s, -31s)..(20.25s, a+1.5s)--(19.5s, a+1.5s) ; draw (23.25s, a)--(23.25s, b); draw t_path shifted (-37.5s, -31s); draw tt_path shifted (-37.5s, -31s); draw a_path shifted (-22.25s, -31s); draw a_cross_path shifted (-22.25s, -31s); draw (35.75s, b)--(35.75s, a)--(38s, a); draw a_path shifted (-10s, -31s); draw a_cross_path shifted (-10s, -31s); draw (48s,b)--(48s, a+s){down}..(49s, a){right}.. (50s, a){right}.. (51s, a+s){up}--(51s, b); draw d_path shifted (45s, 0); draw (59.5s, a)--(59.5s, b); draw c_path shifted (35s, -31s)--cycle; enddef; beginchar("A",72s#,72s#,0); disc; compact; pickup pencircle scaled .5s; draw (0,0)--(0,h)--(w,h)--(w,0)--cycle; showit; endchar; s:=1.2s; s#:=1.2s#; beginchar("B",72s#,72s#,0); disc; compact; pickup pencircle scaled .5s; draw (0,0)--(0,h)--(w,h)--(w,0)--cycle; showit; endchar; s:=1.2s; s#:=1.2s#; beginchar("C",72s#,72s#,0); disc; compact; pickup pencircle scaled .5s; draw (0,0)--(0,h)--(w,h)--(w,0)--cycle; showit; endchar; s:=1.2s; s#:=1.2s#; beginchar("D",72s#,72s#,0); disc; compact; pickup pencircle scaled .5s; draw (0,0)--(0,h)--(w,h)--(w,0)--cycle; showit; endchar; end; ---------------------------------------------------- Enjoy. drstrip@cs.sandia.gov