Received: by FINTUVM (Mailer X1.25) id 8489; Thu, 18 May 89 18:30:46 EET
Date:         Wed, 10 May 89 09:31:39 MDT
Reply-To:     Info-Amiga List <I-AMIGA@FINHUTC>
Sender:       Info-Amiga List <I-AMIGA@FINHUTC>
From:         Stephen Vermeulen <svermeulen@JANUS.MRC.ADHOCNET.CA>
Subject:      Re: FONTs and GVP 030 Card
To:           "MATTI E. AARNIO" <FYS-MA@FINTUVM>
In-Reply-To:  Your message <890509150156.0a7@UcEdu.UCalgary.CA> dated
              9-May-1989
 
Mark,
 
     Regarding the GVP '030, I have one on order (I placed the order 6 weeks ago
 
 
     to beat the rush) and supposedly it is to be shipped this (or next)
     week.  Expect a report when I get it.  The GVP looks like being a nice
     board.  The '030 chip has 512 byte instruction and data caches so
     the speed up due to caching should be better with this than with
     an '020.  Their 8 Meg memory board runs at zero wait states (effectivly)
     by using 80ns nybble mode ram.  Unfortunately it must be populated in
     4 Meg chunks, since they are using byte-wide 1Meg simms.
 
 
     Regarding your problem with renaming fonts.  You want to use my REN
     utility on this one:
 
/*****************************************************
  ren.c
 
  This program allows one to rename the directory
  which contains the font data files.
 
  syntax:
 
     ren thisfont.font path
******************************************************/
 
#include <stdio.h>
 
char newname[256], oldname[256];
 
main(argc, argv)
int argc;
char *argv[];
{
  FILE *font;
  long j, pos;
  short i, n;
 
  if (argc != 3)
  {
    printf("ren filename.font newpath\n");
    printf("Copyright 1988 By Stephen Vermeulen   (403) 282-7990\n");
    printf("Apt. 6 - 2312  22St N.W., Calgary, Alberta, CANADA, T2M 3W4.\n");
    printf("May be distributed without charge, so long as the Copyright\n");
    printf("notice and credits remain unmodified.\n");
  }
  else
  {
    font = fopen(argv[1], "r+");
    if (font)
    {
      /********************************************
        now determine how many sizes this font has
      *********************************************/
 
      fread(&n, 2, 1, font);  /** throw away **/
      fread(&n, 2, 1, font);  /** number of sizes **/
      printf("Font %s has %d sizes\n", argv[1], n);
      for (i = 0; i < n; ++i)
      {
        /** for each size we rename it...
         **/
 
        fseek(font, 4L + 260L * i, 0);
        fread(oldname, 256, 1, font);
        printf("name was: %s ", oldname);
        for (j = 255; j > 0; --j)
          if (oldname[j] == '/') break;
        strcpy(newname, argv[2]);
        strcat(newname, oldname + j);
        fseek(font, 4L + 260L * i, 0);
        printf("now is: %s\n", newname);
        fwrite(newname, 256, 1, font);
      }
      fclose(font);
    }
  }
}
 
 
        ------------------------ CUT HERE ------------------------
 
                                    REN
 
                        An Amiga Font Renaming Utility
 
 
Introduction:
 
     REN is a CLI based utility program for the Amiga that exploits
     a little understood feature of the Amiga Font System to allow
     the font data files to be placed elsewhere than in the default
     FONTS: directory.  This capability even allows fonts to be spread
     across several disks.  There are several advantages to doing this:
     much needed space is freed up on the boot disk, many more fonts
     may be on line at once, the number of fonts is not restricted by
     the size of a single disk media, and the font directory scans
     faster.
 
Syntax:
 
     The syntax of REN is quite simple:
 
           REN filename.font newpath
 
     where
 
       filename.font   is the COMPLETE path to a ".font" file that needs
                       changing, and
 
       newpath         is the new path to the font data, this may be
                       relative to FONTS: (eg. Garnet) or may be
                       absolute (eg.  Font_1:Garnet).
 
Examples:
 
     To change the working name of the Garnet family of fonts to another
     name (let's use Xyzzy) several things must be done.  The following
     is the complete list of things that must be done:
 
          rename FONTS:Garnet FONTS:Xyzzy
          rename FONTS:Garnet.font FONTS:Xyzzy.font
          ren FONTS:Xyzzy.font Xyzzy
 
     This will just change the name of the Garnet font to be the Xyzzy
     font.  In order to put the data files that describe the characters
     of the Garnet font somewhere else (eg. on a disk named Font_1:)
     the following commands are used:
 
          makedir Font_1:Garnet
          copy FONTS:Garnet Font_1:Garnet all
          delete FONTS:Garnet all
          ren FONTS:Garnet.font Font_1:Garnet
 
     Now, whenever a program tries to open the Garnet font to use it
     the system will search through the FONTS: directory to find
     the Garnet.font file.  It will then look in this file to find out
     where the actual font data is stored.  This data is now on another
     disk named Font_1: (note that the FONTS: directory would normally
     be assigned to a completly different disk, normally the boot disk).
     If the disk Font_1: is not in a disk drive a standard system
     requester will appear asking you to insert the Font_1: disk into
     a drive.
 
     It should now be clear that the ONLY files that must be in the
     FONTS: directory are the filename.font files, since these files
     are used to locate the font data files.  The great benefit this
     provides is of almost entirely removing the limit to the number of
     fonts that may be accessed at any one time that the size of disk
     media imposes.  The filename.font files are very small so that
     even on a crowded boot disk there is usually room for many of these
     if the font data files can be moved elsewhere.
 
More Background:
 
     A note to beginners, the font data files are the files that are
     named by a number which indicates the height of the font.  For
     example doing a:
 
            dir FONTS:
 
     will produce a list of files with the ".font" suffix as well as a
     list of directories.
 
     The directories are where the system usually
     stores the font data files.  To see the various data files for the
     Garnet font do a:
 
            dir FONTS:Garnet
 
     This should list two files: 9 and 16.  The file that is named
     "Garnet.font" in the FONTS: directory tells the system where
     to find the data files (the 9 and 16 files) that contain the
     bit patterns for the Garnet font.  The REN utility works its
     magic by exploiting a feature of the ".font" files that has
     not been used until now.
 
 
 
 
Stephen Vermeulen
Author: Express Paint and Spritz
Newsletter Editor of AMUC (the AMiga Users of Calgary)
SVermeulen % Janus.MtRoyal.AB.CA @ UncaNet.BITnet ...or...
SVermeulen % Janus.MRC.AdhocNet.CA @ UncaEdu.BITnet
