Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!sri-spam!ames!amdahl!kim From: kim@amdahl.amdahl.com (Kim DeVaughn) Newsgroups: comp.sys.amiga Subject: "repfont" source and executable (ref: BlitzFonts postings) Message-ID: <6685@amdahl.amdahl.com> Date: Mon, 18-May-87 02:21:25 EDT Article-I.D.: amdahl.6685 Posted: Mon May 18 02:21:25 1987 Date-Received: Mon, 18-May-87 06:41:35 EDT Organization: Amdahl Corporation, Sunnyvale, CA 94086 Lines: 514 Keywords: repfont test fonts replace blitzfonts fastfonts [ For all you do ... this line's for you ... ] Attached is a shar of the "repfont" program that I mentioned in the discussion of BlitzFonts/FastFonts. I downloaded this from the Lattice support BBS, and have successfully used it under the released 1.2. Also included a a couple more fonts that were done by the program's author, Eric . The fonts are quite nice ... alot like the "pearl.font" that Mike Portuesi posted, and which I find preferable. BTW, if anyone has a complete IBM PC font (or even a partial one), I'd really appreciate a copy. WARNING: The program itself is called "test" and does some hacking of the System Font List. Some applications may not appreciate or tolerate this, so BEWARE ... this should be treated as EXPERIMENTAL HACKER CODE, and may cause a Guru when you least expect (and want) one!!! You have been warned. A final note: the file "ericbd.font.uu" should really be "ericbd.font.uue", however due to UNIX(R) SysV braindamage, file names can only be 14 characters long ... grrrrrr! It'll still uudecode OK though ... There should be a .signature at the end of this ... if not, you didn't get it all! /kim # This is a shell archive. Remove anything before this line, then # unpack it by saving it in a file and typing "sh file". (Files # unpacked will be owned by you and have default permissions.) # # This archive contains: # 8.uue 8b.uue README README.TOO ericbd.font.uu erics.font.uue install test.c test.uue echo x - 8.uue cat > "8.uue" << '//E*O*F 8.uue//' begin 755 8 M #\P ! $\ #Z0 3QP $YU , M !H/@ ! M , !H !( " !# @ !@ ! @?@ &X 8 VX M (2$0( #@8"! (\$#P\#'X$Y^$ @X($)&0GQ"?#@00A1"$#@0(! $1 M D) 0D(X0GP0!$@0JD)"0D)"0!!"0I)$0@1P$ X ( /X"()0 ( 08$ M "!2$# "?@)""$(" @ 0(7GY"0$) 0$)"$ @H($)"0D!"2 000A1:*! @ M( @$ /D) 0GX@0D(0!'@0DD)"0D) /!!"0I(X0@@0$ @ $1\1(P M$ AF$! &$!B$$!"!$)""$($$! 0?@@ 0$)"1$1 0$)"$$@D($)")$ D1$(0 M0@A^1!! ( 0$ 0D) 0D @/$(0!$00@D)"?#Y A!")$1$)! 0$ @ ( M $0(A'8 "! ! &( \?GX\!#P\"#PX$! ( ! (.$)\/'A^0#Y"?'@B/$)" M&$ <0CP0/ A"@A!^/ (\ /GP\/CP@ D(X1$(X@D(\0 ) ?! ^&$2"&'X. M$' " " M " /\ / / 0 ( M < @ " ( ! " 8 @ ( ( "@ " P @ . ( $ M" !( @ 4 ( %@ " !@ @ : ( ' " !X @ @ ( (@ " "0 @ F ( M * " "H @ L ( +@ " # @ R ( - " #8 @ X ( .@ " #P @ M^ ( 0 " $( @!$ ( 1@ " $@ @!* ( 3 " $X @!0 ( 4@ " %0 M @!6 ( 6 " %H @!< ( 7@ " & @!B ( 9 " &8 @!H ( :@ M" &P @!N ( < " '( @!T ( =@ " '@ @!Z ( ? " 'X @" ( M @@ " (0 @"& ( B " (H @", ( C@ " ) @"2 ( E " )8 @" M8 ( F@ " )P @"> ( H " *( @"D ( I@ " *@ @"J ( K " *X M @"P ( L@ " +0 @"V ( N " +H @"\ ( " #[ 0 ; #@ $0 !< 8@ /R end //E*O*F 8.uue// echo x - 8b.uue cat > "8b.uue" << '//E*O*F 8b.uue//' begin 755 8b M #\P ! $\ #Z0 3QP $YU , M !H/@ ! M , !H !( " )# @ !@ ! @?@ &X 8 VX M 8;&8, #P<#G ,^'#X^#G\>?SX^ , # ^/!Q^/GQ_ M?S]C?C\S,&-S''X 8 /]@-F0X>!X<& QG? ,#-GY@ V-C M&!@P?@P#!YC&!@ '&!C#& #!F-C#&,&&!@8?A@ 0&-C8&9@8&-C&&PV,&-C-F V9F,8 M8QAW9AA@_ 8_ 9F-@8V!@/V,8!F888V-F?C]@ QAF-G\V-C 8& P 8 M &8,8W\ /GP !@ ', ^#'\^!CX^##X\&!@, # ,.&-^/GQ_8#]C?GPS/F-C M'& >8SX8/AACPQA^_ ,_ /\ ?WX^/SY@ V,89F888V,\8 -@?AA^'&-C''X/ M&'@ #G # # M # /P /@ 8 , M > @ " ( ! " 8 @ ( ( "@ " P @ . ( $ M" !( @ 4 ( %@ " !@ @ : ( ' " !X @ @ ( (@ " "0 @ F ( M * " "H @ L ( +@ " # @ R ( - " #8 @ X ( .@ " #P @ M^ ( 0 " $( @!$ ( 1@ " $@ @!* ( 3 " $X @!0 ( 4@ " %0 M @!6 ( 6 " %H @!< ( 7@ " & @!B ( 9 " &8 @!H ( :@ M" &P @!N ( < " '( @!T ( =@ " '@ @!Z ( ? " 'X @" ( M @@ " (0 @"& ( B " (H @", ( C@ " ) @"2 ( E " )8 @" M8 ( F@ " )P @"> ( H " *( @"D ( I@ " *@ @"J ( K " *X M @"P ( L@ " +0 @"V ( N " +H @"\ ( " #[ 0 ; #@ $0 !< 8@ /R end //E*O*F 8b.uue// echo x - README cat > "README" << '//E*O*F README//' NOTE: The program and fonts in this arc set were developed using version 1.2 beta 4. I don't know if these work under 1.1 I hope they work on other systems such as the real 1.2 release. The program contained herein permits the installation of a font to replace the default 80 column topaz font. I wanted to see if I could improve the quality of the Amiga color monitor's text output since everyone tells me its the fact that a monochrome monitor can overlap pixels that makes it look so much better. So I tried to create a font that does not have any serifs (those little curly cues on the end of letters) and was as straight as possible so the pixels would appear to overlap more. You can be the judge as to whether I was successful. The fonts that are included were built using the 1.2 fonteditor on the developers kit. You will notice that the bold font (ericbd) has extra bold [], and (), which I like when editing a program. It makes it much easier to see nested braces and parens. You may also wish to play with different colors thru preferences. Note that after running the program, only new windows and screens that call for the topaz font will use the new font. Old windows will remain using the original rom topaz font. This arc file contains: test.c | source program to replace topaz.font test | executable of above ericbd.font | a sample font (bold) 8b | the font file for above eric.font | a skinny font 8 | the font file for above install | a command file to install fonts In order to use the fonts, they must be moved to the fonts: directory, and create a subdirectory for each font file. For example, copy ericbd.font fonts: makedir fonts:ericbd copy 8b fonts:ericbd/8b copy erics.font fonts: makedir fonts:erics copy 8 fonts:erics/8 (these commands exist in a file called install in this arc) The program test, will patch into memory a font you specify on the command line: test ericbd.font will read in the font ericbd/8b and then UNLINK ALL fonts preceding the newly installed ericbd/8b font. Actually, test should be run only just after startup and before any other fonts are loaded, (or I can't say for sure if it will work properly - look at the code to see how it forces itself into the system font list). Once set, you lose a little memory and cannot go back until you reboot. You can however, run the command again on a different font before rebooting. I made no effort to be sure this code is bulletproof; I simply wanted to see how an alternate font would look. As I think about it, you had better name your font with 5 or more letters or the overwriting with topaz might corrupt something. I would like to see a preferences option in the future to allow this font change. Test.c is built using Manx with nothing special: cc test ln test.o -lc Enjoy! //E*O*F README// echo x - README.TOO cat > "README.TOO" << '//E*O*F README.TOO//' This arc (016) file contains a short C (manx) program in source and exe form that takes a CLI command: 1> test myfont.font and hacks the system font list to where myfont.font replaces the 80 column topaz.font (until you reboot). On the next window creation within a program, any window that would ordinarily use the default system topaz font, will use myfont.font instead. This is useful for changing the font used by programs for which you don't have the sources, such as a text processor or the Amiga Cli and workbench (if run before loadwb). Included is a couple of fonts that I have been playing around with. One in particular is a sans serif font I like for programming since it makes () and [] very bold. By the way, the fonteditor with the 1.2 developers kit is fantastic. I hope its there for those without a developer connection. The code to insert myfont.font is very quick/dirty so if you plan to use it for other than test purposes, it would be wise to enhance it a bit. I would like to see a PREFERENCES option for setting the default font; if you agree then please write to C. A. and ask for this in 1.3. //E*O*F README.TOO// echo x - ericbd.font.uu cat > "ericbd.font.uu" << '//E*O*F ericbd.font.uu//' begin 755 ericbd.font M#P 65R:6-B9"\X8@ M M M M G " )# end //E*O*F ericbd.font.uu// echo x - erics.font.uue cat > "erics.font.uue" << '//E*O*F erics.font.uue//' begin 755 erics.font M#P 65R:6-S+S@ M M M M G " !# end //E*O*F erics.font.uue// echo x - install cat > "install" << '//E*O*F install//' copy ericbd.font fonts: makedir fonts:ericbd copy 8b fonts:ericbd/8b copy erics.font fonts: makedir fonts:erics copy 8 fonts:erics/8 //E*O*F install// echo x - test.c cat > "test.c" << '//E*O*F test.c//' #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------- Eric's macros, makes C into modern language function is null - used so we have an easy way to search for functions ------------------------------------------- */ #define function #define then { #define els } else { #define fi } #define rof } #define elsif } else if #define or || #define and && #define z if (0==1) struct DiskfontBase *DiskfontBase; struct GfxBase *GfxBase; extern long *OpenLibrary(); extern struct TextFont *OpenDiskFont(); function main (argc,argv) int argc; char **argv; { struct TextFont *fontptr; static struct TextAttr ericfont = {(STRPTR)"ericbd.font",8L,0L,0L}; long int ecode = 0; struct Message *m1; /* travel thru structures to the name */ struct Node *n1; char *c1; if (argc < 2 ) then printf("Usage: %s fontname\n",argv[0]); exit(20l); els ericfont.ta_Name = (STRPTR) argv[1]; fi printf("replace topaz.font with |%s|\n",argv[1]); DiskfontBase = (struct DiskfontBase *) OpenLibrary("diskfont.library",0L); if ( DiskfontBase == NULL) then printf("can't open disk font library\n"); ecode = 20L; goto exiter; fi GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",0L); if ( GfxBase == NULL) then printf("can't open graphics library\n"); ecode = 21L; goto exiter; fi fontptr = (struct TextFont *) OpenDiskFont(&ericfont); if (fontptr == 0) then printf("can't open font\n"); ecode = 21L; goto exiter; fi /* printf("gfxbase = %08lx %08lx\n",GfxBase,&GfxBase->TextFonts); */ /* printf("gfxbase = %08lx %08lx\n",GfxBase,&GfxBase->DefaultFont); */ /* printf("fontptr = %08lx %08lx\n",fontptr,GfxBase->TextFonts.lh_Head); */ GfxBase->TextFonts.lh_Head = (struct Node *) fontptr; m1 = &fontptr->tf_Message; /* find name of our font */ n1 = &m1->mn_Node; c1 = n1->ln_Name; /* address of string into c1 */ /* printf("m1 = %08lx n1 = %08lx c1 = %08lx\n",m1,n1,c1); */ GfxBase->DefaultFont = fontptr; movmem("topaz.font",c1,(short)11); /* overwrite name of ericbd.font */ ecode = 0; goto exiter; exiter: /* if (fontptr) CloseFont(fontptr); leave open forever */ if (DiskfontBase) CloseLibrary(DiskfontBase); if (GfxBase) CloseLibrary(GfxBase); exit(ecode); } //E*O*F test.c// echo x - test.uue cat > "test.uue" << '//E*O*F test.uue//' begin 755 test M #\P # ( 1P S0 /I $<$ZY ! M]$Y5_^Q"K?_X#&T @ (;!PL;0 *+Q9(>@$J3KH"0E!/2'@ %$ZZ##Y83V * M+&T "BEN 2 BQM HO+@ $2'H!%DZZ AI03T*G2'H!*$ZZ$2)03RE @IY* MK(*>9A9(>@$E3KH!^EA/*WP 4__A@ "60J=(>@$K3KH0]E!/*4""HDJL M@J)F%$AZ 2A.N@'.6$\K? !7_^&!J2&R DZZ$0A83RM __Q*K?_\9A1( M>@$=3KH!IEA/*WP 5__A@0BQL@J(M;?_\ (PK;?_\__0K;?_T__ L;?_P M*VX "O_L+&R"HBUM__P FC\\ LO+?_L2'H Z$ZZ 39/[P *0JW_^$JL@IYG M"B\L@IY.NA 06$]*K(*B9PHO+(*B3KH0 %A/+RW_^$ZZ"S983TY=3G5E1>R"7K7)9@XR/ U:PAT "+"4 $*4Z"JDCG@(!.N@I44$].=4SO P !' ,"\ #+/(9@).=6,0 MT,#2P& "$R!1R/_\3G42V%'(__Q.=4Y5 O!$WL@F(I3H)>2&T #"\M A( M>@!<3KH!;$_O PX QL & 0F8@3>R"8B8L@EZ6CC\#2&R"8A8L@#](@S\# M3KH(ZE!/8"!(;( R3>R"8B8L@EZ6CC\#/SP 4AL@F).N@3P3^\ ## $*!]. M74YU3E4 "QL@EY2K()>'*T "4WL@F(F+()>EHZV? H9E ,; !@$)F($WL M@F(F+()>EHX_ TAL@F(6+( _2(,_ TZZ"'I03V @2&R ,DWL@F(F+()>EHX_ M S\\ %(;()B3KH$@$_O Q-[()B*4Z"7C M C ? #_3EU.=4Y5 !(YP@@ M)&T #@QM 0 $F8(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(PR\#3KH! EA/8!A.N@&(+RR"FDZZ ;A8 M3R M @N;(*F3G5.74YU,#Q__V $,"\ #"!O 1*&&;\4T@B;P (4T 0V5?( M__Q"(" O 1.=2!O 0@"")O @0V6;\3G4@;P $( A*&&;\D< @"%. 3G5, M[P, 0@"#(O Q@ A#95\G__%)!8 )"&%')__Q.=4Y5 !(YPX@."T "#8$ MQ_P !DWL@JXD0]7.N'P &T*N'P $VX$2I)F$#E\ .#)G#_3-\$<$Y=3G4V M*@ $QGR &8(+Q).N@ *6$]"DG 8. B+P $+&R#*D[N_]PB+P $+&R#*D[N M_X(B+P $+&R#*D[N_[@B+P $+&R#*D[N_W L;(,J3N[_RBQL@RI.[O]\(B\ M!"QL@RI.[O\H3.\ !@ $+&R#*D[N_^(L;(,J3N[_Q$SO X !"QL@RI.[O_0 M2.3N[_X@ #[ M $ @ /Q @ #\@ ^H "7 ! M/ ( P,3(S-#4V-S@Y86)C9&5F ! $ M 0$ ! $" 0 M M M M M M M M M " @(" @(" @(# P,# P(" @(" @(" @ M(" @(" @(" @D$! 0$! 0$! 0$! 0$! 0 P,# P,# P,# Q 0$! 0$! "0D) M"0D) 0$! 0$! 0$! 0$! 0$! 0$! 0% 0$! 0$ *"@H*"@H" @(" @(" @(" M @(" @(" @(" D! 0$ @ ^P ! #\0 ( 7 _( /K _(! end //E*O*F test.uue// echo Possible errors detected by \'wc\' [hopefully none]: temp=/tmp/shar$$ trap "rm -f $temp; exit" 0 1 2 3 15 cat > $temp <<\!!! 33 350 1854 8.uue 33 325 1855 8b.uue 74 510 3181 README 22 207 1136 README.TOO 9 13 392 ericbd.font.uu 9 13 391 erics.font.uue 6 16 168 install 106 325 2910 test.c 121 673 7309 test.uue 413 2432 19196 total !!! wc 8.uue 8b.uue README README.TOO ericbd.font.uu erics.font.uue install test.c test.uue | sed 's=[^ ]*/==' | diff -b $temp - exit 0 -- UUCP: kim@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,ihnp4,seismo,oliveb,cbosgd}!amdahl!kim DDD: 408-746-8462 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 CIS: 76535,25