Commit 75751bc2 authored by ASCP's avatar ASCP

Initial commit

parents
This diff is collapsed.
Short: ProFonts source code
Uploader: amigasourcecodepreservation@gmail.com
Author: Canux Corporation
Type: text/print
Version: 1.0
Architecture: generic
Source code for ProFonts.
Binaries: {URL}
Uploaded to aminet for historical preservation.
Many thanks to Canux Corporation for releasing the source code.
License
=======
ProFonts is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.
All files part of ProFonts has
Copyright (C) 1996-2018 Canux Corporation
Notes
======
This is part of a batch of releases from Canux Corporation.
The source code was obtained from floppys disks, which was found
and preserved with a kryoflux (thanks SPS).
There might be more than one version of source code in one archive.
(v1.0, 1993 etc). Please submit any work you might to do to our gitlab in
a pull request.
A bit of the source code history from the copyright owner:
"
All of the sources with the exception of DesignWorks 2.0 and PowerManager
(and I don’t know if that source was included in what I sent you) were created
by a US company called “New Horizons”. When NH sold off their IP
(intellectual property) I was leading a development team at a company
called WCi in Ottawa Ontario and we bid on and won the auction of those assets.
I believe that was in 1994.
We rolled out a new version of DesignWorks (as mentioned) along with other
products like an Amiga power manager, a keyboard protocol converter (KB-10) and others.
WCi went out of business in 1995 or 1996. I personally bid on and
won the auction for WCi’s IP sometime after that. We did not do any
more Amiga development afterwards but some of our software was featured
in Amiga magazines at the time and we continued to build and sell our hardware products."
HELP US
===========
1) As the software now is GPL, please also upload the full binary
releases of the software if you have them, or send them to us.
2) Contact your old amiga friends and tell them about
our project, and ask them to dig out their source code or floppies
and send them to us for preservation.
3) Clean up our archives, and make the source code buildable
with standard compilers like devpac, asmone, gcc 2.9x/Beppo 6.x
, vbcc and friends.
Cheers!
Twitter
https://twitter.com/AmigaSourcePres
Gitlab
https://gitlab.com/AmigaSourcePres
WWW
https://amigasourcepres.gitlab.io/
_____ ___ _ __ __ _ __ __ ___ ___ _
|_ _| __| /_\ | \/ | /_\ | \/ |_ _/ __| /_\
| | | _| / _ \| |\/| | / _ \| |\/| || | (_ |/ _ \
_|_| |___/_/ \_\_|_ |_|_/_/_\_\_|__|_|___\___/_/_\_\
/ __|/ _ \| | | | _ \/ __| __| / __/ _ \| \| __|
\__ \ (_) | |_| | / (__| _| | (_| (_) | |) | _|
|___/\___/_\___/|_|_\\___|___|__\___\___/|___/|___|_
| _ \ _ \ __/ __| __| _ \ \ / /_\_ _|_ _/ _ \| \| |
| _/ / _|\__ \ _|| /\ V / _ \| | | | (_) | .` |
|_| |_|_\___|___/___|_|_\ \_/_/ \_\_| |___\___/|_|\_|
Disclaimer
=======
We handle of lot legacy code that we get sent. By error, sometimes a copyrighted file
that we don't have the permission to release could by mistake be included in the release archives.
If you find something that shouldn't be there, and you can prove that you are the copyright
owner to it, please contact us and we will do our best to resolve the issue.
Short: ProFonts source code
Uploader: amigasourcecodepreservation@gmail.com
Author: Canux Corporation
Type: text/print
Version: 1.0
Architecture: generic
Source code for ProFonts.
Binaries: {URL}
Uploaded to aminet for historical preservation.
Many thanks to Canux Corporation for releasing the source code.
License
=======
ProFonts is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.
All files part of ProFonts has
Copyright (C) 1996-2018 Canux Corporation
Notes
======
This is part of a batch of releases from Canux Corporation.
The source code was obtained from floppys disks, which was found
and preserved with a kryoflux (thanks SPS).
There might be more than one version of source code in one archive.
(v1.0, 1993 etc). Please submit any work you might to do to our gitlab in
a pull request.
A bit of the source code history from the copyright owner:
"
All of the sources with the exception of DesignWorks 2.0 and PowerManager
(and I don’t know if that source was included in what I sent you) were created
by a US company called “New Horizons”. When NH sold off their IP
(intellectual property) I was leading a development team at a company
called WCi in Ottawa Ontario and we bid on and won the auction of those assets.
I believe that was in 1994.
We rolled out a new version of DesignWorks (as mentioned) along with other
products like an Amiga power manager, a keyboard protocol converter (KB-10) and others.
WCi went out of business in 1995 or 1996. I personally bid on and
won the auction for WCi’s IP sometime after that. We did not do any
more Amiga development afterwards but some of our software was featured
in Amiga magazines at the time and we continued to build and sell our hardware products."
HELP US
===========
1) As the software now is GPL, please also upload the full binary
releases of the software if you have them, or send them to us.
2) Contact your old amiga friends and tell them about
our project, and ask them to dig out their source code or floppies
and send them to us for preservation.
3) Clean up our archives, and make the source code buildable
with standard compilers like devpac, asmone, gcc 2.9x/Beppo 6.x
, vbcc and friends.
Cheers!
Twitter
https://twitter.com/AmigaSourcePres
Gitlab
https://gitlab.com/AmigaSourcePres
WWW
https://amigasourcepres.gitlab.io/
_____ ___ _ __ __ _ __ __ ___ ___ _
|_ _| __| /_\ | \/ | /_\ | \/ |_ _/ __| /_\
| | | _| / _ \| |\/| | / _ \| |\/| || | (_ |/ _ \
_|_| |___/_/ \_\_|_ |_|_/_/_\_\_|__|_|___\___/_/_\_\
/ __|/ _ \| | | | _ \/ __| __| / __/ _ \| \| __|
\__ \ (_) | |_| | / (__| _| | (_| (_) | |) | _|
|___/\___/_\___/|_|_\\___|___|__\___\___/|___/|___|_
| _ \ _ \ __/ __| __| _ \ \ / /_\_ _|_ _/ _ \| \| |
| _/ / _|\__ \ _|| /\ V / _ \| | | | (_) | .` |
|_| |_|_\___|___/___|_|_\ \_/_/ \_\_| |___\___/|_|\_|
Disclaimer
=======
We handle of lot legacy code that we get sent. By error, sometimes a copyrighted file
that we don't have the permission to release could by mistake be included in the release archives.
If you find something that shouldn't be there, and you can prove that you are the copyright
owner to it, please contact us and we will do our best to resolve the issue.
File added
/*
* Macintosh font conversion program
*/
#include <exec/types.h>
#include <exec/nodes.h>
#include <libraries/diskfont.h>
#include <stdio.h>
#define HUNK_HEADER 0x03F3L
#define HUNK_CODE 0x03E9L
#define HUNK_RELOC32 0x03ECL
#define HUNK_END 0x03F2L
typedef struct {
WORD fontType;
WORD firstChar;
WORD lastChar;
WORD widMax;
WORD kernMax;
WORD nDescent;
WORD fRectWid;
WORD chHeight;
WORD owTLoc;
WORD ascent;
WORD descent;
WORD leading;
WORD rowWords;
} FontRec;
UBYTE *bitImage;
WORD locTable[258];
WORD owTable[258];
extern BYTE *strchr(), *malloc();
extern WORD fgetw(FILE *);
extern void fputw(WORD, FILE *);
extern void fputl(LONG, FILE *);
/*
* Utility routines
*/
WORD fgetw(file)
FILE *file;
{
WORD byte;
byte = fgetc(file);
return ((WORD) ((byte << 8) | fgetc(file)));
}
void fputw(word, file)
WORD word;
FILE *file;
{
fputc(word >> 8, file);
fputc(word & 0xFF, file);
}
void fputl(l, file)
LONG l;
FILE *file;
{
fwrite((BYTE *) &l, 4, 1, file);
}
/*
* Main routine
*/
void main(argc, argv)
int argc;
char *argv[];
{
register WORD i, c, ow, offset, width;
WORD entries, size;
UWORD iStart, iEnd;
register FILE *file;
FontRec fontRec;
ULONG rowBytes, dataSize;
ULONG numChars, fontName, fontData, fontLoc, fontSpace;
ULONG fontKern, fontEnd, fontLength;
ULONG lock;
char *s, buf[128];
int padBytes;
if (argc != 2) {
printf("Usage: %s fontname\n", argv[0]);
exit(1);
}
if ((s = strchr(argv[1], '.')) == NULL) {
printf("Error fontname must be of the form:\n");
printf("\tname.pointsize\n");
exit(1);
}
if ((file = fopen(argv[1], "r")) == NULL) {
printf("Error can't open file '%s'\n", argv[1]);
exit(1);
}
fread((BYTE *) &fontRec, sizeof(FontRec), 1, file);
printf("Font Data for %s:\n", argv[1]);
*s = '\0'; /* remove the suffix */
printf("\tChars %d to %d\n", fontRec.firstChar, fontRec.lastChar);
printf("\tFont Rectangle (W, H): (%d, %d)\n", fontRec.fRectWid,
fontRec.chHeight);
printf("\tAscent: %d, Descent: %d, Leading: %d\n", fontRec.ascent,
fontRec.descent, fontRec.leading);
rowBytes = fontRec.rowWords*2;
dataSize = rowBytes*fontRec.chHeight;
if ((bitImage = malloc(dataSize)) == NULL) {
printf("Error, no memory for bit image, need: %d\n", dataSize);
exit(1);
}
fread(bitImage, dataSize, 1, file);
for(i = fontRec.firstChar; i <= fontRec.lastChar + 2; i++)
locTable[i] = fgetw(file);
for(i = fontRec.firstChar; i <= fontRec.lastChar + 2; i++)
owTable[i] = fgetw(file);
fclose(file);
sprintf(buf, "fonts:%s", argv[1]);
if ((lock = CreateDir(buf)) != NULL)
UnLock(lock);
sprintf(buf, "fonts:%s/%d",argv[1], fontRec.chHeight);
if ((file = fopen(buf, "w")) == NULL) {
printf("Error, can't open '%s' for write\n", buf);
exit(1);
}
/*
Compute offsets into the code hunk
*/
numChars = fontRec.lastChar - fontRec.firstChar + 2;
fontName = 0x1A;
fontData = 0x6E;
fontLoc = fontData + dataSize;
fontSpace = fontLoc + (numChars << 2);
fontKern = fontSpace + (numChars << 1);
fontEnd = fontKern + (numChars << 1);
/*
Long word align fontEnd
*/
for (padBytes = 0; fontEnd & 3; padBytes++, fontEnd++) ;
fontLength = fontEnd - 0x3A; /* the font: label */
fputl(HUNK_HEADER, file);
fputl( 0L, file); /* no hunk names */
fputl( 1L, file); /* Size of hunk table */
fputl( 0L, file); /* First Hunk */
fputl( 0L, file); /* Last Hunk */
fputl((LONG) fontEnd >> 2, file); /* Size of Hunk 0 */
fputl(HUNK_CODE, file);
fputl((LONG) fontEnd >> 2, file); /* Size of this hunk */
/*
Now here comes the data for the hunk
This first part is in case someone tries to run this
*/
fputw(0x7000, file); /* MOVEQ.L #0,D0 */
fputw(0x4E75, file); /* RTS */
fputl( 0L, file); /* ln_Succ */
fputl( 0L, file); /* ln_Pred */
fputc(NT_FONT, file); /* ln_Type */
fputc( 0, file); /* ln_Pri */
fputl(0x1AL, file); /* ln_Name -- will be relocated */
fputw(DFH_ID, file); /* FileID */
fputw( 1, file); /* Revision */
fputl( 0L, file); /* Segment */
/* fontName: */
for (i = 0; i < MAXFONTNAME; i++)
fputc(0, file);
/* font: */
fputl( 0L, file); /* ln_Succ */
fputl( 0L, file); /* ln_Pred */
fputc(NT_FONT, file); /* ln_Type */
fputc( 0, file); /* ln_Pri */
fputl(0x1AL, file); /* ln_Name -- will be relocated */
fputl( 0L, file); /* mn_ReplyPort */
fputw((WORD) fontLength, file); /* nm_Length */
fputw(fontRec.chHeight, file); /* tf_YSize */
fputc( 0, file); /* tf_Style */
fputc(0x62, file); /* tf_Flags */
fputw(fontRec.chHeight, file); /* tf_XSize */
fputw(fontRec.ascent, file); /* ft_BaseLine */
fputw( 1, file); /* tf_BoldSmear */
fputw( 0, file); /* tf_Accessors */
fputc(fontRec.firstChar, file); /* tf_LoChar */
fputc(fontRec.lastChar, file); /* tf_HiChar */
fputl((LONG) fontData, file); /* tf_CharData */
fputw((WORD) rowBytes, file); /* tf_Modulo */
fputl((LONG) fontLoc, file); /* tf_CharLoc */
fputl((LONG) fontSpace, file); /* tf_CharSpace */
fputl((LONG) fontKern, file); /* tf_Charkern */
/* fontData: */
fwrite(bitImage, dataSize, 1, file);
/* fontLoc: */
/*
Note that there is an extra character in every font on both
that Amiga and the Mac which is used when a character not in
the font is requested
*/
for (i = fontRec.firstChar; i <= fontRec.lastChar + 1; i++) {
c = (owTable[i] == -1) ? fontRec.lastChar + 1 : i;
iStart = locTable[c];
iEnd = locTable[c + 1];
fputw((WORD) iStart, file);
fputw((WORD) (iEnd - iStart), file);
}
/* fontSpace: */
for (i = fontRec.firstChar; i <= fontRec.lastChar + 1; i++) {
if ((ow = owTable[i]) == -1)
ow = owTable[fontRec.lastChar + 1];
offset = (ow >> 8) & 0xFF;
width = ow & 0xFF;
fputw((WORD) (width - offset - fontRec.kernMax), file);
}
/* fontKern: */
for (i = fontRec.firstChar; i <= fontRec.lastChar + 1; i++) {
if ((ow = owTable[i]) == -1)
ow = owTable[fontRec.lastChar + 1];
offset = (ow >> 8) & 0xFF;
fputw((WORD) (offset + fontRec.kernMax), file);
if (offset + fontRec.kernMax < 0)
printf("Warning - negative kern for char %c ($%02x)\n", i, i);
}
/* fontEnd: */
for (i = 0; i < padBytes; i++)
fputc(0, file);
fputl(HUNK_RELOC32, file);
fputl( 6L, file); /* of relocates number in this hunk */
fputl( 0L, file); /* hunk 0 */
fputl(0x0EL, file); /* relocate reference to fontName: 1st */
fputl(0x44L, file); /* relocate reference to fontName: 2nd */
fputl(0x5CL, file); /* relocate reference to fontData: */
fputl(0x62L, file); /* relocate reference to fontLoc: */
fputl(0x66L, file); /* relocate reference to fontSpace: */
fputl(0x6AL, file); /* relocate reference to fontKern: */
fputl( 0L, file); /* zero to mark end */
fputl(HUNK_END, file);
fclose(file);
sprintf(buf, "fonts:%s.font", argv[1]);
if ((file = fopen(buf,"r+")) == NULL) {
if ((file = fopen(buf, "w+")) == NULL) {
printf("Error, can't create font header\n");
exit(1);
}
fputw(0x0F00, file); /* font header */
fputw(0x0000, file); /* number of font items */
}
fseek(file, 2, 0);
fread((BYTE *) &entries, 2, 1, file);
for (i = 0; i < entries; i++) {
fseek(file, 4 + (260*i) + 256, 0);
fread((BYTE *) &size, 2, 1, file); /* read in ysize */
if (size == fontRec.chHeight) {
printf("Amiga font of this size already exists");
printf("... overwritten\n");
exit(1);
}
}
fseek(file, 2, 0);
fputw(++entries, file);
fseek(file, 0, 2);
sprintf(buf, "%s/%d", argv[1], fontRec.chHeight);
fwrite(buf, strlen(buf), 1, file);
for (i = strlen(buf); i < 256; i++)
fputc(0, file);
fputw(fontRec.chHeight, file);
fputc( 0, file);
fputc(0x62, file);
fclose(file);
}
/* These macros are for extracting an integer of a certain type
* from the midst of an arbitrary chunk of memory.
*
* Due to the offset based Macintosh resource system you have to
* do this a lot...
*
*/
#define UC(p) ((unsigned char *)(p))
#ifdef MPU68000
/* this will work on any machine with 68000 style endain ordering */
/* p should be a pointer to char */
#define X_ULONG(p) (*((ULONG *)(p)))
#define X_UWORD(p) (*((UWORD *)(p)))
#define X_UBYTE(p) (*((UBYTE *)(p)))
#define X_LONG(p) (*((LONG *)(p)))
#define X_WORD(p) (*((WORD *)(p)))
#define X_BYTE(p) (*((BYTE *)(p)))
#else
/* this will work on any machine but it's not as fast as the above */
#define X_ULONG(p) (ULONG)(UC(p)[0]<<24|UC(p)[1]<<16|UC(p)[2]<<8|UC(p)[3])
#define X_UWORD(p) (UWORD)(UC(p)[0]<<8|UC(p)[1])
#define X_UBYTE(p) (UBYTE)(UC(p)[0])
#define X_LONG(p) (LONG)((UC(p)[0]<<24|UC(p)[1]<<16|UC(p)[2]<<8|UC(p)[3])
#define X_WORD(p) (WORD)(UC(p)[0]<<8|UC(p)[1])
#define X_BYTE(p) (BYTE)(UC(p)[0])
#endif
/* artificial types... have to fake them */
#define X_UTRIP(p) (ULONG)(UC(p)[0]<<16|UC(p)[1]<<8|UC(p)[2])
#define X_TRIP(p) (LONG)(UC(p)[0]<<16|UC(p)[1]<<8|UC(p)[2])
.Key fontname
Assign fonts: fonts
CD fonts
/Unpack -x <fontname>
Delete <fontname>
If Exists <fontname>.4
/Convert <fontname>.4
Delete <fontname>.4
EndIf
If Exists <fontname>.5
/Convert <fontname>.5
Delete <fontname>.5
EndIf
If Exists <fontname>.6
/Convert <fontname>.6
Delete <fontname>.6
EndIf
If Exists <fontname>.7
/Convert <fontname>.7
Delete <fontname>.7
EndIf
If Exists <fontname>.8
/Convert <fontname>.8
Delete <fontname>.8
EndIf
If Exists <fontname>.9
/Convert <fontname>.9
Delete <fontname>.9
EndIf
If Exists <fontname>.10
/Convert <fontname>.10
Delete <fontname>.10
EndIf
If Exists <fontname>.11
/Convert <fontname>.11
Delete <fontname>.11
EndIf
If Exists <fontname>.12
/Convert <fontname>.12
Delete <fontname>.12
EndIf
If Exists <fontname>.13
/Convert <fontname>.13
Delete <fontname>.13
EndIf
If Exists <fontname>.14
/Convert <fontname>.14
Delete <fontname>.14
EndIf
If Exists <fontname>.15
/Convert <fontname>.15
Delete <fontname>.15
EndIf
If Exists <fontname>.16
/Convert <fontname>.16
Delete <fontname>.16
EndIf
If Exists <fontname>.17
/Convert <fontname>.17
Delete <fontname>.17
EndIf
If Exists <fontname>.18
/Convert <fontname>.18
Delete <fontname>.18
EndIf
If Exists <fontname>.19
/Convert <fontname>.19
Delete <fontname>.19
EndIf
If Exists <fontname>.20
/Convert <fontname>.20
Delete <fontname>.20
EndIf
If Exists <fontname>.22
/Convert <fontname>.22
Delete <fontname>.22
EndIf
If Exists <fontname>.24
/Convert <fontname>.24
Delete <fontname>.24
EndIf
If Exists <fontname>.26
/Convert <fontname>.26
Delete <fontname>.26
EndIf
If Exists <fontname>.28
/Convert <fontname>.28
Delete <fontname>.28
EndIf
If Exists <fontname>.30
/Convert <fontname>.30
Delete <fontname>.30
EndIf
If Exists <fontname>.32
/Convert <fontname>.32
Delete <fontname>.32
EndIf
If Exists <fontname>.34
/Convert <fontname>.34
Delete <fontname>.34
EndIf
If Exists <fontname>.36
/Convert <fontname>.36
Delete <fontname>.36
EndIf
If Exists <fontname>.38
/Convert <fontname>.38
Delete <fontname>.38
EndIf
If Exists <fontname>.40
/Convert <fontname>.40
Delete <fontname>.40
EndIf
If Exists <fontname>.42
/Convert <fontname>.42
Delete <fontname>.42
EndIf
If Exists <fontname>.44
/Convert <fontname>.44
Delete <fontname>.44
EndIf
If Exists <fontname>.46
/Convert <fontname>.46
Delete <fontname>.46
EndIf
If Exists <fontname>.48
/Convert <fontname>.48
Delete <fontname>.48
EndIf
CD /
.Key fontname
Assign fonts: fonts
Assign PS: :LC/ProScript
CD fonts
/Unpack -x <fontname>
Delete <fontname>
If Exists <fontname>.9
/Convert <fontname>.9
Delete <fontname>.9
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/9
EndIf
If Exists <fontname>.10
/Convert <fontname>.10
Delete <fontname>.10
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/10
EndIf
If Exists <fontname>.12
/Convert <fontname>.12
Delete <fontname>.12
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/12
EndIf
If Exists <fontname>.14
/Convert <fontname>.14
Delete <fontname>.14
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/14
EndIf
If Exists <fontname>.18
/Convert <fontname>.18
Delete <fontname>.18
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/18
EndIf
If Exists <fontname>.24
/Convert <fontname>.24
Delete <fontname>.24
PS:Respace_Font -D 80 :fonts/<fontname>.metric fonts:<fontname>/24
EndIf
CD /
/*
* System Mover
* Copyright (c) 1989 New Horizons Software, Inc.
*
* Copy routines
*/